11
13693261870
2024-11-11 138b959cc11dc9a73b0c766030b99ba1180d8650
src/main/java/com/se/simu/config/WebConfig.java
@@ -13,17 +13,9 @@
import java.util.ArrayList;
import java.util.List;
/**
 * Web配置类
 *
 * @author WWW
 * @date 2024-07-17
 */
@Configuration
@SuppressWarnings("ALL")
public class WebConfig extends WebMvcConfigurationSupport {
    /**
     * 跨域请求
     */
    @Override
    protected void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
@@ -35,9 +27,6 @@
                .maxAge(3600);
    }
    /**
     * 处理json格式,值null的转换为""
     */
    @Override
    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
        FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
@@ -48,7 +37,6 @@
                SerializerFeature.WriteNullStringAsEmpty,
                SerializerFeature.WriteNullNumberAsZero,
                SerializerFeature.WriteNullBooleanAsFalse);
        // 结果是否格式化,默认为false
        //SerializerFeature.PrettyFormat);
        List<MediaType> supportedMediaTypes = new ArrayList<>();