Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. How to Solve
Error Message:
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.
Solution:
Under the main file of spring boot application, add
@MapperScan("Your mapper name")
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);
}
}
Read More:
- [Solved] IDEA Start Maven Project Error: “Error starting ApplicationContext. To display the conditions report …”
- Spring Boot Error starting ApplicationContext. To display the auto-configuration report re-run you
- SpringBoot—Error starting ApplicationContext. To display the auto-configuration report re-run your a
- JUnit test classes error: java.lang.IllegalStateException: Failed to load ApplicationContext
- How to Solve Error: Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
- Feign calls cannot use “_” to report errors [How to Solve]
- Springboot uses Oracle database to report property ‘sqlsessionfactory’ or ‘sqlsessiontemplate’ are required
- [Solved] SpringBoot Error: This application has no explicit mapping for /error,so you are seeing this as a fallback
- Springboot reports an error After adding the import annotation: application failed to start
- [How to Fix]No executorfactory found to execute the application
- How to Solve java server error (java application Run Normally)
- Android startup page (solve the problem of starting black and white screen)
- [Solved] Spring Boot Startup Error: Failed to load property source from location ‘classpath:/application-dev.yml‘
- [Solved] ERROR org.springframework.boot.SpringApplication – Application run failed org.yaml.snakeyaml.scanner
- [Solved] nacos Error: Client not connected,current status:STARTING,StatusRuntimeException
- [Solved] IDEA Error: Error running ‘Application‘: Command line is too long
- Springboot controls the startup of rabbitmq through configuration files
- Java uses class array to report error Exception in thread “main” java.lang.NullPointerException solution
- The number of control threads and concurrency number of concurrent executor of Java starting gun
- [Solved] Nacos Serve Local Startup Error: Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCre