二、mybatis初学--通过注解配置(简单配置)
1.把IUserDao,xml文件删除
2.在dao接口的方法上使用@select属性(括号内写需要查询的sql语句)
@Select("select * from user")
3.还需要在SqlMapConfig,xml文件中,使用mapper的class属性,指定dao接口的权限定类名
<mappers>
<mapper class="com.itheima.dao.IUserDao"/>
</mappers>