附上其中一些错误信息:
基于JAVA SpringBoot2.0.4的项目,放到JDK环境中运行时,提示下列错误:
2019-10-22 10:03:55 [main] WARN o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘defaultValidator’ defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.valueextraction.ValueExtractorManager
解决方案:
(1)原因是使用IDEA2019.2.3版本发部出来的文件中,包含:
javafx.base-11.0.0-20180702.224858-3.jar
javafx.base-11.0.0-20180702.223831-2-linux.jar
javafx.base-11.0.0-20180702.224858-3-mac.jar
去本地仓库删除图下文件
(2)修改设置中的下列地方为你所使用的jdk版本。
ps:其实有个更加简单粗暴的方法就是使用IDEA2018.1版本运行项目也可以解决问题