<!-- 配置详细事务处理语义 -->
<tx:attributes>
<tx:method propagation="REQUIRED" />
<tx:method propagation="REQUIRED" />
<tx:method propagation="REQUIRED" />
<tx:method propagation="SUPPORTS" read-only="true" />
<tx:method propagation="SUPPORTS" read-only="true" />
<tx:method propagation="SUPPORTS" read-only="true" />
<tx:method propagation="SUPPORTS" read-only="true" />
<!-- 其他采用默认事务方式 -->
<tx:method />
</tx:attributes>
</tx:advice>
<!-- Spring aop事务管理 -->
<aop:config>
<!-- 配置切入点 -->
<aop:pointcut
expression="execution(* com.service..*Impl.*(..))" />
<!-- 指定在txAdvice切入点应用txAdvice事务增强处理 -->
<aop:advisor pointcut-ref="transactionPointcut"
advice-ref="transactionAdvice" />
</aop:config>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd">
<diskStore path="D:/ehcache" />
<!-- DefaultCache setting. -->
<defaultCache
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"
maxElementsOnDisk="1000000"
overflowToDisk="true"
memoryStoreEvictionPolicy="LRU">
</defaultCache>
<!-- Special objects setting. -->
<cache
maxElementsInMemory="2"
memoryStoreEvictionPolicy="LRU"
eternal="true"
diskPersistent="false"
overflowToDisk="false"
maxElementsOnDisk="1000000" />
</ehcache>
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/ruanjian/article-65857-9.html
那就给他点面子