You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/09/02 03:14:57 UTC
[GitHub] [skywalking] zhaoyuguang edited a comment on issue #3392: Webflux
plugin throw ClassCastException when defining a filter
zhaoyuguang edited a comment on issue #3392: Webflux plugin throw ClassCastException when defining a filter
URL: https://github.com/apache/skywalking/issues/3392#issuecomment-526986615
`ServerWebExchange` is a Interface
![image](https://user-images.githubusercontent.com/10150229/64087987-e2b4a980-cd71-11e9-8e65-7c6106e557c6.png)
now SkyWalking Webflux Plugin only enhance `DefaultServerWebExchange`
In this case the interceptor `DispatcherHandlerHandleMethodInterceptor` throw `ClassCastException`
![image](https://user-images.githubusercontent.com/10150229/64088028-1db6dd00-cd72-11e9-86f5-6cd1e7dd6d0f.png)
Because DefaultServerWebExchange at `delegate`
After we use
```java
public class DefaultServerWebExchangeInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
@Override
protected ClassMatch enhanceClass() {
return byHierarchyMatch(new String[] {"org.springframework.web.server.ServerWebExchange"});
}
......
}
```
The enhance class inner look like:
![image](https://user-images.githubusercontent.com/10150229/64087659-8d2bcd00-cd70-11e9-9b22-111b040c4718.png)
![image](https://user-images.githubusercontent.com/10150229/64087964-d0d30680-cd71-11e9-89ca-8dce6a55d351.png)
----------------------------------------------------------------
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