From 8a024662f75e4e2772d4028a9b8999933211e191 Mon Sep 17 00:00:00 2001 From: zhangli <123879394@qq.com> Date: Wed, 30 Jul 2025 01:24:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/sczx/order/config/WebMvcConfig.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/main/java/com/sczx/order/config/WebMvcConfig.java diff --git a/src/main/java/com/sczx/order/config/WebMvcConfig.java b/src/main/java/com/sczx/order/config/WebMvcConfig.java new file mode 100644 index 0000000..7c57e32 --- /dev/null +++ b/src/main/java/com/sczx/order/config/WebMvcConfig.java @@ -0,0 +1,18 @@ +package com.sczx.order.config; + +import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +import java.util.List; + +@Configuration +public class WebMvcConfig implements WebMvcConfigurer { + + @Override + public void configureMessageConverters(List> converters) { + // 确保使用 Jackson 而不是 FastJSON + converters.removeIf(converter -> converter instanceof FastJsonHttpMessageConverter); + } +}