启动ApplicationContext时出错。若要显示条件报告,请在启用“调试”的情况下重新运行应用程序

在启动Spring Boot应用时遇到ApplicationContext启动错误,提示需在调试模式下重新运行以显示条件报告。错误涉及'customerServiceImpl'的依赖问题,具体为'baseMapper'字段的不满足。问题源于mapper扫描未包含所有层级,通过调整启动类扫描配置,确保扫描到主路径下的所有mapper,从而解决问题。
摘要由CSDN通过智能技术生成

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled

在启动springboot项目,突然报以下错误:

2020-08-10 15:54:41.570  WARN 16212 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customerServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.huang.layuimcsmb.bus.mapper.CustomerMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {
   @org.springframework.beans.factory.annotation.Autowired(required=true)}
2020-08-10 15:54:41.573  INFO 16212 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2020-08-10 15:54:41.606  INFO 16212 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2020-08-10 15:54:41.765 ERROR 16212 --- [  restartedMain] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'customerServiceImpl': Unsatisfied dependency expressed through field 'baseMapper'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.huang.layuimcsmb.bus.mapper.CustomerMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {
   @org.springframework.beans.factory.annotation.Autowired(required=true)}
	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:643</
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值