feature(configuration,forest): 增加 jackson LocalDatetime 等Java时间类型适配
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
package com.lanyuanxiaoyao.service.forest.configuration;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import com.dtflys.forest.converter.json.ForestJacksonConverter;
|
||||
import com.dtflys.forest.springboot.annotation.ForestScan;
|
||||
import com.dtflys.forest.springboot.properties.ForestConfigurationProperties;
|
||||
import com.fasterxml.jackson.datatype.eclipsecollections.EclipseCollectionsModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@@ -21,6 +20,7 @@ public class ForestsConfiguration {
|
||||
public ForestJacksonConverter forestJacksonConverter() {
|
||||
ForestJacksonConverter converter = new ForestJacksonConverter();
|
||||
converter.getMapper().registerModule(new EclipseCollectionsModule());
|
||||
converter.getMapper().registerModule(new JavaTimeModule());
|
||||
return converter;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user