摘要: 有时候我们在使用spring建立实体类的时候还需要为属性赋值,比如(多参数构造) 首先我们需要一个实体类 public class Student { //属性 private String Name; private String Sex; private String Phone; privat 阅读全文
posted @ 2021-10-24 23:18 旅祸少年 阅读(421) 评论(0) 推荐(0)
摘要: 使用开发工具:Eclipes。 我们使用Web项目来建立一个Spring环境。下图展示的所需要的jar包整个项目的大致建结构,因为我们并不需要servlet只需要测试类即可。 建立resource文件夹并在里面建立一个applictionContent.xmll文件。 <?xml version=" 阅读全文
posted @ 2021-10-24 21:44 旅祸少年 阅读(54) 评论(0) 推荐(0)
摘要: Mybatis源码(Sqlsession执行Mapper过程) 回顾:session创建大致过程 String resource="mybatis-config.xml"; InputStream inputStream = Resources.getResourceAsStream(resource); SqlSessionFactory factory=ne 阅读全文
posted @ 2021-10-24 00:12 旅祸少年 阅读(191) 评论(0) 推荐(0)