In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the principle and function of ConfigurableApplicationContext interface in Spring". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn the principle and function of ConfigurableApplicationContext interface in Spring.
UML diagram
The role of interface
From the UML diagram above, you can see that ConfigurableApplicationContext directly inherits ApplicationContext, Lifecycle, and Closeable interfaces, so ApplicationContext is a subclass of ApplicationContext. Anyone who has used Spring or read the Spring source code must know the interface ApplicationContext. It functions like a name, which is the application context (indicating how important it is to have a good name), and contains information such as the unique ID of the program context, the application name and so on.
The Lifecycle interface is responsible for managing the life cycle of context, providing start () and stop () and isRunning () methods.
The Closeable interface is an interface provided by JDK to shut down components and release resources.
So the function of the ConfigurableApplicationContext API is to set the context ID, set the parent application context, add listeners, refresh the container, close, determine whether it is active, and so on. In fact, if you take a brief look at the ApplicationContext interface, you will find that the get method is followed by the set method, so the subinterface provides the set method.
At this point, I believe you have a deeper understanding of "the principle and function of ConfigurableApplicationContext interface in Spring". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.