-
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代码地址
-
相关阅读:
递归函数底层原理浅析
lambda expression & mutable
命令mv
printf的参数
程序结构之静态本地变量
汇编.align指令
程序结构之全局变量
命令touch
更改gcc默认版本,实现gcc版本升降级
命令chmod
-
原文地址:https://www.cnblogs.com/xeclass/p/12633738.html
Copyright © 2020-2023
润新知