SpringBoot Interview Questions

Spring Questions

  1. What is dependency Injection and Inversion of control (IOC)
  2. Scope of Bean is SpringBoot

  1. What is SpringBoot and its Features and challenges
  2. SpringBoot starters
  3. Create your own annotation
  4. How does spring boot works & its architecture
  5. JDBC configuration ways
  6. JDBC template
  7. Actuators
  8. REST Template
  9. Versioning of REST API(URL/pathvariable)
  10. Consumes & Produce in API Media Type
  11. Cross Cutting Concerns & APO
  12. Custome Validation (javaX validation @)
  13. Annotations
    1. @Autowired in SpringBoot
    2. @Component in SpringBoot
    3. @Qualifier in SpringBoot and @Primary
    4. @Configuration
    5. @Component Vs @Configuration
    6. @Import
    7. @ComponentScan
    8. @EnableAutoConfiguration
    9. @SpringBootApplication
    10. @Controller with @ResponseBody and @RestController
    11. @ControllerAdvice
    12. SpringMVC and RESTAnnotation
      1. @RequestMapping
        1. @GetMapping
        2. @PostMapping
        3. @PutMapping
        4. @DeleteMapping
        5. @PatchMapping
      2. @RequestBody
      3. @PathVariable
      4. @RequestParam
      5. @RequestHeader
      6. @RequestAttribute
      7. @RequestPart
      8. @ResponseStatus
      9. @ResponseEntity
    13. @Service
    14. @Repository
      1. @Transactional
      2. @ReadOnly
    15. @Bean
    16. @Required – Reading Spring XML configuration file
    17. @Lazy – Lazy loaded
    18. @Scope
    19. @Profile
    20. @DependsOn
    21. @Order
    22. @Value
    23. @PropertySource
    24. @CrossOrigin
    25. @ExceptionHandler
      1. DataAcessException
  14. BeanState
    1. @PostConstruct
    2. @PreDestroy
  15. Spring JDBC Template
    1. Row Mapper (Returns only single object and it is converted into List)
    2. ResultSetExtractor (Returns a list of objects from the inner class)
    3. RowCallbackHandler (Access outside)
    4. BeanPropertyRowMapper
    5. NamedParameter
  16. Spring Initializer
  17. Spring Boot CLI
  18. CommandLineRunner interface
  19. Properties File in SpringBoot
  20. Spring Profiles
  21. Spring Security
    1. HTTP Baisc Authentication
    2. JWT Bearer
    3. Authorization

  • Hierarchy in which application.properties is read
  • How to disable a specific auto-configuration class?
  • Is it possible to change the port of the embedded Tomcat server in Spring Boot
  • Can we create a non-web application in Spring Boot?
  • Can we override or replace the Embedded tomcat server in Spring Boot?
  • Multiple DB Servers
  • Multiple wasy you can create JDBC Object
  • Connection POOL
  • How to import Environment variables
  •  How to enable debugging log in the spring boot application?
  • Where do we define properties in the Spring Boot application?
  • Ways in which you can create bean
  • Explain how to register a custom auto-configuration.
  • How do you Configure Log4j for logging?
  • What is cyclic dependecy