![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring学习
文章平均质量分 53
Singcing
夏天好热,冰淇淋好凉,我要在冬天吃冰糖
展开
-
04_bean注入属性
setter方法注入 目录结构 代码 package dao; public interface BookDao { public void save(); } BooDaoImpl中有两个基本类型的属性 package dao.impl; import dao.BookDao; public class BookDaoImpl implements BookDao { private String databaseName; priva...原创 2022-05-23 23:02:32 · 89 阅读 · 0 评论 -
03_bean的生命周期
目录结构 代码 package dao; public interface BookDao { public void save(); } 在BookDaoimpl中添加init()和destroy() package dao.impl; import dao.BookDao; public class BookDaoImpl implements BookDao { public void save() { System.out.print..原创 2022-05-23 21:25:27 · 71 阅读 · 0 评论 -
02_bean实例化
1.项目目录结构 2.构造方法实例化bean package dao; public interface BookDao { public void save(); } 提供可访问的构造方法private 或者public BookDaoImpl() package dao.impl; import dao.BookDao; public class BookDaoImpl implements BookDao { public BookDaoImpl(...原创 2022-05-22 00:19:50 · 110 阅读 · 0 评论 -
01_spring 入门案例(IOC,DI)
1.用maven创建目录结构: 各个类的代码 package dao; /** * @auther CharlieLiang * @date 2022/5/21-21:57 */ public interface BookDao { public void save(); } import dao.BookDao; /** * @auther CharlieLiang * @date 2022/5/21-21:56 */ public class Book..原创 2022-05-21 22:43:01 · 124 阅读 · 0 评论