org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax

一、问题现象

报错日志如下

2021-10-14 11:42:52.749947776  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
2021-10-14 11:42:52.749952344 ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
2021-10-14 11:42:52.749957622  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
2021-10-14 11:42:52.749992623   '  |____| .__|_| |_|_| |_\__, | / / / /
2021-10-14 11:42:52.749998196  =========|_|==============|___/=/_/_/_/
2021-10-14 11:42:52.754652753  :: Spring Boot ::        (v2.0.0.RELEASE)
2021-10-14 11:42:52.754679023 
0001-01-01 08:00:00.000000000 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor': Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
2021-10-14 11:42:55.984653643 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1710)

解决方式:

找了很多网络资料,都是这个解决方式,一试果然就好了,可惜不知道为啥,说是版本冲突,但是很笼统,比较迷茫,后续知道了再更新下。

由于hibernate-validator版本兼容问题,导致出现这个错误;

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                <exclusion>
                    <artifactId>hibernate-validator</artifactId>
                    <groupId>org.hibernate.validator</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>6.0.13.Final</version>
        </dependency>
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值