ColdFragrance opened a new issue, #4476:
URL: https://github.com/apache/shenyu/issues/4476
### Question
ShenYu-2.5.0中自定义插件doExecute方法
protected Mono<Void> doExecute(final ServerWebExchange exchange, final
ShenyuPluginChain chain, final SelectorData selector, final RuleData rule) {
Flux<DataBuffer> fluxMap = exchange.getRequest().getBody();
fluxMap.subscribe(dataBuffer -> {
InputStream inputStream = dataBuffer.asInputStream();
try {
byte[] bytes = new byte[0];
bytes = new byte[inputStream.available()];
inputStream.read(bytes);
String body = new String(bytes);
log.info("请求body信息 >> {}", body);
} catch (IOException e) {
e.printStackTrace();
} finally {
if(null != inputStream) {
try {
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
});
return chain.execute(exchange);
}
请求示例curl -X POST http://localhost:9077/flow/one?n=999 -H "Content-Type:
application/json" -H "X-Access-Token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyTmFtZSI6ImFkbWluIiwiZXhwIjoxNjc4MzI0ODAyfQ.9QjlqXGYpXFXR70w3RFCFJ2dcwbrnrY2gTHyiVyF5io"
-d "{\"a\":\"1\",\"b\":\"2\",\"c\":\"3\"}"
当ShenYu-Admin连接oracle时doExecute方法可以打印“请求body信息>>{"a":"1","b":"2","c":"3"}”,但连接mysql时却执行不到fluxMap.subscribe(dataBuffer
-> {})内部。
求解:
1.正常获取body的方法;
2.连接oracle和mysql有何差异
另,连接mysql时Shenyu管理端可以正常使用,但使用oracle时在selector或rule更新时常常报错,举例如下

--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]