cancel
Showing results for 
Search instead for 
Did you mean: 

Share analog of alfresco-global.properties

streetturtle
Confirmed Champ
Confirmed Champ
I have a spring bean in share to which I want to pass a property value from some external .properties files.
For alfresco (repo) it is possible, in alfresco-global.properties file I can create some property and use it in alfresco context.xml.
So is there something similar for share?
1 REPLY 1

mdavid_cu
Champ in-the-making
Champ in-the-making
You could use a default Spring PropertyPlaceholderConfigurer Bean

   <bean id="properties-placeholder"   class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="valueSeparator">
            <null/>
        </property>
        <property name="ignoreUnresolvablePlaceholders">
            <value>true</value>
        </property>
        <property name="searchSystemEnvironment">
            <value>false</value>
        </property>       
         <property name="locations">
            <list>              
                <value>classpath:alfresco/share-global.properties</value>
            </list>
        </property>    
    </bean>
   
    <bean id="demoBean" class="com.my.share.config.DemoPlaceHolder">
        <property name="demoProperty">
            <value>${demo.property.value}</value>
        </property>
    </bean>


and then create a file:

tomcat/shared/classes/alfresco/share-global.properties


Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.