|
From: Anthony W. <an...@wh...> - 2014-02-06 20:01:13
|
I have a project that is using RestEasy -- there were 23 resources. The project was using "resteasy.scan.resources=true" in the web.xml. Now, I added another resource. This time, we need Spring. So, I add the resteasy-spring dependency and update the web.xml, according to the docs: http://docs.jboss.org/resteasy/docs/3.0.6.Final/userguide/html/RESTEasy_Spring_Integration.html Now, the boot fails because the "scan" can't coexist with Spring. No problem, I can remove the scan.... But then my original 23 resources are not available. According to the documentation... > "RESTEasy will automatically scan for @Provider and JAX-RS resource annotations on your bean class and register them as JAS-RS resources." It would seem that I need to make the 23 resources Spring beans (Add a @Named annotation, for example), or else manually list them in my web.xml ("resteasy.resources"), or create an Application instance to register them... Ugh... Why can't the RestEasy-Spring bootstrap automatically register the resources annotated with @Path? Or... Why can't the SCAN coexist with Spring again? |