1.错误现象
java.io.IOException: Could not find resource mybatis-config.xml
at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:114)
at org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:100)
at com.sdbi.test.TestFindBySid.main(TestFindBySid.java:16)
Process finished with exit code 0
错误的意思是:找不到资源文件mybatis-config.xml
2.解决办法
将资源文件mybatis-config.xml所在的config文件夹Mark Directory as成Resources Root
方法一:
方法二: