在用IDEA学习Spring框架,我在web.xml中添加了监听器后项目就不能启动了,大佬救救孩子

我在web.xml中配置了一个监听器,结果Tomcat启动时就出现下面的错误。

web.xml配置如下:

但是把下面这注释掉,就能正常启动!

<listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

大佬解救是什么原因,萌新网上找了半天没有找到有效办法!

可以看看这个https://blog.csdn.net/ysughw/article/details/8992322?utm_source=copy

看看artifacts里面有没有spring-web没有就加进去

img