Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Common comments on spring

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

1. @ JsonInclude (Include.NON_NULL)

/ / place the tag on the attribute, and do not participate in serialization if the attribute is NULL

/ / if you put it on top of the class, it has an effect on all the properties of the class

/ / Include.Include.ALWAYS default

/ / Include.NON_DEFAULT attribute is default and not serialized

/ / the Include.NON_EMPTY attribute is empty ("") or NULL is not serialized.

/ / the Include.NON_NULL attribute is NULL and is not serialized

2. @ NotNull @ Length

@ NotNull (message = "user name cannot be empty")

@ Length (min=5, max=20, message= "user name length must be between 5-20")

@ Pattern (regexp = "^ [a murz Amurz ZZ]\\ w {4jue 19} $", message = "user name must begin with an alphanumeric underscore and can be composed of an alphanumeric underscore")

Private String username

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report