常用的配置

assets/00-联系/常用的配置/IMG-20250530-235727-833.png

mybatis.mapper-locations=classpath:mapper/*.xml

如果映射文件和 mapper 接口位置不在同一个位置,又不加配置,报错:

[dispatcherServlet]  -  Servlet.service() for servlet [dispatcherServlet] in context 
with path [] threw exception [Request processing failed: 
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 
com.jun.mapper.EmpExprMapper.insertBatch] with root cause