Reputation: 3161
I'm using MyBatis 3.2.2 and I have problems loading XML mappers as resources.
<mappers>
<mapper resource="src/main/resources/Conference.xml" />
</mappers>
nested exception is org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: java.io.IOException: Could not find resource src/main/resources/Conference.xml
Project is builed by Maven.
Upvotes: 3
Views: 10157
Reputation: 3120
You are using Maven, so you can leave off the src/main/resources
path altogether, as Conference.xml
will be found at the root of your classpath. This should work:
<mappers>
<mapper resource="Conference.xml" />
</mappers>
Upvotes: 3