JavaE Eric chan1 分钟阅读303 阅读更新于 2021-05-19 Java 开发API时进行版本控制
摘要控制器 V 1.0.1 @RestController @RequestMapping(headers=version=1.0.1) public class Hello2Controller { @RequestMapping(/hell
控制器 V 1.0.1
@RestController
@RequestMapping(headers=version=1.0.1)
public class Hello2Controller {
@RequestMapping(/hello)
public String index(){
return V2 test 8001;
}
}
默认控制器
@RestController
public class HelloController {
@RequestMapping(/hello)
public String index(){
return test 8001;
}
}
调用 version 放在 headers 里面发送
HTTP GET:
http:
version: 1.0.1