You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/12/10 06:59:48 UTC

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #2121: 通过获取request对象获取请求路径报空指针

liubao68 commented on issue #2121:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2121#issuecomment-742285362


   spring boot 项目底层的 RPC 框架是 spring mvc, 而 java chassis 底层的 RPC 框架是完全不一样的, 它不是基于 JSP/Serlvet 协议的。 获取路径的最佳实践是在 Handler 中, 通过 Invocation 读取 `getOperationMeta().getMicroserviceQualifiedName()`。 这个是每一个接口的唯一标识。 在 java chassis中,无法使用 RequestControllerHolder, 这个是 sring mvc RPC 框架特有的。 
   
   这里的[文章介绍](https://docs.servicecomb.io/java-chassis/zh_CN/using-java-chassis-in-spring-boot/using-java-chassis-in-spring-boot/) 可以帮助理解底层运行机制的差异。 
   


----------------------------------------------------------------
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:
users@infra.apache.org