Introduction to JSR 303-bean Validation and best practicesThe JSR 303–bean Validation is a data validation specification that determines the final scenario in November 2009. December 2009 Java EE 6 was released, and Bean Validation was included as
The JSR 303–bean Validation is a data validation specification that determines the final scenario in November 2009. December 2009 Java EE 6 was released, and Bean Validation was included as an important feature. This article introduces the main
One:JSR 303 is a sub-specification in Java EE 6, called the Bean Validation, and the official reference implementation is Hibernate Validator, which has nothing to do with hibernate ORM. JSR 303 is used to validate the value of a field in a Java
The JSR 303–bean Validation is a data validation specification that determines the final scenario in November 2009. December 2009 Java EE 6 was released, and Bean Validation was included as an important feature. This article introduces the main
In the project, most of the front-end checks are used, such as the JS check in the page and the form form using the bootstrap checksum. However, for higher security requirements, it is recommended to verify on the service side.Service-side check:
First, the jar to be used when preparing the calibrationVALIDATION-API-1.0.0.GA.JAR:JDK interface;Hibernate-validator-4.2.0.final.jar is the realization of the above interface;Second, write the bean to be verified1 @NotNull (message= "name cannot be
HTTP error Code table all HTTP status codes and their definitions.Code indication2XX success200 normal; The request is complete.201 Normal; Immediately after the POST command.202 normal; Accepted for processing, but processing is not yet complete.203
(1-word head)This type of status code, on behalf of which the request has been accepted, needs to be processed. This type of response is a temporary response that contains only the status line and some optional response header information and ends
HTTP RequestThe client requests access to the resource to the server by sending an HTTP request. The HTTP request consists of three parts: the request line, the message header, and the request for essay.3.1. Request LineThe request line begins with
Some common HTTP status codes are:200– server successfully returned to Web page404– The requested page does not exist503– Service Not availableCommon HTTP status Code Daquan1XX (Temporary response)A status code that represents a temporary response
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.