HoyerIsAlexander commented on issue #1252: 怎么定义Annotation才能在Hanlder中获取到
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/1252#issuecomment-507146982
 
 
   
我们服务结构是edge-apigateway-rpc,希望在edge上统一完成越权的校验,servicecomb对于edge的定义也包括统一的认证鉴权,而不需要在每个apigateway或者rpc上
   
   我们的Rest接口在ApiGateWay上定义
   
   比如一个RestSchema
   
   HelloApi
   {
       @RequireRole(“admin”)//只有admin角色可以访问
       @Get
       @Path(“/hello”) 
       sayHello();
   }
   
   
通过edge访问/hello,在edge的handler中通过invocation.getOperationMeta().getMethod()获取到Method信息,但是method中annotation数据为空;
   
   spring security也有考虑,但是也需要在edge上获取到注解的信息才能完成在edge的统一鉴权;
   

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