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 2019/12/23 01:32:30 UTC

[GitHub] [servicecomb-java-chassis] sunjinghan7331 commented on issue #1477: 过滤器不生效

sunjinghan7331 commented on issue #1477: 过滤器不生效
URL: https://github.com/apache/servicecomb-java-chassis/issues/1477#issuecomment-568324737
 
 
   我在resources文件夹下新建了META-INF/services/org.apache.servicecomb.common.rest.filter.HttpServerFilter 文件,里面以包名+类名的全路径方式指定了我的过滤器,过滤器类实现了HttpServerFilter,并且在afterReceiveRequest()方法中打印一行控制台信息。
   
   微服务运行后收到请求,日志中有如下信息:
   [2019-12-23 09:21:50,886][INFO][vert.x-eventloop-thread-8][SPIServiceUtils.java][]Found SPI service javax.ws.rs.core.Response$StatusType, count=0. org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.loadSortedService(SPIServiceUtils.java:79)
   [2019-12-23 09:21:50,889][INFO][vert.x-eventloop-thread-8][SPIServiceUtils.java][]Found SPI service org.apache.servicecomb.core.tracing.TraceIdGenerator, count=1. org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.loadSortedService(SPIServiceUtils.java:79)
   [2019-12-23 09:21:50,889][INFO][vert.x-eventloop-thread-8][SPIServiceUtils.java][]  0. org.apache.servicecomb.core.tracing.BraveTraceIdGenerator. org.apache.servicecomb.foundation.common.utils.SPIServiceUtils.loadSortedService(SPIServiceUtils.java:82)
   没有我自定义的过滤器类,同时自定义的过滤器也没有生效。请看一下是什么问题

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


With regards,
Apache Git Services