woo202403 opened a new issue, #4414:
URL: https://github.com/apache/servicecomb-java-chassis/issues/4414

   同样的代码,在1.x分支时,就能正常调用。切到2.x就不行
   
   ```java
   @RestSchema(schemaId = "commandProc")
   @RequestMapping(path = "/test", produces = MediaType.APPLICATION_JSON)
   public class CommandImpl implements Command {
   
       @RequestMapping(path = "/cmd1")
       @Override
       public String command1(@RequestParam("cmd") String command) throws 
IOException {
           if (command == null) {
           ....
   ```
   
   微服务配置如下
   ```yaml
   service_description:
     name: hello
     environment: development
     version: 0.0.3
   servicecomb:
     service:
       registry:
         address: http://127.0.0.1:30100
     rest:
       address: 0.0.0.0:8080
   ```
   
   启动后,访问`http://{{IP}}:{{PORT}}/test/cmd1?cmd=xxx`
   
   报错如下:
   ```txt
   [2024-07-15 
20:46:42,960][ERROR][transport-vert.x-eventloop-thread-7][OperationLocator.java][]locate
 path failed, status:Not Found, http method:GET, path:/test/cmd1/, 
microserviceName:hello 
org.apache.servicecomb.common.rest.locator.OperationLocator.locate(OperationLocator.java:72)
   ```
   
   
但访问`http://{{IP}}:{{PORT}}/CommandImpl/command1`,通过POST发送form-data参数,参数名为command时,可正常得到200响应


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to