我才用这样的方式来使用配置程序
@MapperScan("com.example.spider.domain.mapper")
public class SpiderApplication {
public interface CUserMapper extends IService<CUser> {
}
当我调用cuserMapper.save()方法时,就会抛出Invalid bound statement (not found)异常。
但是如果我的CUserMapper改成继承自BaseMapper<T>就不回有问题,求解?
因为 save 方法就是写在在 BaseMapper接口 中的,你点进去就能看到,然后在一个 Provider 类中被拼接成一个完整的 sql。
而你的IService类应该没有实现 BaseMapper 接口吧,所以找不到 save 方法。