Closed powerbroker closed 1 month ago
The 'spring.profiles.active' value must be used when set, ignoring the 'spring.profiles.default' one. The 'spring.profiles.default' value must take part when no 'spring.profiles.active' specified.
Yes, that's the expected behavior. In other words what you've stated is what should be happening. You're claiming it does not but XML snippet in text like that aren't really actionable as it doesn't make a working sample. Also the active and the default profiles have the same value so I am not sure what you're trying to do.
You could start by ignoring JNDI altogether and do the same thing in properties and validate that it works. If it does, then we're back on potentially a JNDI-specific problem and we'll need a small sample that demonstrates the problem we can run ourselves. You can attach a zip to this issue or push the code to a separate GitHub repository.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
enable 'FINE' logging level of Spring.
<Environment name="spring.profiles.active" value="web" type="java.lang.String" override="false"/>
start web-app with Spring(6.1.11) and enjoy
Looking up JNDI object with name [java:comp/env/spring.profiles.default] ...
message series.
<Environment name="spring.profiles.default" value="web" type="java.lang.String" override="false"/>
start web-app and enjoy 'Activating profiles [web]' in your log.
The 'spring.profiles.active' value must be used when set, ignoring the 'spring.profiles.default' one. The 'spring.profiles.default' value must take part when no 'spring.profiles.active' specified.