提出问题
使用IDEA搭建SpringMVC项目,配置好Tomcat直接运行时,报错找不到类,如下:
ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
实际检查依赖的jar是包含该类的
解决
File -> Project Structure -> Artifacts,如下图,在Available Elements 目录下有一些包没有拷贝到左侧的output 目录
右键 Available Element,然后选择 Put into Output Root
参考:
https://www.jianshu.com/p/7dad9449067f
https://blog.csdn.net/ahy231/article/details/111151035
