Câu hỏi phỏng vấn Spring
Câu hỏi

What is the purpose of the Core Container module?

Câu trả lời

The purpose of the Core Container module in the Spring framework is multifaceted, primarily focusing on providing the fundamental functionalities required for dependency injection and bean lifecycle management, which are essential for creating loosely coupled applications.

Core Container Components

The Core Container consists of several key components including the Core, Beans, Context, and Expression Language modules:

  1. Core and Beans: These modules are the foundational parts of the Spring framework. They provide the basic infrastructure for dependency management and bean definition. The BeanFactory, which is part of this module, is a sophisticated implementation of the factory pattern that manages beans, including their creation, configuration, and other aspects of their lifecycle[1][2][4].

  2. Context: This module builds on the Core and Beans modules by providing a way to access objects in a framework-style manner similar to a JNDI registry. It supports internationalization (I18N), application lifecycle events, and various enterprise services such as EJB integration and remoting[1][2].

  3. Expression Language: This module enhances the capability of the Spring configuration by allowing queries and manipulation of an object graph at runtime[5].

Functionality and Benefits

  • Dependency Injection: The Core Container uses dependency injection (DI) to manage components, which helps in decoupling the dependencies between objects. This means that the objects do not need to create or obtain their dependencies; instead, they...
junior

junior

Gợi ý câu hỏi phỏng vấn

junior

What is the Model?

junior

What do you mean by Bean wiring ?

middle

Does Spring Bean provide thread safety?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào