You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When setting springwolf.enabled=false spring boot application with springwolf generic binding will not start anymore.
Dependencies and versions used
1.8, including springwolf.generic.binding
Code example
Include generic binding jar in the classpath of a spring boot app and set springwolf.enabled=false
Stack trace and error logs
org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'asyncGenericOperationBindingProcessor' defined in class path resource [io/github/springwolf/addons/generic_binding/annotation/configuration/SpringwolfGenericBindingAutoConfiguration.class]: Unsatisfied dependency expressed through method 'asyncGenericOperationBindingProcessor' parameter 0: No qualifying bean of type 'org.springframework.util.StringValueResolver' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
Problem seems to be that SpringwolfGenericBindingAutoConfiguration does not react to the enabled property and will try to create its bean in any case, even if other springwolf beans (in this case StringValueResolverProxy) are not created.
An easy solution would be to add a @ConditionalOnBean(StringValueResolver.class) to the asyncGenericOperationBindingProcessor() method.
Edit: other autoconfigs replicate the @ConditionalOnProperty (and do not use a @ConditionalOnBean), so it makes sense to handle this the same way.
The text was updated successfully, but these errors were encountered:
The change is staged for release and will be part of the next release.
If you want to try and verify it in your application today,
use the latest 1.X.0-SNAPSHOT build as described in our README.md > Testing SNAPSHOT version
Describe the bug
When setting springwolf.enabled=false spring boot application with springwolf generic binding will not start anymore.
Dependencies and versions used
1.8, including springwolf.generic.binding
Code example
Include generic binding jar in the classpath of a spring boot app and set springwolf.enabled=false
Stack trace and error logs
Problem seems to be that SpringwolfGenericBindingAutoConfiguration does not react to the enabled property and will try to create its bean in any case, even if other springwolf beans (in this case
StringValueResolverProxy
) are not created.An easy solution would be to add a
@ConditionalOnBean(StringValueResolver.class)
to theasyncGenericOperationBindingProcessor()
method.Edit: other autoconfigs replicate the
@ConditionalOnProperty
(and do not use a@ConditionalOnBean
), so it makes sense to handle this the same way.The text was updated successfully, but these errors were encountered: