Multiple share-custom files in SDK

cancel
Showing results for 
Search instead for 
Did you mean: 
dhrumilgosaliya
Member II

Multiple share-custom files in SDK

Hi all,

I want to add multiple share-config-custom files in sdk. Till now i am reffering this link https://docs.alfresco.com/5.1/concepts/share-configuration-files.html . I am assuming to register bean in slingshot-application-context.xml file but i am confused exaclty how to add. And also want to add seprate multiple acs.properties files but confused in registraion of it .

 

Can Please someone help in this?

Thanks,

Dhrumil

1 Reply
abhinavmishra14
Advanced

Re: Multiple share-custom files in SDK

As per this doc, you can have two configs in web-extension/* and two in META-INF/* as the names suggests.

share-config-custom.xml
share-config-custom-dev.xml

Now, if the whole purpuse is to keep share config per module then there is a better way to do it. 

You can use extension modules and define any number of share configurations in the extensions. 

There is a discussion around extension module share config vs share config custom here, may be helpful: https://hub.alfresco.com/t5/alfresco-content-services-forum/surf-extension-module-vs-share-config-cu...

If you still want to use multiple share configs rather than extension based approach, then you can create any number of configs and bootstrap them using spring bean. example:

 

<bean id="my.custom.configs" class="org.springframework.extensions.config.ConfigBootstrap" init-method="register">
	   <property name="configService" ref="web.config" />
	   <property name="configs">
		   <list>
		   	<value>classpath:alfresco/web-extension/x-config.xml</value>
<value>jar:*!/META-INF/xx-config.xml</value> <value>classpath:alfresco/web-extension/y-config.xml</value>
<value>jar:*!/META-INF/yy-config.xml</value>
<value>classpath:alfresco/web-extension/z-config.xml</value>
.....
<value>classpath:alfresco/web-extension/n-config.xml</value>
<value>jar:*!/META-INF/nn-config.xml</value> </list> </property> </bean>

 

 

~Abhinav
(ACSCE, AWS SAA, Azure Admin)