According to this github issue, I can specify the location of an application.properties file. e.g.
JNDI Environment Resource:
java:comp/env/spring.config.location = /some/path/application.properties
java:comp/env/my.env.myCustomStringField = foobar
java:comp/env/my.env.my-custom-string-field = foobar
If you are running in a container then JNDI properties (in) or servlet context initialization parameters can be used instead of, or as well as, environment variables or system properties.
Not sure what I was thinking, you can use JNDI to set the location of the
application.properties file, and/orr override any application variables.
spring.config.location = file:/some/location/properties/ my.env.myCustomStringField = foobar
Don't bother with the
java:comp/env/, Spring shields you from it.