I am struggling with this issue for days now and have no clue how to solve this. Any quick help will be grateful. I need to convert LocalDate from JSON string which I am receiv
I had exactly the same problem @peeskillet describes in question comment.
I was using Jackson dependencies from version 2 and jackson-jaxrs from version 1.
All solved when moved all dependencies to version 2.
If you are using Maven you can add following two maven dependency.
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
</dependency>
And Add following code snippet.
@Configuration
public class CxfConfig {
@Component
@javax.ws.rs.ext.Provider
public static class JacksonJaxbJsonProvider
extends com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider {
@Autowired
private ObjectMapper objectMapper;
@PostConstruct
public void init() {
objectMapper.registerModule(new Jdk8Module());
}
}
}