Require non-empty values for TxMgr qualifiers & bean names
This commit is contained in:
parent
5b5cf37ac5
commit
c2101cbcf4
|
@ -344,7 +344,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||||
return this.transactionManager;
|
return this.transactionManager;
|
||||||
}
|
}
|
||||||
String qualifier = txAttr.getQualifier();
|
String qualifier = txAttr.getQualifier();
|
||||||
if (StringUtils.hasLength(qualifier)) {
|
if (StringUtils.hasText(qualifier)) {
|
||||||
PlatformTransactionManager txManager = this.transactionManagerCache.get(qualifier);
|
PlatformTransactionManager txManager = this.transactionManagerCache.get(qualifier);
|
||||||
if (txManager == null) {
|
if (txManager == null) {
|
||||||
txManager = BeanFactoryAnnotationUtils.qualifiedBeanOfType(
|
txManager = BeanFactoryAnnotationUtils.qualifiedBeanOfType(
|
||||||
|
@ -353,7 +353,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||||
}
|
}
|
||||||
return txManager;
|
return txManager;
|
||||||
}
|
}
|
||||||
else if (this.transactionManagerBeanName != null) {
|
else if (StringUtils.hasText(this.transactionManagerBeanName)) {
|
||||||
PlatformTransactionManager txManager = this.transactionManagerCache.get(this.transactionManagerBeanName);
|
PlatformTransactionManager txManager = this.transactionManagerCache.get(this.transactionManagerBeanName);
|
||||||
if (txManager == null) {
|
if (txManager == null) {
|
||||||
txManager = this.beanFactory.getBean(
|
txManager = this.beanFactory.getBean(
|
||||||
|
|
Loading…
Reference in New Issue