Error starting ApplicationContext. To display the conditions report re-run your application with ‘de
程序员文章站
2022-03-02 14:33:19
...
项目场景:Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.问题的解决
问题描述:
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-10-02 13:18:49.964 ERROR 7280 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Field navigationMapper in com.test.littleapp.controller.NavigationController required a bean of type 'com.test.littleapp.mapper.NavigationMapper' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'com.test.littleapp.mapper.NavigationMapper' in your configuration.
解决方案:
在spring boot Application主文件下加上
@MapperScan("你的mapper包名")
package com.test.littleapp;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@MapperScan("com.test.littleapp.mapper")
public class LittleappApplication {
public static void main(String[] args) {
SpringApplication.run(LittleappApplication.class, args);
}
}
上一篇: linux的python版本切换
下一篇: python 版本切换
推荐阅读
-
SpringBoot报错:Error starting ApplicationContext. To display the conditions report...........
-
springboot错误:Error starting ApplicationContext. To display the conditions report re-run your applica
-
ApplicationContext.To display the conditions report re-run your application with ‘debug‘ enabled
-
springboot启动报错,Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
Error starting ApplicationContext. To display the conditions report re-run your application with ‘de
-
Error starting ApplicationContext. To display the conditions report re-run your application with 'de
-
ApplicationContext.To display the conditions report re-run your application with ‘debug‘ enabled