Reputation: 3859
Is it possible to apply a Spring handler interceptor or something similar to a Jersey Restful service? The Jersey service is built with Spring and is inside a Spring @Component?
I noticed that Spring allows the use of handler interceptors for controllers but cant find anything to work with my Jersey-Rest component
Thanks
Upvotes: 2
Views: 3889
Reputation: 5721
I faced a similar problem and this how I solved it in Jersey. This works similar to HandleInterceptor of Spring.
Upvotes: 0
Reputation: 1000
Jersey comes with its own servlet and therefore is pretty much outside of Spring MVC, which the Interceptors are part of. You can either:
This guy here did a great job summing up the nuts and bolts: http://www.mkyong.com/webservices/jax-rs/jersey-spring-integration-example/
Upvotes: 3