title: JsonIgnoreProperties not working with spring boot
body: <p>Currently, the Spring Boot sample application is created normally. In the request, if there are any unknown fields coming, then we need to throw an error. </p>
  
  <p>For this the <code>@JsonIgnoreProperties(ignoreUnknown = false)</code> annotation is being used. However, when I am accessing the URL, it is not working.</p>
  
  <p>Please find code snippet as follows:</p>
  
  <pre class="lang-java prettyprint-override"><code>    @RestController @RequestMapping(value = "/")
      @JsonIgnoreProperties(ignoreUnknown = false) public class
      UserController {
          private final Logger LOG = LoggerFactory.getLogger(getClass());
  
          private final UserRepository userRepository;
  
          private final UserDAL userDAL;
  
          public UserController(UserRepository userRepository, UserDAL userDAL){
              this.userRepository = userRepository;       
              this.userDAL = userDAL;     
          }
  
          @RequestMapping(
              value = "/create", method = RequestMethod.POST,
              consumes = MediaType.APPLICATION_JSON_VALUE, 
              produces = MediaType.APPLICATION_JSON_VALUE
          )   
          public User addNewUsers(@RequestBody @Valid User user) 
              throws JsonProcessingException {        
  
  
              LOG.info("Saving user.");
  
              CardInfo cardInfo = new CardInfo();
              cardInfo.setCardId("12345678901");      
              user.setCardInfo(cardInfo);
              ObjectMapper mapper = new ObjectMapper();
  
              String jsonString = mapper.writeValueAsString(cardInfo);
              user.setCardInfo1(jsonString);  
              userDAL.getAllUsers();      
  
              return userRepository.save(user);   
          }
  </code></pre>
  
  <p>Please find sample Pom as follows:
  
  http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0</p>
  
  <pre><code>&lt;groupId&gt;com.journaldev.spring&lt;/groupId&gt;
  &lt;artifactId&gt;spring-boot-mongodb&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;spring-boot-mongodb&lt;/name&gt;
  &lt;description&gt;Spring Boot MongoDB Example&lt;/description&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.5.9.RELEASE&lt;/version&gt;
      &lt;relativePath /&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-data-mongodb&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>