-
Bug
-
Resolution: Done
-
Major
-
None
-
3.0-beta-1, 2.3.5.Final
-
None
-
None
Resteasy's SpringBeanProcessor does not work correctly with factory-method based beans:
The example in the Spring-XML causes an IllegalStateException "could not find the type for bean named validator".
<bean id="validatorFactory" class="javax.validation.Validation" factory-method="buildDefaultValidatorFactory" /> <bean id="validator" factory-bean="validatorFactory" factory-method="getValidator" />
SpringBeanProcessor is not able to detect the class for bean 'validator', which is required. SpringBeanProcessor supports factory-bean and factory-method attributes, but it does not quite do it right in the example above.
Spring's class attribute defines two things:
- Type of the bean OR
- factory class to be used for a static factory method (if the factory-method attribute is used).
SpringBeanProcessor does not work correctly for the latter because it uses javax.validation.Validation as the factory class where is should use javax.validation.ValidatorFactory (returned type of buildDefaultValidatorFactory)for the factory method getValidator.
- is related to
-
RESTEASY-1241 Spring integration (for Spring Boot) is broken
-
- Closed
-