Spring Boot 2.0 hibernate validate 版本冲突导致严重失效

教程分享 > Java教程 > Spring > 博文分享 (9399) 2024-08-07 11:05:25
Spring Boot 2.0 hibernate validate 版本冲突导致验证无效,

​​​​​​​HV000030: No validator could be found for constraint 'javax.validation.constraints.NotEmpty' validating type 'java.lang.String'. Check configuration for 'your filed'"
​​​​​​​

导致问题原因


某个工具jar包中引入的低版本的hibernate-validate依赖
 


解决办法


找到依赖冲突的工具jar包,使用maven的排除标签排除工具类的hibernate依赖使用spring boot 2.0 自带的版本
        <dependency>
            <groupId>your.tool.group</groupId>
            <artifactId>your.tool</artifactId>
            <version>1.0.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-validator</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
 

相关文章
Spring Boot 2.0 hibernate validate 版本冲突导致验证无效,HV000030: No validator could be found for constrain...
Spring Boot validation整合hibernate validator实现数据验证,Spring Boot validation使用说明,Spring Boot validat...
提示:文末提供demo项目下载!!!一、hibernate validate项目创建​ 二、hibernate validate依赖说明$title(pom.xml) &lt;?xml vers...
项目升级到springboot之后,参数校验的注解报错,经过与原项目对比,发现spring-boot-starter-web的依赖项已经去除了依赖原版会有如下: &lt;dependency&g...
@Validated和@Valid注解的使用和区别注解使用框架@Valid 使用Hibernate validation的时候使用;@Validated 仅Spring Validator校验机...
hibernate validator 正则表达式报错HV000030: No validator could be found for constraint 'javax.validation...
Spring Boot 2.0 Redis整合,通过spring boot 2.0整合Redis作为spring缓存框架的实现。
spring boot 2.0 security 5.0 整合,实现自定义表单登录。spring boot 2.0框架使用。
通过之前的一些文章spring boot 2.3 hibernate validate框架未引入-左搜 (leftso.com)Spring boot 参数分组校验-左搜 (leftso.com...
spring validate 验证List集合演示用类User/Addressimport lombok.Data; import javax.validation.constraint...
Value '4320' is not valid duration.Checks Spring boot application .properties configuration files...
Spring Boot 2.0 有哪些新特性_Spring Boot 2.0新功能,在本文中,我们将探讨为Spring Boot 2.0计划的一些更改和功能。我们还会描述这些变化如何帮助我们提高...
1.概要在本Spring boot教程中,我们将学习如何验证发送到PUT/POST API请求的数据BODY