Browse Source

Merge branch 'master' of http://101.37.21.97:3000/wash/wash_server_v2

吕海超 2 months ago
parent
commit
e001af4855

+ 2 - 0
yiqi-framework/src/main/java/com/yiqi/framework/config/JacksonConfig.java

@@ -1,6 +1,7 @@
 package com.yiqi.framework.config;
 
 import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -11,6 +12,7 @@ public class JacksonConfig {
     public ObjectMapper objectMapper() {
         ObjectMapper mapper = new ObjectMapper();
         mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
+        mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
         return mapper;
     }
 }