普歌-class path resource [applicationContext.xml] cannot be opened because it does not exist

class path resource [applicationContext.xml] cannot be opened because it does not exist

问题原因:

  1. web.xml的配置不正确
  2. 没有将资源文件resources下的配置文件拷贝到out下

解决:

  • (1)
    在这里插入图片描述
  • (2)我的spring的配置文件放在了:资源文件夹conf文件夹下
    在这里插入图片描述
    在这里插入图片描述在这里插入图片描述在这里插入图片描述
    点开后找到你的spring的配置文件夹,然后ok ,选择classes,确定
    在这里插入图片描述在这里插入图片描述

在这里插入图片描述
点击apply,ok

点击build project工程后将资源文件下的配置文件拷贝到out目录下面的classes目录下。
在这里插入图片描述

最后测试即可


  • 作者:麦克猫Cat
  • 本文版权归作者和CSDN共有,欢迎交流

Guess you like

Origin blog.csdn.net/weixin_52309367/article/details/118939247