项目是Gradle构建的,xml文件在src下面,
这时候启动项目运行方法的时候就会报错,提示没有找到配置文件,
[Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): XXX] with root cause
解决办法,在配置文件中添加指定的位置
mybatis-plus.type-aliases-package=com.rx.d.entity
mybatis-plus.mapper-locations=classpath:/com/rx/d/mapper/xml/*.xml
然后再build.gradle中指定sourceSets
sourceSets.main.resources.srcDirs = ["src/main/java","src/main/resources"]