2017年4月17日

mybatis xml配置文件要点说明

摘要: mapper映射方式: 1 一一具体列举的方式 2扫描package 如: <mappers> <!-- 告知映射文件方式1,一个一个的配置 <mapper resource="com/cy/mybatis/mapper/UserMapper.xml"/>--> <!-- 告知映射文件方式2,自动扫 阅读全文

posted @ 2017-04-17 14:41 猫不白 阅读(173) 评论(0) 推荐(0) 编辑

spring annotation功能备注

摘要: 映射方式1 对变量使用@Autowired,在xml中注入其他bean,可以在注入对象中省略配置类的成员变量 映射方式2 对set方法使用@Autowired,在xml中注入其他bean,可以在注入对象中省略配置类的成员变量 映射方式3 对构造函数使用@Autowired,在xml中注入其他bean 阅读全文

posted @ 2017-04-17 11:23 猫不白 阅读(228) 评论(0) 推荐(0) 编辑

导航