title: Spring boot war not working on EAP 6
body: <p>I have created a small REST-based application using spring boot. The application is deployed on EAP 6(JBoss) as a war package. 
  As EAP 6 is based on Java 1.7 I have configured that in my maven pom to compile and use Java 1.7 version.
  When I am deploying the application I can see in the server logs that the controller is getting registered but when I am hitting it I am getting 404. Also I JBoss is not picking up my context root configuration but taking the application name as the context root. I am tested all the possible endpoints but everything is giving 404.
  Can someone suggest me something which can help me to proceed forward?</p>
  
  <p>POM file:</p>
  
  <pre><code>    &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.4.1.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.7&lt;/java.version&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>....</p>
  
  <pre><code>&lt;build&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.7&lt;/source&gt;
                  &lt;target&gt;1.7&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&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>Application configuration</p>
  
  <pre><code>package com.org.orderhistory.v2.orderhistory.v2;
  import ...
  @SpringBootApplication
  public class Application extends SpringBootServletInitializer {
  
  @Override
  protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
      return application.sources(Application.class);
  }
  
  public static void main(String[] args) {
      SpringApplication.run(Application.class, args);
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>package com.org.orderhistory.v2.orderhistory.v2.controllers;
  
  import ...
  
  @RestController
  @RequestMapping(value="/myorder/weborders")
  public class WebOrderControllers {
  
  @RequestMapping(value="/{webUserId}",method = RequestMethod.GET, produces = "application/json")
  public List&lt;WebOrder&gt; getWebOrdersForUser(@PathVariable Long webUserId) {
  </code></pre>
  
  <p>JBoss Logs</p>
  
  <pre><code>2017-10-09 02:24:29,744 [ServerService Thread Pool -- 594] INFO  [org.springframework.boot.web.servlet.FilterRegistrationBean] Mapping filter: 'requestContextFilter' to: [/*]
  2017-10-09 02:24:30,368 [ServerService Thread Pool -- 594] INFO  [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter] Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@5a46b924: startup date [Mon Oct 09 02:24:27 EDT 2017]; root of context hierarchy
  2017-10-09 02:24:30,451 [ServerService Thread Pool -- 594] INFO  [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping] Mapped "{[/org/weborders/{webUserId}],methods=[GET],produces=[application/json]}" onto public java.util.List&lt;com.org.www.order.model.WebOrder&gt; com.org.orderhistory.v2.orderhistory.v2.controllers.WebOrderControllers.getWebOrdersForUser(java.lang.Long)
  </code></pre>