您的位置:首页技术文章
文章详情页

springboot2.3之后hibernate-validator依赖缺失【踩坑】

【字号: 日期:2023-04-06 09:54:56浏览:4作者:猪猪

springboot2.3之后,hibernate-validator依赖缺失

今天在写项目的时候,发现@Blank注解没有了,检查了一下,发现老版本springboot内集成的hibernate-validator依赖已经去掉了

如图,当前版本2.4.0的spring-boot-starter-web包

springboot2.3之后hibernate-validator依赖缺失【踩坑】

版本2.1.3

springboot2.3之后hibernate-validator依赖缺失【踩坑】

在网上查阅了一下:

官方解释

解决方法:

在pom文件里手动加入依赖

<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation --><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> <version>2.3.5.RELEASE</version></dependency>

到此这篇关于springboot2.3之后hibernate-validator依赖缺失【踩坑】的文章就介绍到这了,更多相关springboot hibernate-validator依赖缺失内容请搜索好吧啦网以前的文章或继续浏览下面的相关文章希望大家以后多多支持好吧啦网!

标签: Spring
相关文章: