摘要:
1,使用@Param注解 当以下面的方式进行写SQL语句时: @Select("select column from table where userid = #{userid} ") public int selectColumn(int userid); 当你使用了使用@Param注解来声明参数 阅读全文
摘要:
1.整合思路 Dao层: 1、SqlMapConfig.xml,空文件即可,但是需要文件头。 2、applicationContext-dao.xml a) 数据库连接池 b) SqlSessionFactory对象,需要spring和mybatis整合包下的。 c) 配置mapper文件扫描器。 阅读全文