04-05-2022 10:19 AM
Hello,
I have the alfresco-test.jar file that consists of overridden .properties files. How can I make sure they will have precedence over OOTB Alfresco files? Currently, to make them override OOTB files, I have to change the file name to something alphabetically greater than "alfresco" but does not seem to be a good solution. Is there any other solution?
jar files are placed under /tomcat/webapps/alfresco/WEB-INF/lib. Custom jar was initially taken from the crowdin translations.
04-05-2022 11:00 AM
what ".properties" file you are overriding? There is no controlled order, but per my experience the order works based on the order of bean definitions which is still hard to track.
However, good new is that, there is a way to do that using: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/c...PropertyOverrideConfigurer.html
or https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/c...BeanFactoryPostProcessor.html
These are some good tools to handle scenarios like yours.
04-05-2022 11:00 AM
what ".properties" file you are overriding? There is no controlled order, but per my experience the order works based on the order of bean definitions which is still hard to track.
However, good new is that, there is a way to do that using: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/c...PropertyOverrideConfigurer.html
or https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/beans/factory/c...BeanFactoryPostProcessor.html
These are some good tools to handle scenarios like yours.
Explore our Alfresco products with the links below. Use labels to filter content by product module.