-
Notifications
You must be signed in to change notification settings - Fork 41.4k
Description
I'm using Spring Boot 1.4.0 deployed as a war file to Tomcat 8.5. According to the documentantion, I should be able to configure the spring.boot.location configuration parameter by passing it via Servlet context initialization parameter.
If you are running in a container then JNDI properties (in java:comp/env) or servlet context initialization parameters can be used instead of, or as well as, environment variables or system properties.
http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html
When I add this line to my context.xml file in Tomcat
<Parameter name="spring.config.location" value="file:/some/path/" />
the application.properties file at this path is ignored and not read.
If I however use a JNDI entry like
<Environment name="spring.config.location" value="file:/some/path/" type="java.lang.String" />
the application.properties file is read and will be used.