|
|
@@ -1,5 +1,6 @@
|
|
|
package com.usoftchina.saas.document.config;
|
|
|
|
|
|
+import com.fasterxml.jackson.databind.DeserializationFeature;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
@@ -31,6 +32,7 @@ public class WebConfig extends WebMvcConfigurationSupport{
|
|
|
public MappingJackson2HttpMessageConverter MappingJacksonHttpMessageConverter(){
|
|
|
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
|
|
|
ObjectMapper objectMapper = new ObjectMapper();
|
|
|
+ objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
|
|
|
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
|
|
converter.setObjectMapper(objectMapper);
|
|
|
return converter;
|