Spring

1:

常用注解:
@RequestMapping
RequestMapping是一个用来处理请求地址映射的注解,可用于类或方法上。用于类上,表示类中的所有响应请求的方法都是以该地址作为父路径。
@ResponseBody
@RequestBody
@PathVariable
@RequestParam
@Controller
@Service
@Component
@Repository
@SuppressWarnings

里使用了@PathVariable绑定输入参数,非常适合Restful风格。因为隐藏了参数与路径的关系,可以提升网站的安全性,静态化页面,降低恶意攻击风险。

原文地址:https://www.cnblogs.com/qwer113/p/9432265.html