Skip to content

Instantly share code, notes, and snippets.

@marianocapurro
Created December 16, 2011 14:22
Show Gist options
  • Save marianocapurro/1486214 to your computer and use it in GitHub Desktop.
Save marianocapurro/1486214 to your computer and use it in GitHub Desktop.
Multiple PropertyPlaceholder Configuration
<mule ...>
...
<!-- SAP & JDBC Configuration -->
<spring:bean id="sapProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<!-- Added to support multiple placeholders -->
<spring:property name="ignoreUnresolvablePlaceholders" value="true" />
<spring:property name="location" value="classpath:sap.properties"/>
</spring:bean>
<spring:bean id="jdbcProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<spring:property name="location" value="classpath:jdbc.properties"/>
</spring:bean>
...
<!--
Code that uses the values inside the properties file. For example, 'database.driver' is a key defined in: jdbc.properties
-->
<!-- JDBC Mappings configuration -->
<spring:bean id="jdbcDataSource" class="org.enhydra.jdbc.standard.StandardDataSource"
destroy-method="shutdown">
<spring:property name="driverName" value="${database.driver}"/>
<spring:property name="url" value="${database.connection}"/>
</spring:bean>
<!-- SAP Connector -->
<sap:connector name="SapConnector" jcoClient="${sap.jcoClient}" jcoUser="${sap.jcoUser}" jcoPasswd="${sap.jcoPasswd}"
jcoLang="${sap.jcoLang}" jcoAsHost="${sap.jcoAsHost}" jcoSysnr="${sap.jcoSysnr}"
jcoTrace="${sap.jcoTrace}" jcoPoolCapacity="${sap.jcoPoolCapacity}" jcoPeakLimit="${sap.jcoPeakLimit}" />
...
</mule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment