public final class DefaultProfileUtil
extends java.lang.Object
spring.profiles.active
set in the environment or as command line argument.
If the value is not available in application.yml
then dev
profile will be used as default.Modifier and Type | Method and Description |
---|---|
static void |
addDefaultProfile(org.springframework.boot.SpringApplication app)
Set a default to use when no profile is configured.
|
static java.lang.String[] |
getActiveProfiles(org.springframework.core.env.Environment env)
Get the profiles that are applied else get default profiles.
|
public static void addDefaultProfile(org.springframework.boot.SpringApplication app)
app
- the Spring applicationpublic static java.lang.String[] getActiveProfiles(org.springframework.core.env.Environment env)
env
- spring environmentCopyright © 2017 Osgiliath. All rights reserved.