Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
6.0.0
-
None
Description
While attempting to instantiate REST plugin's ContentTypeHandlerManager, the initialization fails with the following error:
org.springframework.beans.factory.UnsatisfiedDependencyExceptionError creating bean with name 'org.apache.struts2.rest.ContentTypeInterceptor': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.apache.struts2.rest.ContentTypeHandlerManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Tested using Spring as the Object Factory.
The issue seems to be present only in struts >= 6.0.0, likely caused by this commit https://github.com/apache/struts/commit/e9d0a5518cd0671d9ad0353a2c87246ef0d2061b
In Struts 2.5.x the bean is injected correctly, as an internal bean.
Attachments
Issue Links
- links to