I am using spring.jackson.deserialization.FAIL_ON_UNKNOWN_PROPERTIES=true
in the application.properties
to make deserialization fail on unknown properties but its not working.
I even tried using :
@Bean
ObjectMapper objectMapper() {
return Jackson2ObjectMapperBuilder
.json()
.featuresToEnable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
.build();
}
But this also didn't work. What am I missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…