本文介绍了<任务:注释驱动模式="aspectj"./>在Spring 3.1中不再可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么从Spring 3.1中删除了属性 mode 任务xsd ?它存在于3.0版本中,并且Spring 3.1类中的代码仍在检查属性并找到激活AspectJ模式.

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.

推荐答案

有趣!可能只是一个错误-我推测这是一个错误的原因是因为仍然可以使用@EnableAsync(mode=AdviceMode.ASPECTJ)

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)

这回答了您的部分问题,即为什么代码中仍然存在模式检查-因为可以通过@Configuration进行检查.

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.

这篇关于<任务:注释驱动模式="aspectj"./>在Spring 3.1中不再可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 09:15