使用注解开发会比配置文件开发更加放方便,如:
@Select("select * from tb_user where id=#{id}") public User selectById(int id);
像这样的注解还有:
注解开发的优点:
注解开发的缺点: