title: @Valid(javax.validation.Valid) annotation did not work when maven project is packaged in WAR
body: <p>I'm using <code>@Valid</code> annotation to validate the incoming request body and it is working fine when I'm packing the code in jar. But when I change the packaging from jar to war, <code>@Valid</code> annotation does not work for request body.</p>
  
  <p>Below is my <strong>pom.xml</strong> file:</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.db&lt;/groupId&gt;
      &lt;artifactId&gt;bff-global-payment-simulator&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;name&gt;bff-global-payment-simulator&lt;/name&gt;
      &lt;version&gt;1.0.0&lt;/version&gt;
      &lt;properties&gt;
          &lt;java.version&gt;1.7&lt;/java.version&gt;
          &lt;maven.compiler.source&gt;${java.version}&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;${java.version}&lt;/maven.compiler.target&gt;
          &lt;springfox-version&gt;2.5.0&lt;/springfox-version&gt;
          &lt;spring-boot.version&gt;1.4.1.RELEASE&lt;/spring-boot.version&gt;
      &lt;/properties&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.3.5.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
      &lt;build&gt;
          &lt;sourceDirectory&gt;src/main/java&lt;/sourceDirectory&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;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;repackage&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
  
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;distributionManagement&gt;
          &lt;repository&gt;
              &lt;id&gt;central&lt;/id&gt;
              &lt;url&gt;https://artifactory.intranet.db.com/artifactory/mvn-public-local/&lt;/url&gt;
              &lt;name&gt;mvn-public-local&lt;/name&gt;
          &lt;/repository&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;snapshots&lt;/id&gt;
              &lt;url&gt;https://artifactory.intranet.db.com/artifactory/mvn-snapshot-local/&lt;/url&gt;
              &lt;name&gt;mvn-snapshot-local&lt;/name&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                      &lt;artifactId&gt;slf4j-log4j12&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-api&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!--SpringFox dependencies --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
              &lt;version&gt;${springfox-version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
              &lt;version&gt;${springfox-version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-datatype-joda&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;joda-time&lt;/groupId&gt;
              &lt;artifactId&gt;joda-time&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.h2database&lt;/groupId&gt;
              &lt;artifactId&gt;h2&lt;/artifactId&gt;
              &lt;scope&gt;runtime&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-jpa&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
  
          &lt;/dependency&gt;
          &lt;!-- Bean Validation API support --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.validation&lt;/groupId&gt;
              &lt;artifactId&gt;validation-api&lt;/artifactId&gt;
              &lt;version&gt;1.1.0.Final&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpcore&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
              &lt;artifactId&gt;httpclient&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.apple&lt;/groupId&gt;
              &lt;artifactId&gt;AppleJavaExtensions&lt;/artifactId&gt;
              &lt;version&gt;1.4&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Below is my <strong>Java</strong> file:</p>
  
  <pre><code>public ResponseEntity&lt;POSTResponseForGlobalPaymentRequestForDomesticPayments&gt; createSingleImmediatePayment(
              @Valid @RequestBody GlobalPaymentPOSTRequestForDomesticPayments body,
              @Valid @RequestHeader MultiValueMap&lt;String, String&gt; headers)
              throws UserDefinedFailure, URISyntaxException, ParseException, IOException {
              ....
              }
  </code></pre>
  
  <p>Not able to figure out , why this is happening.</p>