lovefu commented on issue #1446: 请求的URL中存在冒号报错490
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/1446#issuecomment-565349088
 
 
   你好,这是我测试的例子,是支持url带冒号的,你看看:
   
demo地址:https://github.com/apache/servicecomb-java-chassis/tree/master/demo/demo-edge
   
   1、修改url为带冒号格式
   @RequestMapping(path = "/x:{x}/y:{y}/add", method = RequestMethod.GET)
     public ResultWithInstance add(@PathVariable("x") int x, @PathVariable("y") 
int y) {
       return ResultWithInstance.create(x + y);
     }
   
   2、修改microservice.yaml微服务版本,接口有变更时,需要增加版本
   APPLICATION_ID: edge
   service_description:
     name: business
     version: 1.1.2
   
   3、访问http://127.0.0.1:8090/business/v1/x:1/y:2/add,能正常返回
   {
       "result":3,
       "serviceId":"xxx...",
       "instanceId:"xxx...",
       "version":"1.1.2"
   }

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to