刚才把 SpringBoot 2.0 换成 1.59 版本,报上面的错误
Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl解决方案
可能原因是版本不兼容和依赖冲突
所以,这里先排除自带的包
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-web</artifactId>
- <!--<version>RELEASE</version>-->
- <exclusions>
- <exclusion>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
然后添加我们需要的包
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>4.3.1.Final</version>
- </dependency>
原文地址:
https://www.cnblogs.com/hiscode/p/Could_not_initialize_class_ConfigurationImpl.html
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏