.Error creating bean with name ‘YkyServiceImpl’ defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type ‘java.lang.String’ to required type ‘com.mapper.YkyMapper’ for property ‘ykyMapper’; nested exception is java.lang.IllegalStateException: Cannot convert value of type ‘java.lang.String’ to required type ‘com.mapper.YkyMapper’ for property ‘ykyMapper’: no matching editors or conversion strategy found
原因:service层配置时不小心将ref打成了value

改成ref解决。

Spring Boot中service层配置错误:ref vs value 解决
本文讲述了在Spring Boot应用中,服务层配置时将'ykyServiceImpl'的引用误设为value类型引发的ConversionNotSupportedException问题,重点在于如何通过改正ref属性来修复并避免此类初始化bean失败。
876

被折叠的 条评论
为什么被折叠?



