Error starting ApplicationContext. To display the conditions report re-run your application with

网友投稿 323 2022-09-01

Error starting ApplicationContext. To display the conditions report re-run your application with

SpringBoot 项目启动报错,错误信息如下:

=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:D:\JAVA_EE\ideaIU_2018_3_6_win\lib\idea_rt.jar=11566:D:\JAVA_EE\ideaIU_2018_3_6_win\bin -Dfile.encoding=UTF-8 -classpath "D:\Java\jdk_8_windows_x64\jre\lib\charsets.jar;D:\Java\jdk_8_windows_x64\jre\lib\deploy.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\access-bridge-64.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\cldrdata.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\dnsns.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\jaccess.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\jfxrt.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\localedata.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\nashorn.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\sunec.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\sunjce_provider.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\sunmscapi.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\sunpkcs11.jar;D:\Java\jdk_8_windows_x64\jre\lib\ext\zipfs.jar;D:\Java\jdk_8_windows_x64\jre\lib\javaws.jar;D:\Java\jdk_8_windows_x64\jre\lib\jce.jar;D:\Java\jdk_8_windows_x64\jre\lib\jfr.jar;D:\Java\jdk_8_windows_x64\jre\lib\jfxswt.jar;D:\Java\jdk_8_windows_x64\jre\lib\jsse.jar;D:\Java\jdk_8_windows_x64\jre\lib\management-agent.jar;D:\Java\jdk_8_windows_x64\jre\lib\plugin.jar;D:\Java\jdk_8_windows_x64\jre\lib\resources.jar;D:\Java\jdk_8_windows_x64\jre\lib\rt.jar;D:\JAVA_SE\第四阶段\5 Vue\code\vue-ems\vuecrud\target\classes;D:\Java\MavenRepository\org\springframework\boot\spring-boot-starter-web\2.2.5.RELEASE\spring-boot-starter-web-2.2.5.RELEASE.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-starter\2.2.5.RELEASE\spring-boot-starter-2.2.5.RELEASE.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot\2.2.5.RELEASE\spring-boot-2.2.5.RELEASE.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-autoconfigure\2.2.5.RELEASE\spring-boot-autoconfigure-2.2.5.RELEASE.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-starter-logging\2.2.5.RELEASE\spring-boot-starter-logging-2.2.5.RELEASE.jar;D:\Java\MavenRepository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\Java\MavenRepository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\Java\MavenRepository\org\apache\logging\log4j\log4j-to-slf4j\2.12.1\log4j-to-slf4j-2.12.1.jar;D:\Java\MavenRepository\org\apache\logging\log4j\log4j-api\2.12.1\log4j-api-2.12.1.jar;D:\Java\MavenRepository\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\Java\MavenRepository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\Java\MavenRepository\org\yaml\snakeyaml\1.25\snakeyaml-1.25.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-starter-json\2.2.5.RELEASE\spring-boot-starter-json-2.2.5.RELEASE.jar;D:\Java\MavenRepository\com\fasterxml\jackson\core\jackson-databind\2.10.2\jackson-databind-2.10.2.jar;D:\Java\MavenRepository\com\fasterxml\jackson\core\jackson-annotations\2.10.2\jackson-annotations-2.10.2.jar;D:\Java\MavenRepository\com\fasterxml\jackson\core\jackson-core\2.10.2\jackson-core-2.10.2.jar;D:\Java\MavenRepository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.10.2\jackson-datatype-jdk8-2.10.2.jar;D:\Java\MavenRepository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.10.2\jackson-datatype-jsr310-2.10.2.jar;D:\Java\MavenRepository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.10.2\jackson-module-parameter-names-2.10.2.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-starter-tomcat\2.2.5.RELEASE\spring-boot-starter-tomcat-2.2.5.RELEASE.jar;D:\Java\MavenRepository\org\apache\tomcat\embed\tomcat-embed-core\9.0.31\tomcat-embed-core-9.0.31.jar;D:\Java\MavenRepository\org\apache\tomcat\embed\tomcat-embed-el\9.0.31\tomcat-embed-el-9.0.31.jar;D:\Java\MavenRepository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.31\tomcat-embed-websocket-9.0.31.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-starter-validation\2.2.5.RELEASE\spring-boot-starter-validation-2.2.5.RELEASE.jar;D:\Java\MavenRepository\jakarta\validation\jakarta.validation-api\2.0.2\jakarta.validation-api-2.0.2.jar;D:\Java\MavenRepository\org\hibernate\validator\hibernate-validator\6.0.18.Final\hibernate-validator-6.0.18.Final.jar;D:\Java\MavenRepository\org\jboss\logging\jboss-logging\3.4.1.Final\jboss-logging-3.4.1.Final.jar;D:\Java\MavenRepository\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;D:\Java\MavenRepository\org\springframework\spring-web\5.2.4.RELEASE\spring-web-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\spring-beans\5.2.4.RELEASE\spring-beans-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\spring-webmvc\5.2.4.RELEASE\spring-webmvc-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\spring-aop\5.2.4.RELEASE\spring-aop-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\spring-context\5.2.4.RELEASE\spring-context-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\spring-expression\5.2.4.RELEASE\spring-expression-5.2.4.RELEASE.jar;D:\Java\MavenRepository\mysql\mysql-connector-java\5.1.49\mysql-connector-java-5.1.49.jar;D:\Java\MavenRepository\org\mybatis\spring\boot\mybatis-spring-boot-starter\2.1.4\mybatis-spring-boot-starter-2.1.4.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-starter-jdbc\2.2.5.RELEASE\spring-boot-starter-jdbc-2.2.5.RELEASE.jar;D:\Java\MavenRepository\com\zaxxer\HikariCP\3.4.2\HikariCP-3.4.2.jar;D:\Java\MavenRepository\org\springframework\spring-jdbc\5.2.4.RELEASE\spring-jdbc-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\spring-tx\5.2.4.RELEASE\spring-tx-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\mybatis\spring\boot\mybatis-spring-boot-autoconfigure\2.1.4\mybatis-spring-boot-autoconfigure-2.1.4.jar;D:\Java\MavenRepository\org\mybatis\mybatis\3.5.6\mybatis-3.5.6.jar;D:\Java\MavenRepository\org\mybatis\mybatis-spring\2.0.6\mybatis-spring-2.0.6.jar;D:\Java\MavenRepository\com\alibaba\druid\1.2.5\druid-1.2.5.jar;D:\Java\MavenRepository\org\projectlombok\lombok\1.18.12\lombok-1.18.12.jar;D:\Java\MavenRepository\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\Java\MavenRepository\org\springframework\spring-core\5.2.4.RELEASE\spring-core-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\spring-jcl\5.2.4.RELEASE\spring-jcl-5.2.4.RELEASE.jar;D:\Java\MavenRepository\org\springframework\boot\spring-boot-configuration-processor\2.2.5.RELEASE\spring-boot-configuration-processor-2.2.5.RELEASE.jar" VuecrudApplication . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.2.5.RELEASE)2021-07-04 17:34:17.776 INFO 17348 --- [ main] VuecrudApplication : Starting VuecrudApplication on JAVA with PID 17348 (started by Admin in D:\JAVA_SE\第四阶段\5 Vue\code\vue-ems)2021-07-04 17:34:17.783 INFO 17348 --- [ main] VuecrudApplication : No active profile set, falling back to default profiles: default2021-07-04 17:34:17.983 WARN 17348 --- [ main] ionWarningsApplicationContextInitializer : ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.2021-07-04 17:34:35.908 WARN 17348 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [VuecrudApplication]; nested exception is java.lang.IllegalArgumentException: Could not find class [org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration]2021-07-04 17:34:35.916 INFO 17348 --- [ main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2021-07-04 17:34:35.925 ERROR 17348 --- [ main] o.s.boot.SpringApplication : Application run failedorg.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [VuecrudApplication]; nested exception is java.lang.IllegalArgumentException: Could not find class [org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.5.RELEASE.jar:2.2.5.RELEASE] at VuecrudApplication.main(VuecrudApplication.java:11) [classes/:na]Caused by: java.lang.IllegalArgumentException: Could not find class [org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration] at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:332) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.core.annotation.TypeMappedAnnotation.adapt(TypeMappedAnnotation.java:481) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.core.annotation.TypeMappedAnnotation.getValue(TypeMappedAnnotation.java:401) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.core.annotation.TypeMappedAnnotation.asMap(TypeMappedAnnotation.java:286) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.core.annotation.AbstractMergedAnnotation.asAnnotationAttributes(AbstractMergedAnnotation.java:193) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.core.type.AnnotatedTypeMetadata.getAnnotationAttributes(AnnotatedTypeMetadata.java:106) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.AnnotationConfigUtils.attributesFor(AnnotationConfigUtils.java:285) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.AnnotationBeanNameGenerator.determineBeanNameFromAnnotation(AnnotationBeanNameGenerator.java:98) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.AnnotationBeanNameGenerator.generateBeanName(AnnotationBeanNameGenerator.java:77) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:280) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ComponentScanAnnotationParser.parse(ComponentScanAnnotationParser.java:132) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:295) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:249) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:206) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:174) ~[spring-context-5.2.4.RELEASE.jar:5.2.4.RELEASE] ... 13 common frames omittedCaused by: java.lang.ClassNotFoundException: org.springframework.data.jdbc.repository.config.AbstractJdbcConfiguration at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_291] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_291] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) ~[na:1.8.0_291] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_291] at java.lang.Class.forName0(Native Method) ~[na:1.8.0_291] at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_291] at org.springframework.util.ClassUtils.forName(ClassUtils.java:282) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] at org.springframework.util.ClassUtils.resolveClassName(ClassUtils.java:322) ~[spring-core-5.2.4.RELEASE.jar:5.2.4.RELEASE] ... 27 common frames omittedProcess finished with exit

解决方案:

入口类放的位置不对,注意查看文件结构:

正确:

错误:

小区别,很难发现哦!

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:2021 最新 Nginx 常用配置清单
下一篇:Java 中的 BigDecimal,你真的会用吗?
相关文章

 发表评论

暂时没有评论,来抢沙发吧~