Alfresco resources precendace - overriding OOTB files

cancel
Showing results for 
Search instead for 
Did you mean: 
upforsin
Senior Member

Alfresco resources precendace - overriding OOTB files

Jump to solution

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.

1 Solution

Accepted Solutions
abhinavmishra14
Advanced

Re: Alfresco resources precendace - overriding OOTB files

Jump to solution

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 solution in original post

1 Reply
abhinavmishra14
Advanced

Re: Alfresco resources precendace - overriding OOTB files

Jump to solution

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)