Alternative search locations and names can be specified using {@link #setSearchLocations(String)} and {@link #setSearchNames(String)}.
Additional files will also be loaded based on active profiles. For example if a 'web' profile is active 'application-web.properties' and 'application-web.yml' will be considered.
The 'spring.config.name' property can be used to specify an alternative name to load and the 'spring.config.location' property can be used to specify alternative search locations or specific files.
Configuration properties are also bound to the {@link SpringApplication}. This makes it possible to set {@link SpringApplication} properties dynamically, like the sources("spring.main.sources" - a CSV list) the flag to indicate a web environment ("spring.main.web_environment=true") or the flag to switch off the banner ("spring.main.show_banner=false"). @author Dave Syer @author Phillip Webb
|
|
|
|