Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
324 views
in Technique[技术] by (71.8m points)

java - Jboss No Spring WebApplicationInitializer types detected on classpath

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.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "ips-configuration-dynamic.war" 
 19:13:42,731 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ips-configuration-dynamic]] (MSC service thread 1-8) No Spring WebApplicationInitializer types detected on classpath
 19:13:42,781 INFO  [org.jboss.web] (MSC service thread 1-8) JBAS018210: Registering web context: /ips-configuration-dynamic
 19:13:43,723 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ips-configuration-dynamic.war"

I am using Spring 3.1.1 release jars. Thanks in advance.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...