当前位置:网站首页>@Valid参数校验不生效
@Valid参数校验不生效
2022-07-02 00:26:00 【zhou_zhao_xu】
使用@Valid注解校验参数不生效解决
- 在这里我只引入了validation-api这个jar包
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
解决办法
- 方式一:添加 hibernate-validator
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.6.Final</version>
</dependency>
- 方式二:springboot2.x及以上的直接使用springboot的starter
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
边栏推荐
- 2023款雷克萨斯ES产品公布,这回进步很有感
- leetcode96不同的二叉搜索树
- LeetCode 0241.为运算表达式设计优先级 - DFS
- 时间复杂度与空间复杂度
- Graduation season | Huawei experts teach the interview secret: how to get a high paying offer from a large factory?
- Vue force cleaning browser cache
- UDS bootloader of s32kxxx bootloader
- What does open loop and closed loop mean?
- [QT] test whether QT can connect to the database
- SQL数据分析之流程控制语句【if,case...when详解】
猜你喜欢

Qt5.12.9 migration tutorial based on Quanzhi H3

2022 pinduoduo details / pinduoduo product details / pinduoduo SKU details
![[opencv450] hog+svm and hog+cascade for pedestrian detection](/img/55/cdf0bb8231ee59e34c8d5a9d6def23.png)
[opencv450] hog+svm and hog+cascade for pedestrian detection

回顾数据脱敏系统

Talents come from afar, and Wangcheng district has consolidated the intellectual base of "strengthening the provincial capital"
![Jielizhi, production line assembly link [chapter]](/img/f8/20c41ffe9468d59bf25ea49f73751e.png)
Jielizhi, production line assembly link [chapter]

智能运维实战:银行业务流程及单笔交易追踪

Heketi record

【QT】测试Qt是否能连接上数据库
![Flow control statement of SQL data analysis [if, case... When detailed]](/img/7b/eabb0700936d34a3a145737580be88.png)
Flow control statement of SQL data analysis [if, case... When detailed]
随机推荐
Is it safe to buy funds in a securities account? Where can I buy funds
Download the online video m3u8 tutorial
【CTF】bjdctf_2020_babystack2
[QT] QT cannot find a solution to the compiler using msvc2017
Cmake engineering related
【QT】對於Qt MSVC 2017無法編譯的問題解决
MySQL: the difference between insert ignore, insert and replace
Shell process control
Correlation - intra group correlation coefficient
Relevant settings of wechat applet cache expiration time (recommended)
export default 导出的对象,不能解构问题,和module.exports的区别
九州云与英特尔联合发布智慧校园私有云框架,赋能教育新基建
Pytorch learning record
heketi 记录
Take the enclave Park as a sample to see how Yuhua and Shaoshan play the song of Chang Zhu Tan integrated development
Difficult to get up syndrome (bit by bit greed)
Flow control statement of SQL data analysis [if, case... When detailed]
JS——图片转base码 、base转File对象
When installing mysql, there are two packages: Perl (data:: dumper) and Perl (JSON)
起床困难综合症(按位贪心)