【发布时间】:2014-09-04 06:55:31
【问题描述】:
我使用 Spring 4 并想使用 ServletContextListener 。当我在类 eclipse IDE 中添加 @WebListener 注释时显示编译错误。此外,实现还显示编译错误。
public class MyContextListener implements ServletContextListener { // this shows compiler 错误是 ServletContextListener 的基础
我也添加了 spring-web 。 spring 版本是 4.0.3.RELEASE
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
谁能告诉我问题出在哪里。
【问题讨论】:
标签: java spring spring-mvc jakarta-ee