【发布时间】:2017-03-23 05:34:37
【问题描述】:
我使用ContextLoaderListener 提升弹簧上下文。
在此之前 web.xml 我有我的自定义侦听器,它执行一些检查。如果这些检查失败,我不希望启动 Spring 上下文。
如果我在另一个侦听器中有异常,我如何防止 Spring 上下文加载?
我会在 ServletContext 中添加一些属性,但我不知道它会如何影响 spring ctx 的加载。
这是一个非常相似的问题:Stop deployment when Exception occurs in ServletContextListener
【问题讨论】:
标签: spring spring-mvc servlet-listeners spring-ioc