gpt4 book ai didi

java - Jetty Maven 插件重新加载忽略 web.xml 监听器

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:09:06 28 4
gpt4 key购买 nike

我有一个使用 2 个 Spring 上下文的 Spring MVC Java Web 应用程序。根应用程序上下文,通过 ContextLoaderListener 和 servlet 上下文加载。

我使用 Jetty Maven 插件加载应用程序没有问题 (9.0.0.RC2),但是当我尝试使用控制台扫描器手动重新加载应用程序时(只需在控制台中按下 enter),应用程序被加载再次,但没有调用 ContextLoaderListener,我的 servlet 上下文失败,因为它没有在根上下文中找到 bean。

初始加载的日志是这样的:

2013-05-21 12:13:32.676:INFO:oejw.WebInfConfiguration:main: Adding virtual project first in resource base list
2013-05-21 12:13:33.149:INFO:oejpw.PlusConfiguration:main: No Transaction manager found - if your webapp requires one, please configure one.
2013-05-21 12:13:34.879:INFO:/:main: No Spring WebApplicationInitializer types detected on classpath
2013-05-21 12:13:36.241:INFO:/:main: Initializing log4j from [classpath:log4j.properties]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/j.calero/.m2/repository/org/slf4j/slf4j-log4j12/1.5.10/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Code/Java/sms/portal-licitacion/target/tmp/portal-notificaciones-0_0_3-SNAPSHOT_war1/WEB-INF/lib/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2013-05-21 12:13:36.690:INFO:/:main: Initializing Spring root WebApplicationContext
12:13:36,691 INFO ContextLoader:273 - Root WebApplicationContext: initialization started
12:13:37,068 INFO XmlWebApplicationContext:495 - Refreshing Root WebApplicationContext: startup date [Tue May 21 12:13:37 CEST 2013]; root of context hierarchy
12:13:37,372 INFO XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [context/applicationContext.xml]

在重新加载期间:

2013-05-21 09:59:28.179:INFO:oejw.WebInfConfiguration:Console scanner: Adding virtual project first in resource base list
2013-05-21 09:59:28.321:INFO:oejpw.PlusConfiguration:Console scanner: No Transaction manager found - if your webapp requires one, please configure one.
2013-05-21 09:59:28.831:INFO:Portal de Licitación:Console scanner: No Spring WebApplicationInitializer types detected on classpath
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/j.calero/.m2/repository/org/slf4j/slf4j-log4j12/1.5.10/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Code/Java/sms/portal-licitacion/target/tmp/portal-notificaciones-0_0_3-SNAPSHOT_war4/WEB-INF/lib/slf4j-log4j12-1.5.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2013-05-21 09:59:29.293:INFO:Portal de Licitación:Console scanner: Initializing Spring FrameworkServlet 'portal'
09:59:29,294 INFO DispatcherServlet:444 - FrameworkServlet 'portal': initialization started
09:59:29,316 INFO XmlWebApplicationContext:495 - Refreshing WebApplicationContext for namespace 'portal-servlet': startup date [Tue May 21 09:59:29 CEST 2013]; root of context hierarchy
09:59:29,353 INFO XmlBeanDefinitionReader:315 - Loading XML bean definitions from class path resource [context/portal-servlet.xml]

我该如何解决这个问题?

最佳答案

嗯,这确实是一个小错误。我提交了错误,不到一天就解决了!

https://bugs.eclipse.org/bugs/show_bug.cgi?id=408723

9.0.4会解决

关于java - Jetty Maven 插件重新加载忽略 web.xml 监听器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16668415/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com