zoukankan      html  css  js  c++  java
  • spring-boot-starter-web依赖hibernate冲突

    引入一个依赖后报错

    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>
  • 相关阅读:
    代理支持
    CGI
    SSI(服务器端嵌入)
    SSL/TLS 配置
    JSPs
    类加载机制
    JDBC 数据源
    安全管理
    Realm 配置
    Js将序列化成Json格式后日期(毫秒数)转成日期格式
  • 原文地址:https://www.cnblogs.com/meadow/p/12055723.html
Copyright © 2011-2022 走看看