单元测试的时候 报出: Only one AsyncAnnotationBeanPostProcessor may exist within the context

 

今天在做单元测试的时候,出现了这个问题:

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Only one AsyncAnnotationBeanPostProcessor may exist within the context.
Offending resource: URL [file:/D:/WorkSpace/SMS/module-infrastructure-service/infrastructure-service/target/classes/spring-bean.xml]

 

我把 spring-bean.xml 里面的 

<task:annotation-driven/> 这个给注释了,然后重启,就可以了。至于什么原因,还在思考中
posted @ 2017-03-08 14:00  慕容哲别--  阅读(6745)  评论(0编辑  收藏  举报