Springboot Interview Question

 ♦️ Spring & Spring Boot


6️⃣ Difference between @Controller, @RestController and @ControllerAdvice.
7️⃣ How do you implement global exception handling in Spring Boot?
8️⃣ How do you configure multiple data sources in a Spring Boot application?
9️⃣ How to secure REST APIs using JWT or OAuth2 in Spring Boot?
πŸ”Ÿ How do you implement caching in Spring Boot (Redis / Caffeine)?

6. How does Spring manage circular dependencies?

7. Difference between @Bean, @Component, @Service, @Repository. When do you prefer each?

8. How do you implement global exception handling in Spring Boot REST APIs?

9. How do you configure asynchronous execution in Spring Boot?

10. If your Spring Boot app is consuming high memory in production, how would you debug it?

πŸ”Ή Microservices & Design

11. How do you handle data consistency across microservices without distributed transactions?

12. Explain the Saga pattern with an example.

13. How do you secure microservices communication? (JWT, OAuth2, API Gateway)

14. What happens if Kafka consumer is slower than producer? How do you handle backpressure?

15. If two microservices are dependent and one goes down, how do you prevent a cascade failure?

Comments

Popular posts from this blog

Two Sum II - Input Array Is Sorted

Comparable Vs. Comparator in Java

Increasing Triplet Subsequence