Does Spring MVC support JSR 311 annotations?

Helping someone else, I noticed that they were trying to do Spring development using @GET , @Consumes and @Path . As far as I understand, these annotations are taken from the JSR-311 specification.

I just assumed that they use the Spring @RequestMapping annotation to map the endpoints to their controller, but I was curious if the W760 MVC (any version) supports JSR 311?

+8
spring rest spring-mvc jax-rs jsr311
source share
1 answer

Short answer: NO . To quote Jürgen Holler :

We look at integration with JAX-RS on a separate basis — separate from Spring’s native MVC endpoint model — perhaps supporting the use of Jersey (JAX-RS RI) with the beans spring style in the context of the Spring web application. Spring 3.0 can do this, depending on the completion of JSR 311 and Jersey in time for Spring 3.0 RC1. Otherwise, he would be a candidate for Spring 3.1.

However, I did not find such support in either 3.0 or 3.1.

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

+12
source share

All Articles