zhuangjie
ZhuangJie

涉及内容:读取与xml文件

流读取的代码:

String resource="mybatis-config.xml";//流读取的文件
InputStream inputStream = Resources.getResourceAsStream(resource);//流
sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);

 

出现的错误问题:  

java.io.IOException: Could not find resource mybatis-config.xml

IDEA解决的方法:

 

 设置完成效果:

 

 END

posted on 2020-09-20 15:53  zhuangjie  阅读(1513)  评论(0)    收藏  举报