package com.galaxis.manatee.configuration;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zcj
 * @version 0.1
 * @date 2020/2/5 3:30 下午
 */
@Configuration
public class ChuanyunConfiguration {

    /**
     * 系统对象转氚云字符串类
     * @return  转换类
     */
    @Bean
    public ObjectMapper chuanyunSaveObjectMapper(){
        ObjectMapper objectMapper=new ObjectMapper();
        objectMapper.registerModule(new JavaTimeModule());
        objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
        return new ObjectMapper();
    }
}
