Browse Source

Restore original MethodMapTransactionAttributeSource matching rules

Issue: SPR-16733
pull/1793/head
Juergen Hoeller 8 years ago
parent
commit
c5b524db7c
  1. 3
      spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java
  2. 2
      spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml

3
spring-tx/src/main/java/org/springframework/transaction/interceptor/MethodMapTransactionAttributeSource.java

@ -32,7 +32,6 @@ import org.springframework.util.Assert; @@ -32,7 +32,6 @@ import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.PatternMatchUtils;
import org.springframework.util.ReflectionUtils;
/**
* Simple {@link TransactionAttributeSource} implementation that
@ -145,7 +144,7 @@ public class MethodMapTransactionAttributeSource @@ -145,7 +144,7 @@ public class MethodMapTransactionAttributeSource
Assert.notNull(mappedName, "Mapped name must not be null");
String name = clazz.getName() + '.' + mappedName;
Method[] methods = ReflectionUtils.getAllDeclaredMethods(clazz);
Method[] methods = clazz.getDeclaredMethods();
List<Method> matchingMethods = new ArrayList<>();
for (Method method : methods) {
if (isMatch(method.getName(), mappedName)) {

2
spring-tx/src/test/resources/org/springframework/transaction/interceptor/transactionalBeanFactory.xml

@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
<property name="transactionAttributeSource">
<value>
org.springframework.tests.sample.beans.ITestBean.s*=PROPAGATION_MANDATORY
org.springframework.tests.sample.beans.ITestBean.setAg*=PROPAGATION_REQUIRED
org.springframework.tests.sample.beans.AgeHolder.setAg*=PROPAGATION_REQUIRED
org.springframework.tests.sample.beans.ITestBean.set*= PROPAGATION_SUPPORTS , readOnly
</value>
</property>

Loading…
Cancel
Save