dromara / dromara/forest

Java8时间序列化异常

Open
#182 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.9k
Forks
241
PR merge metrics
No merged PRs in 30d

Description

Java 8 date/time type `java.time.YearMonth` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: cn.aiarch.common.forest.request.PowerRequest["monthTime"])
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type `java.time.YearMonth` not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: cn.aiarch.common.forest.request.PowerRequest["monthTime"])
Forest版本1.5.33
spring boot3.1.6
```
// 已经这么配置了,但是还是报上面的错
@Bean
public ForestJsonConverter forestJsonConverter() {
ForestJacksonConverter forestJacksonConverter = new ForestJacksonConverter();
ObjectMapper mapper = forestJacksonConverter.getMapper();
mapper.findAndRegisterModules();
return forestJacksonConverter;
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.