Spring 配置之 PropertyPlaceholderConfigurer
<!-- ============= GENERAL DEFINITIONS ============= -->
<!-- Configurer that replaces ${...} placeholders with values from a properties file -->
<!-- (in this case, JDBC-related settings for the dataSource definition below) -->
<bean id="propertyConfigurer"
value="classpath:ibatis/sql-map-config.xml" />
? ? ? ? ?<property name="dataSource" ref="dataSource"></property>
? ? </bean>
? ? <bean id="transactionManager" ref="dataSource"></property>
? ? </bean>
? ? <bean id="transactionIterceptor" ref="transactionManager"></property>
? ? ?<property name="transactionAttributes">
? ? ? <props>
? ? ? ?<prop key="insert*">PROPAGATION_REQUIRED</prop>
? ? ? ?<prop key="add*">PROPAGATION_REQUIRED</prop>
? ? ? ?<prop key="find*,get*">PROPAGATION_REQUIRED,readOnly</prop>
? ? ? ?<prop key="*">PROPAGATION_REQUIRED</prop>
? ? ? </props>
? ? ?</property>
? ? </bean>
? ? <bean class="org.springframework.aop.framework.autoproxy.BeanNameAutoProxyCreator">
? ? ?<property name="beanNames">
? ? ? <list>
? ? ? ?<value>*Service</value>
? ? ? </list>
? ? ?</property>
? ? ?<property name="interceptorNames">
? ? ? <list>
? ? ? ?<value>transactionIterceptor</value>
? ? ? </list>
? ? ?</property>
? ? </bean>
</beans>