当前位置:网站首页>Chapter 7 course summary
Chapter 7 course summary
2022-07-27 00:07:00 【Sleepy sheep】
7-1 Spring And JUnit4 Integrate
This section studies Spring test


Code demonstration
Create a project


establish xml file

establish dao

establish service, To rely on

How to test code ?
Increased reliance on

stay test Add test case classes under the directory

Instantiate and manage the two objects we configured , How does he know to load that file ?
![]()
Used to describe which configuration file to load
![]()
How to use ?
use @resource Inject required properties


7-2 Summarize and review



Set static data or other objects into a property of our object , Complete the connection between the two .
How to complete ?
Depending on property attribute ioc Automatically call based on the property name set Method to inject static values , In the process of reinjection, the value can be converted into numbers , If the injected information is not a static value, it cannot be used value And you want to use ref attribute , Specify beanid Object and property name Attributes in set relation

They are all done with annotations ioc Container instantiation and object dependency injection

Explain how to complete spring And junit Integration of
边栏推荐
- [C language] classic recursion problem
- The NFT market pattern has not changed. Can okaleido set off a new round of waves?
- 使用AW9523B芯片驱动16路LED时,LED出现误点亮的问题
- 08_ Event modifier
- Part II - C language improvement_ 10. Function pointer and callback function
- 银河证券网上开户佣金,网上客户经理开户安全吗
- 第1章 拦截器入门及使用技巧
- [Gorm] model relationship -hasone
- Skiasharp's WPF self drawn bouncing ball (case version)
- Practice of data storage scheme in distributed system
猜你喜欢

第1章 拦截器入门及使用技巧

push to origin/master was rejected 错误解决方法

力扣141题:环形链表

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

Part II - C language improvement_ 6. Multidimensional array

Pytorch data pipeline standardized code template

Bid farewell to wide tables and achieve a new generation of Bi with DQL

Geek challenge 2019 (review the loopholes)

Add an article ----- scanf usage

ES6新特性
随机推荐
Chapter 1 develop the first restful application
Recent answers - column
What scenarios are Tencent cloud lightweight application servers suitable for?
Azure Synapse Analytics 性能优化指南(3)——使用具体化视图优化性能(下)
Distributed lock and its implementation
Thousands of tiles' tilt model browsing speeds up, saying goodbye to the embarrassment of jumping out one by one
3 esp8266 nodemcu network server
Hcip day 2_ HCIA review comprehensive experiment
Tensorflow2.0 deep learning simple tutorial of running code
C language array
实数范围内的求模(求余)运算:负数求余究竟怎么求
JUnit、JMockit、Mockito、PowerMockito
MySQL transaction, phantom reading, current reading, snapshot reading related notes
Embedded system migration [8] - device tree and root file system migration
Machine learning notes - building recommendation system (3) six research directions of deep recommendation system
Pytorch data pipeline standardized code template
百度网址收录
【不积跬步无以至千里】统计日志指定时间段内的关键词
Complete backpack and 01 Backpack
Method of setting QQ to blank ID