控制器 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://localhost:8001/hello
version: 1.0.1