MyBatis中Mapper接口和dao区别是什么?

MyBatis中的mapper接口相当于以前的dao。但是区别在于,mapper仅仅是接口,我们不需要

提供实现类。

public interface UserMapper {
    /**
    * 添加用户信息
    */
    int insertUser();
}

猜你喜欢

转载自blog.csdn.net/m0_64880608/article/details/135039891