当前位置:网站首页>第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的整合
边栏推荐
- 15_ Key function and principle
- [step by step, even thousands of miles] key words in the specified time period of the statistical log
- 【2016】【论文笔记】差频可调谐THz技术——
- DHCP, VLAN, NAT, large comprehensive experiment
- 第3章 跨域问题
- [shader realizes shine effect _shader effect Chapter 3]
- Chapter 3 cross domain issues
- JUnit、JMockit、Mockito、PowerMockito
- 第2章 开发用户流量拦截器
- Force deduction 155 questions, minimum stack
猜你喜欢
![[netding Cup 2018] Fakebook records](/img/9f/b9111da8b2d9f8e79d82847aec906c.png)
[netding Cup 2018] Fakebook records

3 esp8266 nodemcu network server

push to origin/master was rejected 错误解决方法
![[H5 bottom scrolling paging loading]](/img/2c/fb8dd8a7d985392450ad7d3b70016c.png)
[H5 bottom scrolling paging loading]

New features of ES6

1. Configuration environment and project creation

上千Tile的倾斜模型浏览提速,告别一块一块往外蹦的尴尬

第二部分—C语言提高篇_13. 递归函数

Real time voice quality monitoring

Lesson 2 of Silicon Valley classroom - building project environment and developing lecturer management interface
随机推荐
Familiarize you with the "phone book" of cloud network: DNS
Custom type
Positioning of soaring problems caused by online MySQL CPU
Concept of functional interface & definition and use of functional interface
会议OA项目排座功能以及送审功能
Silicon Valley class lesson 5 - Tencent cloud object storage and course classification management
Azure Synapse Analytics 性能优化指南(3)——使用具体化视图优化性能(下)
Last week's hot review (7.11-7.17)
Part II - C language improvement_ 7. Structure
09_ Keyboard events
3 esp8266 nodemcu network server
第1章 开发第一个restful应用
My SQL is OK. Why is it still so slow? MySQL locking rules
07 design of ponding monitoring system based on 51 single chip microcomputer
The place where the dream begins ---- first knowing C language (2)
第3章 跨域问题
告别宽表,用 DQL 成就新一代 BI
Number that cannot be bought
Azure synapse analytics Performance Optimization Guide (4) -- optimize performance using result set caching
Baidu website Collection