1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-25 02:27:10 +08:00

修正更新版本的 spring-boot-starter-web 依赖中不再有 hibernate-validator 包

This commit is contained in:
TommyMerlin 2021-06-09 22:29:46 +08:00
parent 075488375d
commit 55af506dbd

View File

@ -409,6 +409,8 @@ class WebSite {
SpringBoot 项目的 spring-boot-starter-web 依赖中已经有 hibernate-validator 包,不需要引用相关依赖。如下图所示(通过 idea 插件—Maven Helper 生成):
**注**:更新版本的 spring-boot-starter-web 依赖中不再有 hibernate-validator 包如2.3.11.RELEASE需要自己引入 `spring-boot-starter-validation` 依赖。
![](https://guide-blog-images.oss-cn-shenzhen.aliyuncs.com/2021/03/c7bacd12-1c1a-4e41-aaaf-4cad840fc073.png)
非 SpringBoot 项目需要自行引入相关依赖包,这里不多做讲解,具体可以查看我的这篇文章:《[如何在 Spring/Spring Boot 中做参数校验?你需要了解的都在这里!](https://mp.weixin.qq.com/s?__biz=Mzg2OTA0Njk0OA==&mid=2247485783&idx=1&sn=a407f3b75efa17c643407daa7fb2acd6&chksm=cea2469cf9d5cf8afbcd0a8a1c9cc4294d6805b8e01bee6f76bb2884c5bc15478e91459def49&token=292197051&lang=zh_CN#rd)》。