Spring 50 Interview Questions
Spring 50 Interview Questions
1. What is Spring Boot, and how is it different from the Spring Framework?
4. How does Spring Boot provide embedded servers? Which servers does it support?
5. What are Spring Boot starters, and why are they useful?
2. Annotations
12. What is Dependency Injection (DI), and how does it work in Spring Boot?
13. What are the different types of Dependency Injection in Spring Boot?
15. What is the role of @Autowired, and how does it resolve dependencies?
20. How can you inject values into a bean using @Value annotation?
26. How do you enable CORS (Cross-Origin Resource Sharing) in Spring Boot?
28. How do you implement request validation using @Valid and @Validated?
30. How can you limit the rate of API requests in Spring Boot?
31. What is Spring Data JPA, and how does it simplify database operations?
35. How does lazy loading and eager loading work in JPA?
36. What are the different types of relationships in JPA (@OneToOne, @OneToMany,
@ManyToMany)?
37. What is the N+1 problem in JPA, and how can you fix it?
38. How do you implement database migrations in Spring Boot using Flyway or
Liquibase?
39. How does Spring Boot integrate with Redis for caching?
44. What is OAuth2, and how can you implement it in Spring Boot?
45. How do you define role-based access control (RBAC) in Spring Security?
48. How can you monitor a Spring Boot application using Actuator?