上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页

2017年5月2日

mybatis 之 占位符#{} 和 ${}

摘要: 测试: 自定义类型作为参数,自定义类中需要为为属性提供get方法,如果没有提供get方法,那么会根据占位符中的名称去反射获取值,如果占位符中的名称和属性不一致,那么报ReflectionException。 测试: Map作为参数类型,key和占位符中的名称一致即可,如果名称不一致那么将会把null 阅读全文

posted @ 2017-05-02 15:37 forever_2h 阅读(10938) 评论(0) 推荐(0) 编辑

mybatis 之 分页及模糊查询

摘要: 映射文件: 测试代码: 映射文件: 测试代码: 映射文件: 测试代码: 注意:通常情况下使用 Map 传参来实现分页 测试代码: 测试代码: 注意:通常使用第二种方式实现模糊查询: 阅读全文

posted @ 2017-05-02 14:49 forever_2h 阅读(4267) 评论(0) 推荐(0) 编辑

mybatis 之 mybatis中查询

摘要: 映射文件: 测试 阅读全文

posted @ 2017-05-02 14:28 forever_2h 阅读(186) 评论(0) 推荐(0) 编辑

mybatis 之 配置详解

摘要: mybatis.cfg.xml --> ... 阅读全文

posted @ 2017-05-02 14:06 forever_2h 阅读(127) 评论(0) 推荐(0) 编辑

mybatis 之 实现单表的增删改查操作

摘要: Mybatis 实现单表的crud操作,只需要添加对应的 sql 映射即可。 insert into t_role(name) values(#{name}) delete from t_role where id=#{id} update t_... 阅读全文

posted @ 2017-05-02 11:36 forever_2h 阅读(197) 评论(0) 推荐(0) 编辑

mybatis 之 简介,开发详细步骤

摘要: ibatis 最早再Apache 下开源。 现在在github上开源。 新建java项目 导入jar包: mybatis-3.2.7.jar mysql-connector-java-5.1.20-bin.jar mybatis-3.2.7.jar mysql-connector-java-5.1. 阅读全文

posted @ 2017-05-02 11:27 forever_2h 阅读(240) 评论(0) 推荐(0) 编辑

2017年4月24日

spring 之 ssh整合

摘要: struts2,spring,hibernate整合步骤如下: 阅读全文

posted @ 2017-04-24 15:51 forever_2h 阅读(151) 评论(0) 推荐(0) 编辑

spring 之 spring整合hibernate

摘要: spring整合hibernate步骤如下: @Entity @Table(name="t_user") publicclass User implements Serializable{ @Id @GeneratedValue(strategy=GenerationType.AUTO) priva 阅读全文

posted @ 2017-04-24 15:30 forever_2h 阅读(157) 评论(0) 推荐(0) 编辑

spring 之 AOP

摘要: 1. AOP:aspect orentiet programming 面向切面的编程。 2. 面向切面的编程: 在不改变原有代码的情况下,增加代码新的功能。 3. 结构图: 4. Spring 的 aop 编程有两方面的应用: 声明式事务 自定义aop 5. 名词解释: 切面:一个关注点的模块化。 阅读全文

posted @ 2017-04-24 14:36 forever_2h 阅读(240) 评论(0) 推荐(0) 编辑

2017年4月21日

spring 之 动态代理

摘要: a) 声明式事务 b) 自定义aop 切面(Aspect):一个关注点的模块化 连接点(Joinpoint):在程序执行过程中某个特定的点,在Spring AOP中,一个连接点总是表示一个方法的执行。 通知(Advice):在切面的某个特定的连接点上执行的动作。 切入点(Pointcut):匹配连接 阅读全文

posted @ 2017-04-21 16:52 forever_2h 阅读(152) 评论(0) 推荐(0) 编辑

上一页 1 ··· 3 4 5 6 7 8 9 10 11 12 下一页

导航