首页 > 编程语言 > 详细

springboot(2)-Http协议接口开发

时间:2020-04-04 22:11:41      阅读:123      评论:0      收藏:0      [点我收藏+]
  • @RestController and @RequestMapping是springMVC的注解,不是springboot特有的
  • @RestController = @Controller+@ResponseBody
  • @SpringBootApplication = @Configuration+@EnableAutoConfiguration+@ComponentScan?
  • @GetMapping(path = "/{city_id}/{user_id}")
    @PathVariable("city_id") String cityId,@PathVariable("user_id") String userId
  • @GetMapping(value="/v1/page_user2")
    @RequestParam(defaultValue="0",name="page",required = true) int from, int size
  • @RequestMapping("/v1/save_user")
    @RequestBody User user
  • @PostMapping("/v1/login")
  • @PutMapping("/v1/put")
  • @DeleteMapping("/v1/del")

github代码地址

springboot(2)-Http协议接口开发

原文:https://www.cnblogs.com/xeclass/p/12633738.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!