Add exception-handler attribute support for AspectJ
Previously, the exception-handler attribute was not taken care of when task:annotation-driven is used in AspectJ mode. This commit provides the expected behavior. Issue: SPR-12619
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -115,6 +115,10 @@ public class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParse
|
||||
if (StringUtils.hasText(executor)) {
|
||||
builder.addPropertyReference("executor", executor);
|
||||
}
|
||||
String exceptionHandler = element.getAttribute("exception-handler");
|
||||
if (StringUtils.hasText(exceptionHandler)) {
|
||||
builder.addPropertyReference("exceptionHandler", exceptionHandler);
|
||||
}
|
||||
parserContext.registerBeanComponent(new BeanComponentDefinition(builder.getBeanDefinition(),
|
||||
TaskManagementConfigUtils.ASYNC_EXECUTION_ASPECT_BEAN_NAME));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user