Details
-
Improvement
-
Resolution: Fixed
-
Major
-
1.9 M2
-
None
-
Unknown
-
Description
Currently the REST subsystem "discovers" available resources by using parameters declared in the web.xml, i.e., the list of available resources is hard-coded in the web.xml.
The component manager could be used for this task: JAXRS resources and providers could be declared as @Components and discovered on the fly using the component manager. In this way the REST API could be extended just by throwing a jar containing the new component-resources in WEB-INF/lib and not touching anything else.
Moreover component-resources could benefit of automatic injection to retrieve useful XWiki components needed for their logic.