mplebani
mplebani

Reputation: 43

Alfresco Java backend webscript: reading properties file

I need to include a properties file into my Alfresco webscript developed in Java. How can I include it? The properties file includes a hash map useful for service work.

How can use ResourceBundle?

Note that it is not a i18n file.

Thanks

-- Marco

Upvotes: 1

Views: 983

Answers (1)

alfrescian
alfrescian

Reputation: 4079

you should be able to get your props as map via spring injection with your java webscript bean:

    <property name="your map">
        <bean class="org.springframework.beans.factory.config.PropertiesFactoryBean">
            <property name="location" value="your_properties.properties"/>
        </bean>
    </property>

Upvotes: 1

Related Questions