SpringBoot3集成MybatisPlus报错:Bean named ‘ddlApplicationRunner‘ is expected to be of type ‘org.springfr

最近在使用SpringBoot3集成MybatisPlus时出现如下错误:Bean named 'ddlApplicationRunner' is expected to be of type 'org.springframework.boot.Runner' but was actually of type 'org.springframework.beans.factory.support.NullBean'

解决办法

把myBatisplus的版本升级到3.5.5就完美解决了

如果修改完MybatisPlus后出现如下错误:org.springframework.beans.factory.BeanDefinitionStoreException

此时更改spring-boot-starter-parent的版本改成3.1.x即可

错误原因

在某些版本中,Spring 可能对 NullBean 的处理有所不同。新版本可能提供了更好的类型适配和错误处理机制。

posted @ 2025-01-06 17:34  熊文豪1  阅读(17)  评论(0)    收藏  举报  来源