I'm some trouble getting MyBatis (3.4.6) working.
I have placed my mybatis-config.xml file in the src/main/resources folder of my project but when I run a unit test I get the following error.
> java.io.IOException: Could not find resource mybatis-config.xml at
> org.apache.ibatis.io.Resources.getResourceAsStream(Resources.java:114)
This is the code I am using to read the XML file.
String resource = "mybatis-config.xml";
try
{
InputStream inputStream = Resources.getResourceAsStream(resource);
sqlSessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
} catch (IOException ex) {
ex.printStackTrace();
}
Anyone got any ideas?