MyBatis出现Exception iin thread "main" java.io.IOException:Could not find resource mybatis-config.xml

运行MyBatis出现Exception iin thread “main” java.io.IOException:Could not find resource mybatis-config.xml

_在这里插入图片描述
出现了上述错误,原因为我把resources文件夹定义成了普通文件夹,然而我们需要将其变成资源文件夹,后面我将其改成资源文件夹,然后运行成功。

注:文件 mybatis-config.xml在resources文件夹中

eclipse普通文件夹变成资源文件夹的方法:
选中相关文件夹右键选择build path选项,然后选择 use a source即可

原文地址:https://www.cnblogs.com/Xiong-Jun/p/13515045.html