I faced the same problem. The issue was that my XML file under resources\mybatis.mapper did not end with -mapper.xml. I renamed the file from profit-receipt.xml to profit-receipt-mapper.xml