Deploying spring boot on JBOSS EAP 6.1

后端 未结 1 640
野趣味
野趣味 2020-12-10 18:26

I am trying to deploy a jar on Jboss 6.1 EA. I had build the jar file.

I am unable to access the page http://localhost:8080/$YOURAPP/hello/World, becaus

相关标签:
1条回答
  • 2020-12-10 18:58

    You will definitely need a .war file for JBoss because a (fat) .jar file will not work. For JBoss, you will also need a jboss-web.xml descriptor file in src/main/webapp/WEB-INF file containing the context root of your application.

    For example:

    <jboss-web>
        <context-root>YOUR_APP_ROOT</context-root>
    </jboss-web>
    

    After that, you will need to set one more Spring Boot property to make this work on JBoss EAP 6:

    server.servlet-path = /*
    

    This is due to a quirk in JBoss itself, if you don't have this property set to /* it will not work.

    More information here and here

    0 讨论(0)
提交回复
热议问题