Springmvc study notes 5

Some common notes

@Controller: annotation class is class control layer.

 @RequestMapping: mark the requested address

 

 

 

 @ResponseBody: The java object into json object.

 

 

 

 @Valid: labeling the parity data

 

 

 

 @PathVariable: accepts uri parameter value assigned address method

 

 

 

 Save property in @SessionAttributes braces to session scope

 

 

@RequestParam request parameters

 

 

@ExceptionAdvice: labeling a class Exception class

@ExceptionHandler: labeling method is a method for exception handling.

 

@InitBinder: processing date and time parameters

 

 

Guess you like

Origin www.cnblogs.com/szxbuyaneryu/p/11469759.html
Recommended