cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco resources precendace - overriding OOTB files

upforsin
Star Collaborator
Star Collaborator

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.

howkymike
Alfresco Developer
1 ACCEPTED ANSWER

abhinavmishra14
World-Class Innovator
World-Class Innovator

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. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)

View answer in original post

1 REPLY 1

abhinavmishra14
World-Class Innovator
World-Class Innovator

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. 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)