添加配置文件

This commit is contained in:
fuqingji
2022-04-02 16:52:49 +08:00
parent d759ae53f1
commit af5555eb84

View File

@ -0,0 +1,18 @@
package com.chinaunicom.mall.ebtp.project.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class FeignLocalDateTimeDecoder {
@Bean(name = "mapperObject")
public ObjectMapper getObjectMapper() {
return new ObjectMapper().registerModule(new ParameterNamesModule()).registerModule(new Jdk8Module())
.registerModule(new JavaTimeModule());
}
}