当前位置:网站首页>注解功能補充
注解功能補充
2022-04-21 07:50:00 【王六六的IT日常】
spring-boot中可以用@validated來校驗數據,如果數據异常則會統一拋出异常,方便异常中心統一處理。
@JsonProperty 此注解用於屬性上,作用是把該屬性的名稱序列化為另外一個名稱,如把trueName屬性序列化為name,@JsonProperty(“name”)。
作用:
1.前端傳參數過來的時候,使用這個注解,可以獲取到前端與注解中同名的屬性 2。後端處理好結果後,返回給前端的屬性名也不以實體類屬性名為准,而以注解中的屬性名為准。
版权声明
本文为[王六六的IT日常]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210639585564.html
边栏推荐
- leetcode题目--386.字典序排数,DFS
- 注解功能补充
- leetcode 59. Spiral matrix II
- Shortcut keys for batch modification of variable name and batch replacement code in idea
- SQLServer的3种分页查询方式sql2000/2008/2012的
- Axure产品原型工具使用笔记
- Assembly language -- Method of memory location
- 设置谷歌浏览器深色黑色背景
- sqlserver 两个表之间进行模糊查询,sqlserver 导入excel数据步骤
- 服务器基本的安全防护设置
猜你喜欢

Shortcut keys for batch modification of variable name and batch replacement code in idea

leetcode 59. Spiral matrix II

PLSQL developer 14 installation details

Axure产品原型工具使用笔记

瑞萨IDE:CS+ for CC进行BootLoader升级时开发环境配置

在vscode 中安装go插件并配置go环境以运行go

MySQL5.7安装操作手册(Centos7)

Understanding of data warehouse ODS, DW and DM concepts in data governance platform

【牛客刷题18】 查找两个字符串a,b中的最长公共子串

从零开始自制实现WebServer(十五)---- 日志库部分完结啦 实用小件DOUBLE-BUFFERING优化异步写入性能
随机推荐
C# asp. Net calling Baidu character recognition interface
EF 去重操作
Testing and Benchmarking
[question 31] create two identical pets
Environment Variables
项目存日志
Time and Duration and Epoch
云服务器使用frp将本机(win10/win11)内网上的apache映射到外网
服务器部署svn环境
Flutter 基础组件的使用
实体类映射一个字段
.net core 将错误抛出写入.txt文件
Shortcut keys for batch modification of variable name and batch replacement code in idea
OmniPlan工具使用手册
压缩毕业时间到20岁以前,5岁上小学上5年,提高人口数量
服务器部署svn环境
php 输出两个指定日期中间的所有时间
Base64 Encoding
STM32系统和自定义bootloader的实现和应用
Regular Expressions