美文网首页
SpringBoot中的@RequestMapping和@Req

SpringBoot中的@RequestMapping和@Req

作者: 随风而行之青衫磊落险峰行 | 来源:发表于2018-03-16 15:54 被阅读253次

@RequestMapping

  1. @RequestMapping 是一个用来处理请求地址映射的注解,可用于类或方法上
  2. 用于类上,表示类中的所有响应请求的方法都是以该地址作为父路径
  3. 用于方法上,表示在类的父路径下追加方法上注解中的地址将会访问到该方法

@RequestBody

@RequestBody 调用MappingJackson2HttpMessageConverter,因此肯定是json方式传递

https://segmentfault.com/q/1010000012669636/a-1020000012671612

http://snowolf.iteye.com/blog/1628861

相关文章

网友评论

      本文标题:SpringBoot中的@RequestMapping和@Req

      本文链接:https://www.haomeiwen.com/subject/ymiqxftx.html