Monday, February 15, 2010

Exposing RESTful APIs with JAX-RS on Spring

JAX-RS is the way to expose RESTful APIs using Java.

Since JAX-RS is a standard/specification, several implementations exist:
All of them should work with Spring, making it easy for you to use Spring dependency injection and other goodies with JAX-RS methods.

Don't forget to mark the JAX-RS beans as @Scope("request") because REST APIs should be stateless.

There's nothing forbidding you to use Singleton or other scoping though.

1 comment:

Anonymous said...

Keep sharing such ideas in the future as well. This was actually what I was looking for, and I am glad to came here! Thanks for sharing the such information with us. | | | | | | | | | |

Post a Comment

Copyright 2009 Spring vs Java EE Web Dev. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan