Jboss在类路径上未检测到Spring WebApplicationInitializer类型 [英] Jboss No Spring WebApplicationInitializer types detected on classpath

查看:167
本文介绍了Jboss在类路径上未检测到Spring WebApplicationInitializer类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在JBoss7.1.1服务器中部署我的项目.但是我收到了以下消息,并且我的项目没有得到部署.

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"

我正在使用Spring 3.1.1版本的jar.预先感谢.

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

推荐答案

在典型的servlet应用程序中,您将有一个web.xml描述符文件来声明您的服务,过滤器,侦听器,上下文参数,安全性配置等.你的申请.从Servlet 3.0开始,您可以通过编程方式完成大多数操作.

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提供了可以实现的接口ServletContainerInitializer.您的servlet容器将在META-INF/services/javax.servlet.ServletContainerInitializer文件中查找该类的实现,将其实例化,然后调用其onStartup()方法.

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已构建 <该界面顶部的c4> 作为适配器/帮助器.

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

您需要web.xml描述符或实现WebApplicationInitializer的类来设置和运行您的应用程序.

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

这篇关于Jboss在类路径上未检测到Spring WebApplicationInitializer类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆