Caused by: java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider
at org.hibernate.validator.internal.engine.ConfigurationImpl.<init>(ConfigurationImpl.java:134) ~[hibernate-validator-6.0.7.Final.jar:6.0.7.Final]
at org.hibernate.validator.internal.engine.ConfigurationImpl.<init>(ConfigurationImpl.java:107) ~[hibernate-validator-6.0.7.Final.jar:6.0.7.Final]
at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:33) ~[hibernate-validator-6.0.7.Final.jar:6.0.7.Final]
这个是缺哪个jar包啊
其实可以复制org/hibernate/validator/internal/engine/DefaultClockProvider这段错误信息放到百度或者谷歌去索搜解决办法
教你一个解决问题的办法:
看到NoClassDefFoundError错误一般都是jar包冲突或者jar包版本不正确
Caused by: java.lang.NoClassDefFoundError:
jar冲突:hibernate-validator-6.0.7.Final.jar包里面跟其他jar里面存在hibernate-validator冲突
解决办法:在pom.xml文件中配置如下依赖:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
</exclusion>
</exclusions>
</dependency>
不是都写了吗,hibernate-validator-6.0.7.Final.jar。如果是用intellij的话可能jar包是有的但是环境没配,配置一下