Introduce resolvable timeout attribute on @Transactional and <tx:method>

Placeholders get resolved in timeoutString, qualifier and labels now.

Closes gh-25052
This commit is contained in:
Juergen Hoeller
2020-05-12 21:55:22 +02:00
parent 273d952ddf
commit dd0d0d51f6
14 changed files with 244 additions and 63 deletions

View File

@@ -7,13 +7,17 @@
http://www.springframework.org/schema/aop https://www.springframework.org/schema/aop/spring-aop-2.5.xsd
http://www.springframework.org/schema/tx https://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
<bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
<property name="properties" value="myTimeout=5"/>
</bean>
<aop:config>
<aop:advisor pointcut="execution(* *..ITestBean.*(..))" advice-ref="txAdvice"/>
</aop:config>
<tx:advice id="txAdvice">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="get*" timeout="5" read-only="true"/>
<tx:method name="set*"/>
<tx:method name="exceptional"/>
</tx:attributes>