2017年10月9日

Spring10 事务

摘要: 实现的效果是: 用户在购买股票的时候,钱减少!股票增加! 模拟出现的问题是! 用户在购买股票的时候,钱减少! 股票没有增加! 01.创建对应的数据库 02.创建对应实体类 public class Account { //银行账户 private Integer aid; private doubl 阅读全文

posted @ 2017-10-09 14:43 勿忘心安云卷云舒 阅读(158) 评论(0) 推荐(0) 编辑

Spring09 ssh注解开发

摘要: 引入需要的jar包 @Entity public class Teacher { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer tId; //编号 private Integer tAge; //年龄 pr 阅读全文

posted @ 2017-10-09 14:42 勿忘心安云卷云舒 阅读(114) 评论(0) 推荐(0) 编辑

Spring08 ssh整合

摘要: 一.spring和hibernate进行整合 创建web项目,引入所需要的jar包 创建对应的数据库 创建数据库对应的实体类以及映射文件 public class Teacher { private Integer tId; //编号 private Integer tage; //年龄 priva 阅读全文

posted @ 2017-10-09 14:41 勿忘心安云卷云舒 阅读(137) 评论(0) 推荐(0) 编辑

Spring07 JDBC

摘要: 1.创建对应的数据库 2.在MyEclipse中创建项目 引入需要的jar包 3.创建数据访问层 public interface StudentDao { //新增学生 int addStudent(Student student); //删除学生 int delStudent(Student s 阅读全文

posted @ 2017-10-09 14:39 勿忘心安云卷云舒 阅读(127) 评论(0) 推荐(0) 编辑

Spring06 Aop

摘要: 1.实现前置增强 必须实现接口MethodBeforeAdvice接口 创建对应的文件 public interface Animal {//主业务接口 void eat(); //目标方法 void sleep(); } public class Dog implements Animal {// 阅读全文

posted @ 2017-10-09 14:38 勿忘心安云卷云舒 阅读(190) 评论(0) 推荐(0) 编辑

Mystring05 配置文件之间的关系

摘要: 一:配置文件包含关系 1.创建对应的实体类 public class Student { //学生实体类 private String name; //姓名 private Integer age; //年龄 private Grade grade; //年级 @Override public St 阅读全文

posted @ 2017-10-09 14:37 勿忘心安云卷云舒 阅读(226) 评论(0) 推荐(0) 编辑

导航