Whether the order number exists requires querying data Generally, validate is not used to verify (it should not be possible) You can write a public service or tool class
jsr is used to verify javabeans. For example, when a user registers, they get a User object with an email attribute in it. You can add @email verification to it. You can use jsr implementation to verify whether the email attribute is in the mailbox format. To determine the order number through annotations, you need to customize the annotations and then write the annotation parser. This is generally not done. Just check the database to see if the mailbox already exists.
Whether the order number exists requires querying data
Generally, validate is not used to verify (it should not be possible)
You can write a public service or tool class
jsr is used to verify javabeans. For example, when a user registers, they get a User object with an email attribute in it. You can add @email verification to it. You can use jsr implementation to verify whether the email attribute is in the mailbox format.
To determine the order number through annotations, you need to customize the annotations and then write the annotation parser. This is generally not done. Just check the database to see if the mailbox already exists.