@@ -24,7 +24,6 @@ import org.springframework.context.annotation.ImportAware;
|
||||
import org.springframework.core.annotation.AnnotationAttributes;
|
||||
import org.springframework.core.type.AnnotationMetadata;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
/**
|
||||
@@ -50,8 +49,10 @@ public abstract class AbstractTransactionManagementConfiguration implements Impo
|
||||
public void setImportMetadata(AnnotationMetadata importMetadata) {
|
||||
this.enableTx = AnnotationAttributes.fromMap(
|
||||
importMetadata.getAnnotationAttributes(EnableTransactionManagement.class.getName(), false));
|
||||
Assert.notNull(this.enableTx,
|
||||
"@EnableTransactionManagement is not present on importing class " + importMetadata.getClassName());
|
||||
if (this.enableTx == null) {
|
||||
throw new IllegalArgumentException(
|
||||
"@EnableTransactionManagement is not present on importing class " + importMetadata.getClassName());
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired(required = false)
|
||||
|
||||
Reference in New Issue
Block a user