The @Service annotation marks a class as a service layer component. It holds business logic and is managed by Spring's container for dependency injection.
The @Repository annotation marks a class as a data access object (DAO). It also enables Spring to translate database exceptions into Spring's data access exceptions.
@Controller is a specialized form of @Component. Annotating a class with both is redundant but Spring treats it as a controller.
By default, Spring Boot scans the package of the main application class and its subpackages. Classes outside these packages are not detected unless explicitly configured.
Spring creates beans in an order based on dependency needs, not annotation type. It ensures dependencies are ready before injection but does not follow a fixed annotation order.