开发者社区> 问答> 正文

springboot项目 配置启动失败TypeNotPresentException


java.lang.TypeNotPresentException: Type javax.validation.ValidationException not present



at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:117) ~[na:1.8.0_191]

at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125) ~[na:1.8.0_191]

at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_191]

at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:68) ~[na:1.8.0_191]

at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:138) ~[na:1.8.0_191]

at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49) ~[na:1.8.0_191]

at sun.reflect.generics.repository.ClassRepository.getSuperclass(ClassRepository.java:90) ~[na:1.8.0_191]

at java.lang.Class.getGenericSuperclass(Class.java:777) ~[na:1.8.0_191]

at org.springframework.core.ResolvableType.getSuperType(ResolvableType.java:467) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]

at org.springframework.core.ResolvableType.as(ResolvableType.java:456) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]

at org.springframework.core.ResolvableType.forClass(ResolvableType.java:1041) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]

at org.springframework.boot.diagnostics.AbstractFailureAnalyzer.getCauseType(AbstractFailureAnalyzer.java:56) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.diagnostics.AbstractFailureAnalyzer.analyze(AbstractFailureAnalyzer.java:33) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.diagnostics.FailureAnalyzers.analyze(FailureAnalyzers.java:111) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.diagnostics.FailureAnalyzers.reportException(FailureAnalyzers.java:104) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.SpringApplication.reportFailure(SpringApplication.java:827) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:812) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]

at com.paperx.bgserver.BgserverApplication.main(BgserverApplication.java:20) [classes/:na]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_191]

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_191]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_191]

at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_191]

at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.3.0.RELEASE.jar:2.3.0.RELEASE]

展开
收起
佚名4918 2021-10-19 14:51:01 1810 0
1 条回答
写回答
取消 提交回答
  • 网络规划设计师、敏捷专家、CISP、ITSS服务经理、ACA全科目、ACP4项、ACE、CBP、CDSP、CZTP等。拥有 PRINCE2 Foundation/Practitioner、CCSK、ITIL、ISO27001、PMP等多项国际认证。 专利5+、期刊10+、知识产权师。核心期刊审稿人。

    您好,该问题的产生是springboot在启动时对配置的校验进行预校验,例如发现数据库连接不上之类的问题就会报该错误。

    2021-10-19 14:54:20
    赞同 1 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
使用Spring.Initializr定制工程脚手架 立即下载
陈曦:使用Spring.Initializr定制工程脚手架 立即下载
Java Spring Boot开发实战系列课程(第17讲):Spring Boot 2.0实战Docker容器Linux 立即下载

相关实验场景

更多