Jaxrs Application which contains org.springframework.web.servlet.DispatcherServlet, needs for correct mapping of the resource add resource classes into Application subclass getClasses() method.
By jax-rs 2.0 specification "2.3.2 Servlet" the resource classes must be included automatically:
" When an Application subclass is present in the archive, if both Application.getClasses
and Application.getSingletons return an empty collection then all root resource classes and
providers packaged in the web application MUST be included "
This issue is related to JBEAP-8070, but it differs in one extra step needed (adding resource classes into the Application subclass).
See attached reproducer.
- is related to
-
JBEAP-8070 Cannot set servlet-mapping for custom Application subclass
- Closed
- relates to
-
JBEAP-8064 read-resource operation of jaxrs subsystem doesn't work if HttpServletDispatcher is used
- Closed
-
JBEAP-8068 jax-rs doesn't work correctly if HttpServletDispatcher is used and application class doesn't return end-point classes by getClasses method
- Closed