<task:annotation-driven mode=“aspectj” /> no longer possible in Spring 3.1

依然范特西╮ 提交于 2019-12-11 02:36:51

问题


Why was the attribute mode removed from Spring 3.1 task xsd? It's there in 3.0 version, and also the code in Spring 3.1 classes still check for the attribute and activate AspectJ mode is found.


回答1:


Interesting! Could be just a bug - the reason I am speculating this to be a bug is because it is still possible to select the mode via @Configuration using @EnableAsync(mode=AdviceMode.ASPECTJ)

This answers a part of your question, about why the check for mode is still there in the code - because it is possible through @Configuration.




回答2:


It was a bug. Fixed in 3.1.4/3.2.1. Use spring-task-3.0.xsd or spring-task-3.2.xsd as workaround.



来源:https://stackoverflow.com/questions/10357249/taskannotation-driven-mode-aspectj-no-longer-possible-in-spring-3-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!