Spring boot 报Add an implement,such as Hibernate Validator, to the classpath

spring boot 版本1.4.7.RELEASE
1.启动报错如下:
ationConfigEmbeddedWebAp ationConfigEmbeddedWebAp o. s. b. d. LoggingFai1ureAn
APPLICATION FAILED TO START
Description :
The Bean Validation API is on the classpath but no implementation could be found
Action : Add an implementation, such as Hibernate Validator, to the classpeth

2.报错分析
Hibernate Validator的加载问题,查看maven库Hibernate-validator-5.2.5.final.jar存在;
执行mvn clean,mvn install.
工程构建失败,提示如下:

18T12: 54: 41+08: oo 
file "pom.xml" could not be activated because it does not exist. 
oa1 org.apache.maven.plugins:maven-compi1er-p1ugin:3.1:compi1e (default-compile) on project demo: Compilation failure: Compilation fai invalid LOC header (bad signature) 
sitory\org\hibernate\hibernate validator\5.2.5. Final\hibernate validator-5.2.5.Fina1.jar 
src/main/java.com/example/ft1/FreeMa rke rConfig. java : [8 , 17] 
org.junit 
Ck trace of the errors, re-run Maven with the 
-e switch. 
the -X switch to enable full debug logging. 

上面提示推测还是Hibernate-validator-5.2.5.final.jar的问题
3.解决方案
a.在本地maven库中删除Hibernate-validator包下的所有文件,重新下载这个包
b.执行mvn install,构建成功

你可能感兴趣的:(Spring boot 报Add an implement,such as Hibernate Validator, to the classpath)