hibernate-validator 版本不兼容,Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl解决方案

avatar 2018年05月24日03:21:33 6 13096 views
博主分享免费Java教学视频,B站账号:Java刘哥
  刚才把 SpringBoot 2.0 换成 1.59 版本,报上面的错误 Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl解决方案   可能原因是版本不兼容和依赖冲突 所以,这里先排除自带的包
  1. <dependency>
  2.     <groupId>org.springframework.boot</groupId>
  3.     <artifactId>spring-boot-starter-web</artifactId>
  4.     <!--<version>RELEASE</version>-->
  5.     <exclusions>
  6.         <exclusion>
  7.             <groupId>org.hibernate</groupId>
  8.             <artifactId>hibernate-validator</artifactId>
  9.         </exclusion>
  10.     </exclusions>
  11. </dependency>
  然后添加我们需要的包
  1. <dependency>
  2.     <groupId>javax.validation</groupId>
  3.     <artifactId>validation-api</artifactId>
  4.     <version>1.0.0.GA</version>
  5. </dependency>
  6. <dependency>
  7.     <groupId>org.hibernate</groupId>
  8.     <artifactId>hibernate-validator</artifactId>
  9.     <version>4.3.1.Final</version>
  10. </dependency>
  原文地址: https://www.cnblogs.com/hiscode/p/Could_not_initialize_class_ConfigurationImpl.html
  • 微信
  • 交流学习,有偿服务
  • weinxin
  • 博客/Java交流群
  • 资源分享,问题解决,技术交流。群号:590480292
  • weinxin

发表评论

avatar 登录者:匿名
匿名评论,评论回复后会有邮件通知

  

已通过评论:0   待审核评论数:0