paxxie2 opened a new issue, #15366:
URL: https://github.com/apache/dubbo/issues/15366

   ### Pre-check
   
   - [x] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo 3.3.1 , java 17, mac os 15.3.2
   
   ### Steps to reproduce this issue
   
   1. proto
   ```
   syntax = "proto3";
   
   option java_multiple_files = true;
   
   package org.apache.dubbo.samples.tri.grpc;
   
   message GreeterRequest {
     string name = 1;
   }
   
   message GreeterReply {
     string message = 1;
   }
   
   service Greeter{
   
     rpc Greet(GreeterRequest) returns (GreeterReply);
   
     rpc BiStream(stream GreeterRequest) returns (stream GreeterReply);
   
     rpc ServerStream(GreeterRequest) returns (stream GreeterReply);
   
   }
   ```
   2. Define server implement, add extra method with Mapping annotation
   ```
   public class TriGreeterImpl extends DubboGreeterTriple.GreeterImplBase {
       private static final Logger LOGGER = 
LoggerFactory.getLogger(org.apache.dubbo.samples.tri.grpc.interop.server.TriGreeterImpl.class);
   
       public TriGreeterImpl() {
       }
   
       @Override
       public GreeterReply greet(GreeterRequest request) {
           LOGGER.info("Server received greet request {}", request);
           return GreeterReply.newBuilder()
                   .setMessage("hello," + request.getName())
                   .build();
       }
       // extra add method
       @Mapping("/test")
       public String test(){
          return "success pax";
       }
   
   }
   ```
   3. Run server and http invoke
   method: Post
   url: 127.0.0.1:50051/org.apache.dubbo.samples.tri.grpc.Greeter/test
   response: 404
   
   
![Image](https://github.com/user-attachments/assets/b97fd976-e999-45ff-8cab-6e557a791493)
   4. When use java interface + pojo, it will be success whith http invoke
   ```
   @DubboService
   public class DemoServiceImpl implements DemoService {
   
       @Override
       public String sayHello(String name) {
           return "Hello " + name;
       }
   
       @Mapping("/test")
       public String test(){
          return "hello pax";
       }
   }
   ```
   
   ### What you expected to happen
   
   Comment  triple proto whether support additional methods to modify with 
mapping annotations
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [x] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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: notifications-unsubscr...@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to