当前位置:网站首页>4-4 object lifecycle
4-4 object lifecycle
2022-07-27 00:07:00 【Sleepy sheep】
explain : In this section ioc Which stage of the container bean What did you do

Illustrate with a case

Create order attributes


go back to xml To configure

Do you want to calculate the price manually ? Where are we going to let the program calculate ?

It's right to do so, but every call requires an operation
increase init Method


Take advantage of init-method It is the feature of executing after setting properties total Calculation of properties
In order to make the program run more clearly , We print some text at every step of object creation and property setting



![]()
![]()
function

Release resources when destroying , How do you do that ?
![]()
Added for destruction ioc Container method , This method does not exist in applicationContext This interface is defined in... Instead classPathXmlapplicationContext In this concrete implementation class , Therefore, when calling a method, it is determined by idea Automatically convert back to the specific implementation class for us
The process of destroying the container will automatically call us in bean Set in the
Method

What does resource mean ? In fact, during the process of program operation, these resources , It can be a file , It can also be a network connection , It can even be called by other systems , These are called resources , And in the destory We will release these resources ,
Run it

边栏推荐
- 第1章 拦截器入门及使用技巧
- 银河证券网上开户佣金,网上客户经理开户安全吗
- 第1章 开发第一个restful应用
- 1. Configuration environment and project creation
- Geek challenge 2019 (review the loopholes)
- The difference between SQL join and related subinquiry
- 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
- np. transpose & np.expand_ dims
- NFT display guide: how to display your NFT collection
- Identity server4 authorization successful page Jump encountered an error: exception: correlation failed Solution of unknown location
猜你喜欢

第二部分—C语言提高篇_12. 动/精态库的封装和使用

Real time voice quality monitoring

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

Share a regular expression

18、打开、保存文件对话框使用小记

C语言数组

Practice of intelligent code reconstruction of Zhongyuan bank

2. Realize the map of navigation bar and battle page

Qunar travel massive indicator data collection and storage

Part II - C language improvement_ 9. Linked list
随机推荐
Apple TV HD with the first generation Siri remote is listed as obsolete
Complex SQL_ 01
Modulo (remainder) operation in the range of real numbers: how to find the remainder of negative numbers
MySQL transaction, phantom reading, current reading, snapshot reading related notes
Basic operations of objects
第二部分—C语言提高篇_6. 多维数组
Chapter 3 cross domain issues
[step by step, even thousands of miles] key words in the specified time period of the statistical log
Embedded system migration [8] - device tree and root file system migration
New features of ES6
Familiarize you with the "phone book" of cloud network: DNS
About no module named'django.db.backends.mysql'
Azure Synapse Analytics 性能优化指南(3)——使用具体化视图优化性能(下)
np.transpose & np.expand_dims
带你熟悉云网络的“电话簿”:DNS
Pytorch学习记录(二):张量
Which securities company has the lowest commission? Is online account opening safe
JUnit、JMockit、Mockito、PowerMockito
JUnit、JMockit、Mockito、PowerMockito
Hcip day 2_ HCIA review comprehensive experiment