-
springboot(2)-Http协议接口开发
- @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代码地址
-
相关阅读:
定义类和类的实例化
python学习第二天-文件的读写
python学习第二天 pyhon字符串操作
PYTHON的元组和字典丶深拷贝丶浅拷贝丶集合的常用操作方法
python 数组的常识操作和切片
Python字符串、集合练习_密码校验
Python字典练习_注册校验
获取随机的字符串
PHP 阿拉伯数字转中文表述
小程序发送验证码倒计时
-
原文地址:https://www.cnblogs.com/xeclass/p/12633738.html
Copyright © 2020-2023
润新知