Home > Back-end >  Springboot custom annotations and @ valid annotations, why @ valid perform first?
Springboot custom annotations and @ valid annotations, why @ valid perform first?

Time:01-11

 
@ ApiOperation (value="https://bbs.csdn.net/topics/" create/modify user address, notes="according to the id to determine whether to modify, create don't need id")
@ PostMapping ("/upsert ")
@ LoginRequired
Public RespEntity Upsert (@ RequestBody @ Valid UpsertDeliveryAddressReqDTO dto) {
.

The code above, execution order I found out that program first check again UpsertDeliveryAddressReqDTO, then to judge whether or not to login (LoginRequired), if you want to check the login first, should how to write?

CodePudding user response:

online and so on, is very urgent

CodePudding user response:

The most simple processing writes the authentication logic inside the filter to perfect solution

CodePudding user response:

Write the login code, then call
  • Related