title: Cannot get validation working with Spring Boot and Thymeleaf
body: <p>I have a Spring Boot application (using version 1.2.3) with 1 controller that shows a form. This all works fine, but now I want to add validation. I have this method in my controller:</p>
  
  <pre><code>@RequestMapping(value = "/licensing", method = RequestMethod.POST)
  public String doRegistration( @Valid CustomerLicenseRegistration customerLicenseRegistration, Model model, BindingResult bindingResult )
  {
      if( bindingResult.hasErrors())
      {
          logger.debug( "There are errors! {}", bindingResult );
          return "customer/license-registration";
      }
      logger.debug( "customerLicenseRegistration: " + customerLicenseRegistration );
      CustomerLicense customerLicense = m_licenseService.createCustomerLicense( customerLicenseRegistration );
      model.addAttribute( "customerLicense", customerLicense );
      return "customer/license-registration-done";
  }
  </code></pre>
  
  <p>If I now type something invalid, I get the "Whitelabel error page" after submit and my breakpoint inside the method is never hit (If I remove the <code>@Valid</code> annotation, the breakpoint does get hit). The error page shows:</p>
  
  <pre><code>Whitelabel Error Page
  
  This application has no explicit mapping for /error, so you are seeing this as a fallback.
  
  Mon May 18 09:42:27 CEST 2015
  There was an unexpected error (type=Bad Request, status=400).
  Validation failed for object='customerLicenseRegistration'. Error count: 1
  </code></pre>
  
  <p>Spring seems to notice that the object is not valid, but it does not show the form again so the user can fix his mistake. What am I doing wrong?</p>