my project is based on springboot 2.1.9.RELEASE
in my project, there is a self-defined AutoCongiuration module in which a bean has properties like
List
and this property is binding to strings declaired in application.yml like
xxx: providers: - com.example.XProvider - com.example.YProvider
and when cacheBeanMetaDate is disabled , it will raise an exception like Description:
Failed to bind properties under 'xxx.providers[0]' to com.example.XProvider:
Property: xxx.providers[0]
Value: com.example.XProvider
Origin: class path resource [application.yml]:31:9
Reason: No converter found capable of converting from type [java.lang.String] to type [com.example.XProvider]
Action: Update your application's configuration
I have already found where the problem is. when cacheBeanMetaDate is disabled, the method named isQualifierMatch in BeanFactoryAnnotationUtils.class will return false due to ((RootBeanDefinition) bd).getResolvedFactoryMethod() is null. and this problem is very similar to https://github.com/spring-projects/spring-boot/commit/b240c810a810c873e84d058614b5d0174591cff9
Comment From: snicoll
@Ivnoidea thanks for the report but Spring Boot 2.1.x
is EOL so you'd have to upgrade to a supported version first (2.4.x
or later). If you can still reproduce the issue, please share a small sample that we can run ourselves.
Comment From: Ivnoidea
@Ivnoidea thanks for the report but Spring Boot
2.1.x
is EOL so you'd have to upgrade to a supported version first (2.4.x
or later). If you can still reproduce the issue, please share a small sample that we can run ourselves.
thanks for your replay, I will try to upgrade springboot's version to 2.4.x or a later one and check whether there is the same problem.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: spring-projects-issues
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.