Hi
I have a webflow based application that is using Spring profiles for configuration. My understanding is that I can set a default profile by adding this to web.xml
This doesn't work. Looking at the debug I can see that the context params are not being interrogated as a property source:Code:<context-param> <param-name>spring.profiles.default</param-name> <param-value>development,test</param-value> </context-param>
My app works perfectly if I set the spring.profiles.default as a JVM param, but this defies the point of having a default (it's not really a default if you have to pass it in...).Code:DEBUG: org.springframework.core.env.PropertySourcesPropertyResolver - Searching for key 'spring.profiles.default' in [systemEnvironment] DEBUG: org.springframework.core.env.PropertySourcesPropertyResolver - Could not find key 'spring.profiles.default' in any property source. Returning [null]
Strangely I see that the class DefaultWebEnvironment that I thought was controlling this has been removed in Spring 3.1.1 (it was present in 3.1.0). Does anyone know what's going on here ?
Javadoc for DefaultWebEnvironment:
http://static.springsource.org/sprin...vironment.html
By the way, it seems that, for whatever reason, my web app is initialising a new StandardEnvironment "implementation suitable for use in 'standard' (i.e. non-web)" rather than whatever now replaces the DefaultWebEnvironment.


Reply With Quote
