SpringBoot注解随笔

Spring注解随笔

好记性不如烂笔头



一、Controller

  1. @RestController -所有方法返回都是JSON格式(=@Controller+@Body)
  2. @Autowired -成员变量、方法及构造函数进行标注,自动装配
  3. @RequestMapping -Http 请求的制定路径 可以指定method
  4. @RequestParam -使用在参数上可以将请求参数指定类型

二、Service

三、Mapper

总结

好记性不如烂笔头.个人理解,多多指教

猜你喜欢

转载自blog.csdn.net/qq_35885175/article/details/114287880