且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Spring MVC是否支持JSR 311注释?

更新时间:2023-01-17 08:35:57

简短答案:.引用 Juergen Hoeller :>

Short answer: NO. To quote Juergen Hoeller:

我们正在考虑在独立的基础上与JAX-RS集成-与Spring MVC自己的端点模型分开-可能支持在Spring Web应用程序上下文中将Jersey(JAX-RS RI)与Spring风格的bean一起使用.这取决于Spring 3.0 RC1的JSR 311和Jersey的最终确定时间,这也可能使Spring 3.0成为可能.否则,它将成为Spring 3.1的候选人.

We're considering integration with JAX-RS on a separate basis - separate from Spring MVC's own endpoint model -, possibly supporting the use of Jersey (the JAX-RS RI) with Spring-style beans in a Spring web application context. This might make Spring 3.0 as well, depending on the finalization of JSR 311 and Jersey in time for Spring 3.0 RC1. Otherwise it would be a candidate for Spring 3.1.

但是我在3.0和3.1中都没有找到这种支持.

However I haven't found such a support neither in 3.0 nor in 3.1.

当然,您可以集成Apache CXF之类的框架并使用标准的JSR-311注释. Spring MVC本身无法识别这些注释.

Of course you can integrate frameworks like Apache CXF and use standard JSR-311 annotations. Spring MVC itself does not recognize these annotations.