Linked Questions

Popular Questions

Spring boot war not working on EAP 6

Asked by At

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?

POM file:

    <relativePath/> <!-- lookup parent from repository -->




Application configuration

import ...
public class Application extends SpringBootServletInitializer {

protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
    return application.sources(Application.class);

public static void main(String[] args) {, args);



import ...

public class WebOrderControllers {

@RequestMapping(value="/{webUserId}",method = RequestMethod.GET, produces = "application/json")
public List<WebOrder> getWebOrdersForUser(@PathVariable Long webUserId) {

JBoss Logs

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[email protected]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<>

Related Questions