Error starting ApplicationContext. To display the condition evaluation...

在使用SpringBoot+MybatisPlus时,运行启动类时报了这个错误,具体信息是:

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled. 2024-03-17T01:12:42.626+08:00 ERROR 20576 --- [ main] o.s.boot.SpringApplication : Application run failed org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'ddlApplicationRunner' is expected to be of type 'org.springframework.boot.Runner' but was actually of type 'org.springframework.beans.factory.support.NullBean'

根据错误日志显示,Spring Boot 应用程序启动失败
并且报告了 BeanNotOfRequiredTypeException异常。异常的详细信息是:

org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'ddlApplicationRunner' is expected to be of type 'org.springframework.boot.Runner' but was actually of type 'org.springframework.beans.factory.support.NullBean'

这个异常表明名为 'ddlApplicationRunner' 的 Bean
被期望是类型为 'org.springframework.boot.Runner',
但实际上却是类型为 'org.springframework.beans.factory.support.NullBean'。

要解决这个问题,应该检查应用程序的配置和依赖项,尤其是与 'ddlApplicationRunner' 相关的配置。可能存在配置错误或依赖项版本不匹配等问题。

解决办法:

我的SpringBoot的版本是3.2.3,MybatisPlus的版本为3.5.4.1,

把MybatisPlus的版本更改为3.4.3就不报错了

  • 6
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值