package ink.wgink.gateway.config;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: BeanConfig
 * @Description: bean配置
 * @Author: wanggeng
 * @Date: 2021/2/5 6:44 下午
 * @Version: 1.0
 */
public class BeanConfig {

    /**
     * 解决 disable SerializationFeature.FAIL_ON_EMPTY_BEANS 问题，由于没有属性导致
     *
     * @return
     */
    public ObjectMapper objectMapper() {
        return new ObjectMapper().disable(SerializationFeature.FAIL_ON_EMPTY_BEANS);
    }

}
