Jboss No Spring WebApplicationInitializer types detected on classpath

后端 未结 1 1961
抹茶落季
抹茶落季 2021-01-22 09:19

I am trying to deploy my project in JBoss7.1.1 server. But I am getting below message and my project is not getting deployed.

 19:13:39,075 INFO  [org.jboss.as.s         


        
相关标签:
1条回答
  • 2021-01-22 09:42

    In a typical servlet application, you would have a web.xml descriptor file to declare your serlvets, filters, listeners, context params, security configuration, etc. for your application. Since servlet 3.0 you can do most of that programmatically.

    Servlet 3.0 offers the interface ServletContainerInitializer, which you can implement. Your servlet container will look for your implementation of that class in META-INF/services/javax.servlet.ServletContainerInitializer file, instantiate it, and call its onStartup() method.

    Spring has built WebApplicationInitializer on top of that interface, as an adapter/helper.

    You need either the web.xml descriptor or a class that implements WebApplicationInitializer to setup and run your application.

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