Tag

Component Scan

1 views collected around this technical thread.

Java Captain
Java Captain
Mar 7, 2024 · Backend Development

How Spring Scans and Registers Custom Annotations

This article explains how the Spring framework discovers and registers custom annotations by using @ComponentScan, ClassPathScanningCandidateComponentProvider, and TypeFilter mechanisms, guiding developers to configure package scanning, apply meta‑annotations, and optionally implement custom filters for flexible bean management.

Backend DevelopmentComponent ScanJava
0 likes · 5 min read
How Spring Scans and Registers Custom Annotations
Selected Java Interview Questions
Selected Java Interview Questions
Sep 2, 2022 · Backend Development

Understanding the @SpringBootApplication Annotation in Spring Boot

This article explains the core @SpringBootApplication annotation, its composition of @EnableAutoConfiguration, @ComponentScan, and @SpringBootConfiguration, shows its source code, demonstrates custom composite annotations, and details how Spring Boot performs component scanning and automatic bean configuration.

@SpringBootApplicationAuto-ConfigurationComponent Scan
0 likes · 8 min read
Understanding the @SpringBootApplication Annotation in Spring Boot
Java Tech Enthusiast
Java Tech Enthusiast
Mar 9, 2022 · Backend Development

Annotation‑Based Bean Management and Dependency Injection in Spring

Spring’s annotation‑based bean registration and dependency injection replace verbose XML by using component scanning with @Component, @Controller, @Service, and @Repository, while @Autowired (or @Qualifier/@Primary) injects beans by type, @Resource supports name‑based injection, and @Value together with @PropertySource loads external configuration, though developers must handle issues such as NoUniqueBeanDefinitionException when multiple candidates exist.

AutowiredComponent ScanJava
0 likes · 8 min read
Annotation‑Based Bean Management and Dependency Injection in Spring
Selected Java Interview Questions
Selected Java Interview Questions
Nov 10, 2020 · Backend Development

Understanding the Priority and Interaction of SpringBootApplication, ComponentScan, and MapperScan Annotations

This article explains how SpringBootApplication, ComponentScan, and MapperScan annotations affect package scanning in Spring Boot, their precedence, differences, and the pitfalls of using them together, providing practical guidance for correctly configuring component and mapper scans in Java backend projects.

Component ScanJavaSpringBoot
0 likes · 5 min read
Understanding the Priority and Interaction of SpringBootApplication, ComponentScan, and MapperScan Annotations