jodatime

Jackson fails on deserializing String to Joda-Time

谁说胖子不能爱 提交于 2020-08-19 06:29:25
问题 I'm using Spring Boot 1.5.6 with Jackson 2.8.8. When deserializing the answer of a REST call, Jackson fails with the following exception: JSON parse error: Can not construct instance of org.joda.time.DateTime: no String-argument constructor/factory method to deserialize from String value ('2018-03-19T12:05:21.885+01:00') It's true there is no String constructor, only an Object constructor in the DateTime object. I included the jackson-datatype-joda dependency in my build.gradle file. These

Jackson fails on deserializing String to Joda-Time

生来就可爱ヽ(ⅴ<●) 提交于 2020-08-19 06:28:30
问题 I'm using Spring Boot 1.5.6 with Jackson 2.8.8. When deserializing the answer of a REST call, Jackson fails with the following exception: JSON parse error: Can not construct instance of org.joda.time.DateTime: no String-argument constructor/factory method to deserialize from String value ('2018-03-19T12:05:21.885+01:00') It's true there is no String constructor, only an Object constructor in the DateTime object. I included the jackson-datatype-joda dependency in my build.gradle file. These

Migration from org.joda.time.Interval in Spring Boot

柔情痞子 提交于 2020-07-10 06:34:09
问题 I used to apply org.joda.time.Interval to represent a time interval with fixed start and end times (different from a duration which is independent from specific times) to exchange via REST and store energy schedules in a Spring Boot server application (2.2.2.RELEASE). I tried different ways to store a org.joda.time.Interval field of an object via JPA/Hibernate: jadira (7.0.0.CR1) with annotation above the field definition ( @Type(type = "org.jadira.usertype.dateandtime.joda.PersistentInterval