Spring XML相当于@EnableAsync [英] Spring XML equivalent of @EnableAsync

查看:1003
本文介绍了Spring XML相当于@EnableAsync的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从XML打开Spring的Async配置?我看到的所有示例都使用程序化上下文声明并使用 @EnableAsync

Is there a way to turn on Spring's Async configuration from XML? All the examples I saw are using programmatic context declaration and use @EnableAsync

是否存在与此类似的XML。在某些地方,我看到< context:annotation-config /> 正在使用,但是这并未提及有关异步的任何内容。

Is there an XML equivalent for this. In some places I saw <context:annotation-config /> being used, but this doesn't mention anything about async .

我使用的是Spring 4.

I am using Spring 4.

推荐答案

你尝试过使用这个吗?

<task:annotation-driven /> 

这篇关于Spring XML相当于@EnableAsync的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆