單元測試的時候 報出: 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/> 這個給注釋了,然后重啟,就可以了。至於什么原因,還在思考中


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM