Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Use Kuali Rice ConfigFactoryBean and Spring PropertyPlaceholderConfigurer to make properties available as Spring tokens at launch time

Code Block
borderStylesolid
titleclasspath:edu/ucdavis/myapp/config/application-common.xml
borderStylesolid
<bean id="config" class="org.kuali.rice.core.config.spring.ConfigFactoryBean">
    <property name="configLocations">
        <list>
            <value>/usr/local/rice-config.xml</value>
        </list>
    </property>
</bean>

<bean id="configProperties" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
    <property name="targetObject" ref="config" />
    <property name="targetMethod" value="getProperties" />
</bean>

<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="properties" ref="configProperties" />
</bean>