Fixing date format

This commit is contained in:
Martin Stockhammer 2020-07-07 23:57:08 +02:00
parent 742cb1c7e6
commit 54707da343
2 changed files with 1 additions and 11 deletions

View File

@ -54,6 +54,7 @@ public class JacksonJsonConfigurator
objectMapper.setDateFormat( new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ) ); objectMapper.setDateFormat( new SimpleDateFormat( "yyyy-MM-dd'T'HH:mm:ss.SSSZ" ) );
xmlMapper.disable( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES ); xmlMapper.disable( DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES );
xmlMapper.setAnnotationIntrospector( new JaxbAnnotationIntrospector( xmlMapper.getTypeFactory( ) ) );
} }
} }

View File

@ -48,21 +48,10 @@
</bean> </bean>
<bean id="redbackJacksonJsonMapper" class="com.fasterxml.jackson.databind.ObjectMapper" > <bean id="redbackJacksonJsonMapper" class="com.fasterxml.jackson.databind.ObjectMapper" >
<property name="annotationIntrospector" ref="jacksonAnnotationIntrospector"/>
<property name="dateFormat">
<bean class="java.text.SimpleDateFormat">
<constructor-arg type="java.lang.String" value="yyyyMMdd'T'HHmmss.SSSZ"/>
</bean>
</property>
</bean> </bean>
<bean id="redbackJacksonXMLMapper" class="com.fasterxml.jackson.dataformat.xml.XmlMapper" > <bean id="redbackJacksonXMLMapper" class="com.fasterxml.jackson.dataformat.xml.XmlMapper" >
<property name="annotationIntrospector" ref="jacksonAnnotationIntrospector"/>
</bean> </bean>
<bean id="jacksonAnnotationIntrospector" class="com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector" />
<jaxrs:server name="redbackServices" address="/redbackServices"> <jaxrs:server name="redbackServices" address="/redbackServices">
<jaxrs:serviceBeans> <jaxrs:serviceBeans>