You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've created several xxx.properties files for different environments and tried to add them using the spring.profiles.active as stated in DXA's documentation. However, although the profile is properly picked up, the properties file is being ignored.
We've created several
xxx.properties
files for different environments and tried to add them using thespring.profiles.active
as stated in DXA's documentation. However, although the profile is properly picked up, the properties file is being ignored.I debugged the
DxaSpringInitialization
class that defines the required beans for DXA, and found the first one is loading all thedxa.*.properties
file by using the following method:https://github.com/sdl/dxa-web-application-java/blob/51b8cdee1ad683d1ca778d5e465b3f4ab83bbe9f/dxa-framework/dxa-common-api/src/main/java/com/sdl/dxa/DxaSpringInitialization.java#L60
The Javadoc for the method
configurer.setPropertySources(propertySources);
says:I suspect defining the
placeholderConfigurer
bean that way causes DXA to ignore any.properties
file not included inhttps://github.com/sdl/dxa-web-application-java/blob/1610c7be29c038ffebf340bb8c44c5046de607cf/dxa-framework/dxa-common-api/src/main/java/com/sdl/webapp/common/util/InitializationUtils.java#L104
It also causes the application to ignore any inline property you try to set during execution, like:
See also: https://tridion.stackexchange.com/questions/18792/dxa-java-web-application-profile-specific-properties
The text was updated successfully, but these errors were encountered: