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>
  • 相关阅读:
    sh脚本学习笔记
    idea常见快捷键
    linux操作命令笔记
    【题解】[国家集训队]圈地计划
    【题解】[国家集训队]happiness
    【题解】小M的作物
    cpu的MMU
    socat命令
    strace命令
    Linux的文件描述符
  • 原文地址:https://www.cnblogs.com/meadow/p/12055723.html
Copyright © 2011-2022 走看看