当前位置:网站首页>第7章 课程总结
第7章 课程总结
2022-07-26 22:36:00 【沉睡羊sleepysheep】
7-1 Spring与JUnit4整合
本节学习 Spring test


代码演示
创建工程


创建xml文件

创建dao

创建service,进行依赖

如何测试代码?
增加依赖

在test目录下新增测试用例类

将我们配置的两个对象实例化并进行管理,他怎么知道要加载那个文件呢?
![]()
用于说明加载那个配置文件
![]()
如何使用?
用@resource注入需要的属性


7-2 总结与回顾



将静态的数据或者其他对象设置到我们对象的某个属性中,完成两者关系的关联。
如何完成?
依托于property属性 ioc自动基于属性名调用set方法将静态数值完成注入,再注入的过程中可以将数值进行数字的转换,如果注入的信息不是静态值就不能用value而要使用ref属性,将当前容器内指定beanid的对象与property name属性进行set关联

都是利用注解完成ioc容器的实例化以及对象依赖注入

讲解如何完成spring与junit的整合
边栏推荐
- 13_ conditional rendering
- [literature reading] hat: hardware aware transformers for efficient natural language processing
- Part II - C language improvement_ 5. Bit operation
- Can the stock account opening commission be adjusted? Is it safe to open an account on your mobile phone
- 第二部分—C语言提高篇_10. 函数指针和回调函数
- [interview: concurrency 26: multithreading: two-phase termination mode] volatile version
- Simple SQL optimization
- 29、 Implementation of xv6 file system (GDB tracks mkfs, buffer cache and log)
- Six challenges facing enterprise data governance!
- 会议OA项目排座功能以及送审功能
猜你喜欢

DHCP, VLAN, NAT, large comprehensive experiment

In simple terms, cchart's daily lesson - Lesson 59 of happy high school 4 comes to the same end by different ways, and the C code style of the colorful interface library

C语言数组

Hcip day 2_ HCIA review comprehensive experiment

Silicon Valley class lesson 6 - Tencent cloud on demand management module (I)

18、打开、保存文件对话框使用小记
![[shader realizes shine effect _shader effect Chapter 3]](/img/ea/6c14f682e6157a96c1877d99c9f7d3.png)
[shader realizes shine effect _shader effect Chapter 3]

第二部分—C语言提高篇_7. 结构体

Pytorch学习记录(二):张量

Part II - C language improvement_ 7. Structure
随机推荐
第二部分—C语言提高篇_8. 文件操作
第3章 跨域问题
10_ Name Case - Calculation attribute
JUnit、JMockit、Mockito、PowerMockito
Chapter 3 cross domain issues
np. transpose & np.expand_ dims
Typescript notes
华测RTK采集的GPX数据如何带属性转出kml、shp进行后续的管理和分析
股票开户佣金是否可以调整?手机上开户安不安全
第1章 开发第一个restful应用
[Luogu] p2709 little B's inquiry
Tencent cloud lightweight application server purchase method steps!
证券公司哪家佣金最低?网上开户安全吗
[Luogu] p2341 popular cattle
[H5 bottom scrolling paging loading]
第二部分—C语言提高篇_6. 多维数组
Tensorflow2.0 deep learning simple tutorial of running code
银河证券网上开户佣金,网上客户经理开户安全吗
【面试:并发篇27:多线程:犹豫模式】
Silicon Valley class lesson 5 - Tencent cloud object storage and course classification management