Created
September 20, 2019 09:40
-
-
Save wpik/701e44a8177331a69575a01a0daa2f28 to your computer and use it in GitHub Desktop.
Spring tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; | |
@Configuration | |
public class ObjectMapperConfig { | |
@Bean | |
public Jackson2ObjectMapperBuilder jacksonBuilder() { | |
Jackson2ObjectMapperBuilder builder = new Jackson2ObjectMapperBuilder(); | |
builder.failOnUnknownProperties(true); | |
return builder; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment