springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

03-11 阅读 0评论

这个问题产生是因为我这边springboot由3.1.5升级为3.2.0时报的错。

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String,springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,比较,第1张
(图片来源网络,侵删)

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

定位思路直接进行debug:

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

debug能看到一些报错的bean信息:

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

通过这里应该能看到是mybatils出问题了。

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String,springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,比较,第5张
(图片来源网络,侵删)

定位到原因就好办了,那就进行处理:

1、由于使用了mybatils,所以首先想到的应该是

mybatis-spring 这个包版本应该比较低,造成不支持springboot3.2.

2、由于我这边用的是mybatilsplus,其实可以暂缓升级3.2,等待一段时间,升级mybatilsplus就可以了,目前mybatilsplus的mybatis-spring是2.1.1,比较低,我相信,mybatilsplus很快会升级上来。

如果你是springboot3+建议使用该依赖坐标即可解决:

    com.baomidou
    mybatis-plus-spring-boot3-starter
    3.5.5

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

3、自行如何解决呢?也比较简单,排查mybatilsplus自带的mybatils-spring,重新引入即可:

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String,springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String,词库加载错误:未能找到文件“C:\Users\Administrator\Desktop\火车头9.8破解版\Configuration\Dict_Stopwords.txt”。,使用,比较,第7张
(图片来源网络,侵删)

springboot由3.1.5升级到3.2.0 报Invalid value type for attribute ‘factoryBeanObjectType‘: java.lang.String

到这里就解决了。

再补充下,造成这个原因不一定是mybatils问题,也有可能是其他组件,建议自行定位,目前我了解的一个是mybatils和spring-data、springcloud,大家遇到都验证下,升级到最新版本就可以了


免责声明
本网站所收集的部分公开资料来源于AI生成和互联网,转载的目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。
文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

发表评论

快捷回复: 表情:
评论列表 (暂无评论,人围观)

还没有评论,来说两句吧...

目录[+]