mybatis基于注解配置

接着上一篇Mybatis基于xml配置 这一篇讨论的是关于注解配置 一、创建接口StudenetMapper.java 二、写测试类 方法一:我们不用再写studentMapper.xml(可以看到接口studentMapper通过注解写的sql语句和在studentMapper.xml中写的增删改查sql语句是一样的),所以也不用在mybatis-configuration.xml对其进行注册;
相关文章
相关标签/搜索