dateLibrary java8 does works now with xml (#8444)

Co-authored-by: v.bychkov <v.bychkov@betterbits.de>
This commit is contained in:
Vladimir V. Bychkov
2022-07-23 06:39:28 +02:00
committed by GitHub
parent 153cfeb7ae
commit 434464c898
3 changed files with 10 additions and 0 deletions

View File

@@ -239,6 +239,11 @@
<artifactId>jackson-dataformat-xml</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>io.github.threeten-jaxb</groupId>
<artifactId>threeten-jaxb-core</artifactId>
<version>1.2</version>
</dependency>
{{/withXml}}
<dependency>

View File

@@ -26,6 +26,8 @@ import com.fasterxml.jackson.annotation.JsonCreator;
{{/jackson}}
{{#withXml}}
import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.*;
import io.github.threetenjaxb.core.*;
{{/withXml}}
{{#jsonb}}
import java.lang.reflect.Type;

View File

@@ -59,6 +59,9 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
@XmlElementWrapper({{#xmlNamespace}}namespace="{{.}}", {{/xmlNamespace}}name = "{{xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}")
{{/isXmlWrapped}}
{{/isContainer}}
{{#isDateTime}}
@XmlJavaTypeAdapter(OffsetDateTimeXmlAdapter.class)
{{/isDateTime}}
{{/isXmlAttribute}}
{{/withXml}}
{{#gson}}