码迷,mamicode.com
首页 > 编程语言 > 详细

spring-boot-starter-web依赖hibernate冲突

时间:2019-12-17 18:12:56      阅读:407      评论:0      收藏:0      [点我收藏+]

标签:error   问题   cloc   one   fine   parameter   cat   api   ber   

引入一个依赖后报错

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘tomcatEmbeddedServletContainerFactory‘ defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.boot.autoconfigure.web.HttpEncodingAutoConfiguration‘: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘spring.http.encoding-org.springframework.boot.autoconfigure.web.HttpEncodingProperties‘: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider

...

Caused by: java.lang.NoClassDefFoundError: org/hibernate/validator/internal/engine/DefaultClockProvider

是由于spring-boot-starter-web里面依赖的hibernate-validator与其他的依赖冲突了,单独加依赖后解决该问题

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.0.Final</version>
</dependency>

spring-boot-starter-web依赖hibernate冲突

标签:error   问题   cloc   one   fine   parameter   cat   api   ber   

原文地址:https://www.cnblogs.com/meadow/p/12055723.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!