当前位置:网站首页>第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的整合
边栏推荐
- 会议OA之我的会议
- 上千Tile的倾斜模型浏览提速,告别一块一块往外蹦的尴尬
- Baidu website Collection
- Silicon Valley class lesson 6 - Tencent cloud on demand management module (I)
- 【面试:并发篇26:多线程:两阶段终止模式】volatile版本
- Dynamic memory management and related topics
- Part II - C language improvement_ 10. Function pointer and callback function
- Azure synapse analytics Performance Optimization Guide (3) -- optimize performance using materialized views (Part 2)
- Modulo (remainder) operation in the range of real numbers: how to find the remainder of negative numbers
- [Luogu] p1395 meeting
猜你喜欢

Silicon Valley class lesson 5 - Tencent cloud object storage and course classification management

上千Tile的倾斜模型浏览提速,告别一块一块往外蹦的尴尬
![[literature reading] an investigation on hardware aware vision transformer scaling](/img/3d/6f2cf1fc1e9189e7557703820d021f.png)
[literature reading] an investigation on hardware aware vision transformer scaling

04 traditional synchronized lock

带你熟悉云网络的“电话簿”:DNS

The place where the dream begins ---- first knowing C language (2)

In simple terms, cchart daily lesson - happy high school lesson 57 new starting point, the old tree and new bud of colorful interface library

百度网址收录

第二部分—C语言提高篇_8. 文件操作

Machine learning notes - building recommendation system (3) six research directions of deep recommendation system
随机推荐
NFT展示指南:如何展示你的NFT藏品
Galaxy securities online account opening commission, is online account opening safe for customer managers
ES6新特性
Hcip day 2_ HCIA review comprehensive experiment
Can the stock account opening commission be adjusted? Is it safe to open an account on your mobile phone
Sign up now | frontier technology exploration: how to make spark stronger and more flexible
Force deduction 155 questions, minimum stack
Dajiang Zhitu and CC have produced multiple copies of data. How to combine them into one and load them in the new earth map
Distributed lock and its implementation
Application of workflow engine in vivo marketing automation | engine 03
Section 6: introduction to cmake grammar
【C语言】数组
18. Opening and saving file dialog box usage notes
Problems and solutions encountered in using nextline(), nextint() and next() in scanner
Real time voice quality monitoring
Chapter 1 requirements analysis and SSM environment preparation
Part II - C language improvement_ 7. Structure
Part II - C language improvement_ 12. Packaging and use of dynamic / precision Library
Typescript notes
The NFT market pattern has not changed. Can okaleido set off a new round of waves?