In Spring Boot, the _____ annotation is used to specify that a class is a candidate for component scanning.

  • @ComponentScan
  • @Configuration
  • @Component
  • @Autowired
In Spring Boot, the @Component annotation is used to specify that a class is a candidate for component scanning. This annotation marks a Java class as a bean so that the Spring container can recognize it and manage it. The other options, such as @ComponentScan, @Configuration, and @Autowired, have different purposes within the Spring framework.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *