postProcessEnvironment method
void
postProcessEnvironment(
- ConfigurableEnvironment environment,
- SpringApplication application
override
Changes environment, the environment being prepared for
application.
Called once per run. application gives access to settings such as
SpringApplication.additionalProfiles. An error thrown here fails the
start with the usual failure report.
Implementation
@override
void postProcessEnvironment(
ConfigurableEnvironment environment,
SpringApplication application,
) {
final found = findRenamedProperties(environment.propertySources);
if (found.isNotEmpty) {
throw RenamedPropertiesException(found);
}
}