Blame view

src/main/java/com/huaheng/common/config/FastJsonConfig.java 432 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package com.huaheng.common.config;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.serializer.SerializerFeature;
import org.springframework.context.annotation.Configuration;

/**
 * @author puff
 */
@Configuration
public class FastJsonConfig {
    static {
        //全局配置关闭 Fastjson 循环引用
        JSON.DEFAULT_GENERATE_FEATURE |= SerializerFeature.DisableCircularReferenceDetect.getMask();
    }
}