Sodved
Sodved

Reputation: 8588

Springboot 1.3.3 gives 404 in Jboss EAP 6.4.0GA

I am trying to deploy a spring .war into jboss but am getting 404 errors. I know this has been asked before:

But I am very new (this week) to maven/spring/jboss, so may well have messed up. I tried what I understood from the various solutions above and none of them worked for me. Probably me messing up or missing something. So I thought I'd get the problem as simple as I can.

I took the code from: https://github.com/spring-guides/gs-rest-service.git And then work in the complete folder.

cd complete 
mvn package
java -jar .\target\gs-rest-service-0.1.0.jar

And that all worked as you'd expect.

So then I followed the instructions here (http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file) to modify my code and pom.xml to produce a war file.

I then mvn clean package and load the resulting .war file into EAP using the UI (https://i.sstatic.net/N7zxG.png).

So then in theory this should be the URL right

I also tried

But am getting the 404 error (https://i.sstatic.net/T6J6z.png) as described in the other questions. Nothing appears in the jboss console log at all after the .war is loaded.

So am I missing something? Do I need to write a jboss @WebServelet class to wrap around the spring stuff? Changes to my pom.xml? Should I not be using springboot, and just just pring framework modules directly? I note that in the EAP screen it does not show the class in the third column like it did with the jboss sample .war.

Remember I am new to this, so please explain stuff as if I'm a complete dummy (which I am).

Details of my setup:

Upvotes: 3

Views: 900

Answers (1)

Sebastien
Sebastien

Reputation: 881

I encountered the same problem on JBoss EAP 6.4 / spring boot 1.5 and what fixed it was to add this property to application.properties

server.servlet-path=/*

as explained in this post : Deploying spring boot on JBOSS EAP 6.1

A simple tutorial you can follow (though he miswrote the property server.servlet.path ) http://code-adda.com/2018/06/how-to-deploy-spring-boot-war-in-jboss/

Upvotes: 2

Related Questions