What is Application Context?
What is Application Context?
The Application Context in Spring is a central interface within a Spring application that provides configuration information to the application. It extends the capabilities of the basic BeanFactory by providing support for various additional features such as event propagation, declarative mechanisms to create a bean, and various ways to look up. The Application Context is responsible for instantiating, configuring, and assembling beans by reading configuration metadata from an XML file, Java annotations, or Java code[1][8].
The Application Context serves as a higher-level facility than the basic BeanFactory because it supports internationalization (i18n) for text messages, the general way to load file resources (like images, configuration files, etc.), and the propagation of application events[1][8]. For instance, you can create an ApplicationContext instance by using one of its implementations such as FileSystemXmlApplicationContext
or AnnotationConfigApplicationContext
. Once created, the ApplicationContext can manage the lifecycle of beans, including their...
junior
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào