class path resource [config.properties] cannot be opened because it does not

class path resource [config.properties] cannot be opened because it does not。

在导入项目后,启动项目时报的错。

查看一下applicationContext.xml文件,发现如下代码

<!-- 加载properties文件 -->
    <context:property-placeholder location="classpath:config.properties" />

所以在resource文件夹下创建一个空的properties文件,命名为config.properties即可。

问题解决。

猜你喜欢

转载自blog.csdn.net/zw1137229578/article/details/82853869