|
@@ -1,5 +1,6 @@
|
|
|
package com.gxzc.zen.common.config.response
|
|
|
|
|
|
+import com.fasterxml.jackson.databind.DeserializationFeature
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper
|
|
|
import com.gxzc.zen.common.config.response.annotation.ZenResponseFilter
|
|
|
import com.gxzc.zen.common.config.response.annotation.ZenResponseFilters
|
|
@@ -29,7 +30,7 @@ class DynamicFilterResponseBodyAdvice : AbstractMappingJacksonResponseBodyAdvice
|
|
|
private lateinit var converter: MappingJackson2HttpMessageConverter
|
|
|
|
|
|
override fun supports(returnType: MethodParameter, converterType: Class<out HttpMessageConverter<*>>): Boolean {
|
|
|
- converter.objectMapper = ObjectMapper()
|
|
|
+ converter.objectMapper = ObjectMapper().apply { configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) }
|
|
|
return super.supports(returnType, converterType) &&
|
|
|
(returnType.getMethodAnnotation(ZenResponseFilter::class.java) != null
|
|
|
|| returnType.getMethodAnnotation(ZenResponseFilters::class.java) != null)
|