- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试从 jetty 7.6 切换到 jetty-9.2.1。我进行了所需的配置更改。但在初始化jetty服务器时,我不断收到“在类路径上未检测到Spring WebApplicationInitializer类型”消息。
我的部署管理器是:
新类=“org.eclipse.jetty.deploy.providers.WebAppProvider”>
<Set name="monitoredDirName">
<Property name="cometd.deploy.dir" default="/u/khandela/cometD/webapps_dev/" />
</Set>
<Set name="defaultsDescriptor">
<Property name="jetty.home" default="."/>/etc/webdefault.xml
</Set>
<Set name="scanInterval">1</Set>
<Set name="extractWars">true</Set>
<Set name="contextXmlDir">
<Property name="jetty.home" default="." />/contexts
</Set>
在新版本中,“contextXmlDir”已被删除。所以我也从配置中删除了。当我运行时,我不断收到上面显示的消息。如果是的话我应该把它加回来吗?
在运行时我正在使用:--module=server,jsp,deploy,jmx,resources,websocket,ext,plus,annotations
以下是我运行服务器时收到的详细消息:
2014-07-08 14:07:42.634:INFO::main: Logging initialized @512ms
2014-07-08 14:07:43.253:INFO:oejs.Server:main: jetty-9.2.1.v20140609
2014-07-08 14:07:43.306:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/u/khandela/cometD/logs_dev/webapps] at interval 1
2014-07-08 14:07:43.306:WARN:oejdp.ScanningAppProvider:main: Does not exist: file:/u/khandela/cometD/logs_dev/webapps
2014-07-08 14:07:43.450:INFO:oejs.AbstractNCSARequestLog:main: Opened /u/khandela/cometD/logs_dev/jetty-20140708.log
2014-07-08 14:07:43.468:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/u/khandela/cometD/webapps_dev/] at interval 1
2014-07-08 14:07:46.945:INFO:cometd:main: No Spring WebApplicationInitializer types detected on classpath
2014-07-08 14:07:47.332:INFO:cometd:main: Initializing Spring root WebApplicationContext
2014-07-08 14:07:48.696:INFO:oejsh.ContextHandler:main: Started o.e.j.w.WebAppContext@6fd02e5{/cometd,file:/tmp/jetty-0.0.0.0-8107-cometd.war-_cometd-any-404202732061519131.dir/webapp/,AVAILABLE}{/u/khandela/cometD/webapps_dev/cometd.war}
2014-07-08 14:07:49.183:INFO:oejs.ServerConnector:main: Started ServerConnector@180bc464{HTTP/1.1}{0.0.0.0:8107}
2014-07-08 14:07:49.184:INFO:oejs.Server:main: Started @7083ms
谢谢
阿努杰
最佳答案
如果您配置 org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern
jetty.xml 中的属性将起作用。您可以在 Jetty Documentation 上找到有关此参数的更多信息。 :这是一个可以在 org.eclipse.jetty.webapp.WebAppContext
上设置的上下文属性。控制容器类路径的哪些部分应该处理诸如注释之类的事情。
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
<Arg>.*/foo-[^/]*\.jar$|.*/bar-[^/]*\.jar$|.*/bin/.*|.*/classes/.*|.*/target/.</Arg>
</Call>
关于spring - jetty 9 : No Spring WebApplicationInitializer types detected on classpath,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24627632/
我需要一个如何使用 WebApplicationInitializer 的简单示例。我已经看到了大量示例实现,但是我在哪里声明应该使用我的个人 MyVeryIndividualWebApplica
我正在使用 maven 创建一个 spring mvc 应用程序。它使用 WebApplicationInitializer 进行初始化。现在我正在尝试添加 hibernate 依赖项。当我添加它时,
我正在使用 Spring 为学校项目构建 BlogPost。我可以访问我的 index.jsp,但是当我映射到其他 Controller 时,我得到一个 404。当我在我的 WebApplicatio
我正在使用 Spring MVC 和 Maven 创建一个 webapp 项目。我也是使用 Spring 注释驱动配置的新手。 我想为我的容器创建一个包含所有 SpringMVC 配置和 Servle
我正在使用 Spring MVC 和 ZK 框架创建一个网络应用程序。我有一个包含 spring 和 zk 的所有基本配置的根项目 (jar),以及一个调用初始化程序的 Web 应用程序项目 (war
我有一个基于 Spring 3.1 的应用程序托管在 Tomcat 7.x(最新版本)下。该应用程序仅使用 Java 配置(无 web.xml,无 Spring XML 配置)。所有单元测试都通过了,
我有一个使用 Maven 构建的 Web 应用程序(war)。我正在使用旧的 struts 应用程序(别无选择)。我正在使用 AnnotationConfigApplicationContext 和一
我有一个包含各种 Spring 依赖项的项目。 'org.springframework:spring-core:4.3.2.RELEASE', 'org.springframewor
Spring Security 的文档指出,为了使用 Java Config,我们可以扩展 AbstractSecurityWebApplicationInitializer 类,该类将为 Sprin
我需要配置 2 个 servlet:一个用于常规 http 请求,另一个是用于 Java web-socket 的 Atmosphere servlet。 这是我的 WebApplicationIni
WebApplicationInitializers 类的 web.xml 的等价物是什么? package com.concretepage.config; import org.sp
我编写了下面的类以编程方式注册多个 servlet,但它不起作用,任何人都可以帮助我。 public class appIntializer implements WebApplicationInit
我在 TomCat 9 上启动我的 Spring Boot 应用程序时遇到问题。在 Intellij IDE 中,应用程序启动并按预期工作。 当我尝试通过 TomCat Web 应用程序管理器启动应用
我正在尝试使用构建配置文件(开发、测试或生产)构建我的项目。我有一个 Spring Web 应用程序,我正在使用 WebApplicationInitializer 的实现来初始化它。 public
这个问题在这里已经有了答案: How does Tomcat exactly bootstrap the app without web.xml? (2 个答案) 关闭 7 年前。 Spring W
目前我有一个 Web 应用程序,我们在其中使用 web.xml 来配置应用程序。 web.xml 有welcome-file-list。 ... home.html
我的 Eclipse 项目突然不再正确部署。我无法追踪到我对环境所做的任何特定更改。 我已经对多个源代码控制项目进行了测试,它们的行为方式都相同: May 01, 2013 12:00:45 PM o
我正在使用 Spring 4.0.7 我做了一个关于通过 JavaConfig 配置 Spring MVC 的研究。 实际上直到昨天我才看到使用这两个选项的两种配置 扩展 AbstractAnnota
我有一个 CRUD spring 应用程序,由于依赖关系而无法运行。我需要用“war”包装的那部分,但是拿不到。 我的 pom.xml 是: 4.0.0 com.sprhib
我想使用 读取 application.properties @EnableConfigurationProperties and @ConfigurationProperties. 我可以使用以下代
我是一名优秀的程序员,十分优秀!