recently took over a new project under development, the result of importing IDEA couldn’t run, error:
Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name ‘servletEndpointRegistrar’ defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: Factory method ‘servletEndpointRegistrar’ threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘healthEndpoint’ defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method ‘healthEndpoint’ parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘healthIndicatorRegistry’ defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthIndicatorAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthIndicatorRegistry]: Factory method ‘healthIndicatorRegistry’ threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration’: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
p>
took a long time to troubleshoot the error, and finally it was found that the resource folder recognition failed. It turns out that when SpringBoot automatically loads configuration files via AutoConfigure, it is necessary to ensure that the resource folder under SRC folder is a resource folder. As shown in , the resource folder will have several small horizontal bar marks in the lower right corner, while the normal folder is not. Right-click on Make Dictionary as and change the normal folder to the resource folder, and the project will start normally.
Read More:
- Record once the solution of gradle dependency problem: failed to determine a suitable driver class
- Failed to determine a suitable driver class error in mybatis
- Failed to determine a suitable driver class
- Loading class `com.mysql.jdbc.Driver‘. This is deprecated. The new driver class is `com.mysql.cj.jdb
- As Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
- Failed to initialize nvml driver / library version mismatch due to automatic update of NVIDIA driver
- Altium designer failed to add class member problem
- Problem solving of failed to read candidate component class in Java
- Ntpdate reported an error when updating the clock, and the problem of no server suitable for synchronization found was solved
- Solution to the problem of spring boot running test class error creating bean with name ‘serverendpoint exporter’ defined
- Error creating bean with name ‘datasource’ defined in class path resource
- java.lang.ClassNotFoundException : com.mysql.jdbc . driver project cannot connect to database, exception, lack of MySQL driver
- Error creating bean with name ‘requestMappingHandlerAdapter‘ defined in class path resource
- Duplicate class com.xxx.xxx Find in modules problem solving (Aidl interdependence problem)
- The solution to the problem that the method of interacting with database in the servlet class is invalid after the servlet submits 404, 500 refresh and becomes 404, and after connecting to the data pool
- Module in linux driver_ platform_ Learning driver macro
- Attempt to reset the display driver and recover from timeout failed
- PHP:Fatal error: Class ‘COM’ not found in … How to deal with the problem
- To solve the problem of flashback of calling class function of glutsolidcube() in Win32 program
- Error:Connection activation Failed: no suitable device found for this connection solution