#
1、SpringBoot2.xHTTP请求配置讲解
简介:SpringBoot2.xHTTP请求注解讲解和简化注解配置技巧
1、@RestController and @RequestMapping是springMVC的注解,不是springboot特有的
2、@RestController = @Controller+@ResponseBody
3、@SpringBootApplication =@Configuration+@EnableAutoConfiguration+@ComponentScan
localhost:8080
2、开发接口必备工具之PostMan接口调试工具
简介:模拟Http接口测试工具PostMan安装和讲解
1、接口调试工具安装和基本使用
2、下载地址:https://www.getpostman.com/
3、SpringBoot基础HTTP接口GET请求
简介:springboot接口,http的get请求,各个注解使用
1、GET请求
1、单一参数@RequestMapping(path = “/{id}”, method = RequestMethod.GET)
1) public String getUser(@PathVariable String id ) {}
2)@RequestMapping(path = “/{depid}/{userid}”, method = RequestMethod.GET) 可以同时指定多个提交方法, getUser(@PathVariable(“depid”) String departmentID,@PathVariable(“userid”) String userid)
3)一个顶俩
- @GetMapping