public class ProfileApplicationListener extends Object implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent>, org.springframework.core.Ordered
CloudProfileProvider discovered from the
ServiceLoader.
If no cloud providers are found, the local profile is set.
You can disable this class by setting the environment variable
SPRING_CLOUD_SKIPPER_SERVER_PROFILEAPPLICATIONLISTENER_IGNORE to true.
If the kubernetes profile has not been detected, then the property spring.cloud.kubernetes.enabled
is set to false in order to disable functionality in the spring-cloud-kubernetes library that would result
in the logging of warning message.| Modifier and Type | Field and Description |
|---|---|
static String |
IGNORE_PROFILEAPPLICATIONLISTENER_ENVVAR_NAME |
static String |
IGNORE_PROFILEAPPLICATIONLISTENER_PROPERTY_NAME
System property that when set to
true will not set the active profiles using
CloudProfileProvider implementations discovered from the ServiceLoader. |
| Constructor and Description |
|---|
ProfileApplicationListener() |
| Modifier and Type | Method and Description |
|---|---|
int |
getOrder() |
void |
onApplicationEvent(org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent event) |
public static final String IGNORE_PROFILEAPPLICATIONLISTENER_PROPERTY_NAME
true will not set the active profiles using
CloudProfileProvider implementations discovered from the ServiceLoader.public static final String IGNORE_PROFILEAPPLICATIONLISTENER_ENVVAR_NAME
public void onApplicationEvent(org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent event)
onApplicationEvent in interface org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent>public int getOrder()
getOrder in interface org.springframework.core.OrderedCopyright © 2019 Pivotal Software, Inc.. All rights reserved.