将Spring Boot升到3.2.0后运行项目报“Invalid value type for attribute ‘factoryBeanObjectType’: java.lang.String”,具体如下。
java.lang.IllegalArgumentException: Invalid value type for attribute 'factoryBeanObjectType': java.lang.String
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getTypeForFactoryBeanFromAttributes(FactoryBeanRegistrySupport.java:86)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:838)
at org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:620)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:573)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:532)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:138)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:775)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:597)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:753)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:455)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:323)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1342)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1331)
at cn.xubingtao.DemoApplication.main(DemoApplication.java:34)
Disconnected from the target VM, address: '127.0.0.1:62508', transport: 'socket'
打断点调试一下,发现报mybatis的问题,查看一下依赖文件“org.mybatis.spring.boot:mybatis-spring-boot-starter”是用3.0.2版,于是查看一下发现已经更新到3.0.3版了。
将mybatis更新到3.0.3版后重新构建即可正常运行项目了。
历史上的今天:
展开阅读全文
上一篇: 解决nginx报“curl: (7) Failed to connect to 172.17.0.2 port 80: Connection refused”
下一篇:解决ssh远程连接Linux服务器报“WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!”