当前位置:网站首页>@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>
边栏推荐
- Comprehensive usage and case questions of sub query of SQL data analysis [patient sorting]
- Leetcode 96 différents arbres de recherche binaires
- Jielizhi, production line assembly link [chapter]
- [CTF] bjdctf 2020 Bar _ Bacystack2
- What is the purpose of ERP project implementation plan?
- [QT] test whether QT can connect to the database
- Shell process control
- Timer和ScheduledThreadPoolExecutor的区别
- Vue force cleaning browser cache
- What does open loop and closed loop mean?
猜你喜欢

关联性——组内相关系数

【QT】對於Qt MSVC 2017無法編譯的問題解决

2022 pinduoduo details / pinduoduo product details / pinduoduo SKU details

牛客-练习赛101-推理小丑

heketi 记录

JS -- image to base code, base to file object

leetcode96不同的二叉搜索树

Export default the exported object cannot be deconstructed, and module Differences between exports

数据分析方法论与前人经验总结【笔记干货】

It's nothing to be utilitarian!
随机推荐
Leetcode96 different binary search trees
Example explanation: move graph explorer to jupyterlab
What is ThreadLocal memory leak and how to solve it
GaussDB(for MySQL) :Partial Result Cache,通过缓存中间结果对算子进行加速
Selectively inhibiting learning bias for active sampling
When installing mysql, there are two packages: Perl (data:: dumper) and Perl (JSON)
Pytorch learning record
Flow control statement of SQL data analysis [if, case... When detailed]
Difficult to get up syndrome (bit by bit greed)
How to improve data quality
[QT] qtcreator uninstall and installation (abnormal state)
Vue force cleaning browser cache
微信小程序缓存过期时间的相关设置(推荐)
在证券账户上买基金安全吗?哪里可以买基金
下载在线视频 m3u8使用教程
Leetcode 96 différents arbres de recherche binaires
Barbie q! How to analyze the new game app?
PWN attack and defense world cgpwn2
Is it safe for qiniu college to open an account? How to open an account?
Using multithreaded callable to query Oracle Database