RESTEasy Tutorial Part-2: Spring Integration
RESTEasy Tutorial Series
RESTEasy provides support for Spring integration which enables us to expose Spring beans as RESTful WebServices.
Step#1: Configure RESTEasy+Spring dependencies using Maven.
Step#2: Configure RESTEasy+Spring in web.xml
Step#3: Create a Spring Service class UserService and update UserResource to use UserService bean.
Step#4: Same JUnit TestCase to test the REST Webservice described in Part-1.
Otherwise you may get REST Resource instances(UserResource) from RestEasy instead of Spring container. While running JUnit Tests I observed this random behavior.