springBoot application on Jboss EAP, servlet context not lodaed

前端 未结 3 1818
遇见更好的自我
遇见更好的自我 2020-12-31 18:34

I have a very simple spring boot application that I want to deploy to Jboss EAP. Here is my simple application class:

@SpringBootApplication

public class M         


        
相关标签:
3条回答
  • 2020-12-31 18:49

    Found this in Spring Boot Reference Guide, add the below line in application.properties file

    server.servlet-path=/*
    

    tested this in jBoss EAP 6.2 and worked fine.

    0 讨论(0)
  • 2020-12-31 19:11

    You mentioned JBoss 6 in you tags. Based on my experience Spring Boot Autoconfigure and JBoss 6 (specifically) is a no-go. If Hot Deploy is turned on or perhaps some other condition JBoss VFS performs some aggressive scanning of all jars in the war file. Once it starts to scan the classes in the autoconfigure module, it will abort due to an error akin to ClassNotFoundException. If you are using Autoconfigure, one solution might be to place the spring modules in the Container's lib. But this would make deployment unwieldy. I did not see this behavior on JBoss 7 nor Wildfly 8.

    0 讨论(0)
  • 2020-12-31 19:12

    Answer is here : Spring Java Config vs Jboss 7

    Apparently "/" does not work on Jboss EAP 6.3 , but "/*" works. and they seems to have fixed it with wildfly 8

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