A. Incorrect - The ApplicationContext is not the root interface for accessing the Spring container. The root interface is BeanFactory. ApplicationContext is a subinterface of BeanFactory and provides additional functionalities.
B. Incorrect - The ApplicationContext eagerly initializes beans by default. If you want lazy initialization, you need to explicitly configure it.
C. Correct - The ApplicationContext can indeed be created in various environments, including test environments, web applications, and standalone applications. Different implementations of ApplicationContext are available for different use cases.
D. Incorrect - The ApplicationContext includes all the functionality of the BeanFactory and provides additional features. It is a more feature-rich container compared to BeanFactory.
E. Correct - The ApplicationContext does maintain singleton beans that are instantiated by the Spring runtime. Singleton scope is the default scope for beans in the ApplicationContext.
While it's true that the ApplicationContext does manage singleton beans, it does not instantiate them. The developer is responsible for defining the instantiation logic. Furthermore, singleton scope is just one of the several scopes provided by Spring (prototype, request, session, application, websocket).
Option A is correct. The ApplicationContext is the root interface for accessing the Spring IoC container. It provides the functionality of the BeanFactory and adds additional features like event propagation, AOP integration, and more.
Option E is incorrect. While the ApplicationContext can manage singleton beans, it also supports other bean scopes like prototype, request, and session. The maintenance of singleton beans does not exclusively define the ApplicationContext.
A and C
-> While it's true that the ApplicationContext does manage singleton beans, it does not instantiate them. The developer is responsible for defining the instantiation logic. Furthermore, singleton scope is just one of the several scopes provided by Spring (prototype, request, session, application, websocket).
upvoted 1 times
...
...
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
2211094
5 months, 1 week ago50513d6
10 months agoEvoila_TrainingMaterial
3 months, 1 week agoGlothan
11 months, 1 week ago50513d6
10 months agoEvoila_TrainingMaterial
3 months, 1 week ago