fix
Helius
2022-08-29 5264c0165e3dbdeec367081ea68e18bffc4bd060
src/main/java/cc/mrbird/febs/common/advise/MyRequestBodyAdvise.java
@@ -1,6 +1,7 @@
package cc.mrbird.febs.common.advise;
import cc.mrbird.febs.common.contants.AppContants;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.MethodParameter;
import org.springframework.http.HttpInputMessage;
import org.springframework.http.converter.HttpMessageConverter;
@@ -18,6 +19,9 @@
@ControllerAdvice
public class MyRequestBodyAdvise implements RequestBodyAdvice {
    @Value("${system.debug}")
    private boolean isDebug;
    @Override
    public boolean supports(MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) {
        return true;
@@ -26,7 +30,7 @@
    @Override
    public HttpInputMessage beforeBodyRead(HttpInputMessage inputMessage, MethodParameter methodParameter, Type type, Class<? extends HttpMessageConverter<?>> aClass) throws IOException {
        if(!AppContants.ENCRYPT_METHOD.contains(methodParameter.getMethod().getName())) {
        if(!AppContants.ENCRYPT_METHOD.contains(methodParameter.getMethod().getName()) || isDebug) {
            return inputMessage;
        }