use of org.springframework.core.env.MutablePropertySources in project spring-boot by spring-projects.
the class EmbeddedLdapAutoConfiguration method setPortProperty.
private void setPortProperty(ApplicationContext context, int port) {
if (context instanceof ConfigurableApplicationContext) {
MutablePropertySources sources = ((ConfigurableApplicationContext) context).getEnvironment().getPropertySources();
getLdapPorts(sources).put("local.ldap.port", port);
}
if (context.getParent() != null) {
setPortProperty(context.getParent(), port);
}
}
Aggregations