Closed
Description
I am facing a weird issue with containers other than Tomcat(spring boot 1.3.5). The issue is with StandardServletEnvironment
which includes JNDIDatasource
as one of the property source.
@Override
protected void customizePropertySources(MutablePropertySources propertySources) {
propertySources.addLast(new StubPropertySource(SERVLET_CONFIG_PROPERTY_SOURCE_NAME));
propertySources.addLast(new StubPropertySource(SERVLET_CONTEXT_PROPERTY_SOURCE_NAME));
if (JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable()) {
propertySources.addLast(new JndiPropertySource(JNDI_PROPERTY_SOURCE_NAME));
}
super.customizePropertySources(propertySources);
}
Spring is by default looking for some jndi properties ending with ":" at the end of the property. The lookup is failing for the following properties
spring.cloud.bootstrap.name:
SPRING_APPLICATION_JSON:
spring.cloud.bootstrap.location:
etc
Here is the sample application.
demo_ibm.zip