不拦截插件返回内容

master
jay 2024-05-07 12:07:24 +08:00
parent 788fb7a191
commit eaffd21edf
1 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,11 @@ public class ResponseResultHandler implements ResponseBodyAdvice<Object> {
MediaType selectedContentType,
Class<? extends HttpMessageConverter<?>> selectedConverterType,
ServerHttpRequest request, ServerHttpResponse response) {
String requestPath = request.getURI().getPath();
if(requestPath.startsWith("/plugins/")){
return body;
}
if (body instanceof GlobalExceptionHandler.RequestResult) {
GlobalExceptionHandler.RequestResult requestResult = (GlobalExceptionHandler.RequestResult) body;
return new Response(requestResult.getCode(), requestResult.getMessage(),