Spring Boot

Spring Boot

Test your Spring Boot knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. What is the default logging framework in Spring Boot?

    • Slf4j
    • JUL
    • Logback
    • Log4j
  2. Which annotation defines a bean in Spring Boot?

    • @Entity
    • @Bean
    • @Component
    • @Service
  3. What does @SpringBootApplication include?

    • @Autowired, @Bean, @RestController
    • @Entity, @Table, @Id
    • @Controller, @Service, @Repository
    • @EnableAutoConfiguration, @ComponentScan, @Configuration
  4. Which annotation is used to handle exceptions locally in a controller?

    • @HandleException
    • @ErrorHandler
    • @ExceptionHandler
    • @ControllerAdvice
  5. Which command creates a JAR file using Maven?

    • mvn run jar
    • mvn install jar
    • mvn jar:build
    • mvn clean package
  6. How do you enable async methods in Spring Boot?

    • @EnableAsync
    • @EnableThreading
    • @AsyncConfig
    • @EnableParallel
  7. Which annotation is used for cross-origin requests?

    • @CrossOrigin
    • @EnableCors
    • @AllowOrigin
    • @CorsPolicy
  8. Which class customizes Spring Security configuration?

    • SecurityConfig
    • WebSecurityConfigurerAdapter
    • SecurityConfigurer
    • AuthenticationManager
  9. How do you secure endpoints with roles?

    • @RolesAllowed
    • @Secured
    • @PreAuthorize
    • All of the above
  10. Which starter is used for consuming REST APIs reactively?

    • spring-boot-starter-web
    • spring-boot-starter-webflux
    • spring-boot-starter-reactive
    • spring-boot-starter-rsocket
  11. Which Spring Cloud component provides centralized configuration?

    • Eureka
    • Config Server
    • Gateway
    • Zuul
  12. Which tool is used for API Gateway in Spring Cloud?

    • Zuul
    • Spring Cloud Gateway
    • Ribbon
    • Feign
  13. Which library is used for circuit breakers in Spring Boot microservices?

    • Hystrix (legacy)
    • Resilience4j
    • Both A & B
    • Ribbon
  14. Which component handles client-side load balancing?

    • Eureka
    • Ribbon
    • Zuul
    • Config Server
  15. What is Feign used for?

    • Service discovery
    • Declarative REST client
    • Database connection pooling
    • Circuit breaking