Govt. Exams
Entrance Exams
Constructor injection enforces required dependencies and creates immutable objects; setter injection allows optional dependencies and partial initialization.
Request-scoped beans are instantiated per HTTP request and destroyed after request completion, ideal for storing user-specific or request-specific information.
@EnableCaching activates Spring's caching infrastructure, allowing method-level caching through annotations like @Cacheable to store and retrieve results.
@ConfigurationProperties enables binding of external properties (from application.properties/yml) to POJO classes, providing type safety and validation.
@Transactional delegates transaction management to Spring, automatically committing on success and rolling back on exceptions, following ACID principles.
A Join Point is a candidate point in program execution (method call, exception throw) where advice can be applied. Pointcuts select specific Join Points.
BeanFactory is the core interface for accessing beans, providing lazy initialization. ApplicationContext extends BeanFactory with additional enterprise features.
@Repository marks a class as a data access component and enables Spring to translate persistence-specific exceptions into Spring's DataAccessException hierarchy.
@PropertySource allows loading properties from external files (like .properties or .yml) into the Spring Environment for use throughout the application.
Both @Primary (default choice) and @Qualifier (explicit selection by name) can resolve bean ambiguity. @Qualifier is more explicit and takes precedence over @Primary.