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

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

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

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

springboot2.3之后hibernate-validator依赖缺失【踩坑】_第1张图片

版本2.1.3

springboot2.3之后hibernate-validator依赖缺失【踩坑】_第2张图片

在网上查阅了一下:

官方解释

解决方法:

在pom文件里手动加入依赖



  org.springframework.boot
  spring-boot-starter-validation
  2.3.5.RELEASE

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

你可能感兴趣的:(springboot2.3之后hibernate-validator依赖缺失【踩坑】)