Refined exception message

Issue: SPR-14609
This commit is contained in:
Juergen Hoeller 2016-08-24 15:05:43 +02:00
parent 6d86437369
commit ab686732d0
1 changed files with 3 additions and 2 deletions

View File

@ -240,9 +240,10 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
*/ */
@Override @Override
public void afterPropertiesSet() { public void afterPropertiesSet() {
if (getTransactionManager() == null && getBeanFactory() == null) { if (getTransactionManager() == null && this.beanFactory == null) {
throw new IllegalStateException( throw new IllegalStateException(
"Setting the property 'transactionManager' or running in a BeanFactory is required"); "Set the 'transactionManager' property or make sure to run within a BeanFactory " +
"containing a PlatformTransactionManager bean!");
} }
if (getTransactionAttributeSource() == null) { if (getTransactionAttributeSource() == null) {
throw new IllegalStateException( throw new IllegalStateException(