SpringBoot注解随笔 其他 2021-03-06 03:05 0 阅读 Spring注解随笔 好记性不如烂笔头 文章目录 Spring注解随笔 一、Controller 二、Service 三、Mapper 总结 一、Controller @RestController -所有方法返回都是JSON格式(=@Controller+@Body) @Autowired -成员变量、方法及构造函数进行标注,自动装配 @RequestMapping -Http 请求的制定路径 可以指定method @RequestParam -使用在参数上可以将请求参数指定类型 二、Service 三、Mapper 总结 好记性不如烂笔头.个人理解,多多指教 猜你喜欢