Spring Boot - Level V (Expert)
Practice 30 Spring Boot - Level V (Expert) interview questions with detailed answers. Part of the Spring Boot track on Java Interview Hub.
- You might have created REST API from scratch or you might know how to create it, right? So, tell me 5 REST API annotations.
- Have you encountered any real-world bugs due to the incorrect choice between PUT and POST? How did you resolve it?
- If you have multiple beans of the same type in your Spring application context, how would you handle conflicts using @Autowired and @Qualifier? What potential issues could arise if you mix these annotations incorrectly?
- If your application needs to handle file uploads, which controller would you prefer and why? Can you describe a scenario where using a @RestController could lead to complications?
- Are you using cache, if yes, which scenario, when you are removing/refreshing data from cache?
- Assume your cache is stale due to frequent updates in the underlying data source. How would you determine when to refresh the cache, and what strategies would you use to ensure minimal disruption to users?
- How are you verifying your changes once your changes are deployed to production?
- If you discover a critical bug shortly after deployment, what processes do you have in place to roll back the changes quickly and safely?
- Where are you storing your artifacts?
- If your artifact storage becomes inaccessible, what contingency plans do you have to ensure your deployment process can continue?
- What is the CAP theorem?
- Can you provide a real-world scenario where you had to prioritize between consistency, availability, and partition tolerance? What decision did you make?
- Can you talk about a time when a misconfiguration in the properties file caused an issue in production?
- Consider a scenario where a transaction spans multiple service calls. How would you decide the appropriate propagation level for each service call, and what potential pitfalls could arise with your chosen approach?
- What are the best practices for designing a custom exception handling framework in Spring Boot?
- How do you manage configuration changes for your Dockerized Spring Boot application across different environments (development, testing, production)?
- As part of a move to a microservices architecture, you are tasked with containerizing your Spring Boot applications using Docker. What are the steps to prepare your Spring Boot application for Docker, and what best practices would you follow?
- Your application is going live, and you are responsible for setting up monitoring tools. How can Spring Boot Actuator be customized to provide more detailed health metrics specific to your application’s needs?
- You need to integrate Kafka to handle real-time notifications in a social media application built with Spring Boot. How would you set up and configure this integration?
- How would you ensure that your custom starter doesn’t interfere with Spring Boot's own auto-configuration?
- You're tasked with creating a custom starter for handling cloud-based message queuing in multiple microservices across your organization. What key components will you include in your starter?
- Suppose you need to ensure zero downtime deployments for a Spring Boot e-commerce application. What approach would you take?
- What are the basic commands to create a docker image and where are you storing your docker images?
- What is the use of sleuth in spring boot microservice application? As Spring boot 3.x no more supporting sleuth, please name the alternative for the same.
- What is Micrometer Tracing in spring boot 3?
- How will enable and disable auto configuration in spring boot?
- What is traceId and span Id in spring boot microservice application and what is the use of these ids?
- What is webflux and mono in spring boot?
- How will you create custom annotation?
- How will you make two ambiguity URL working in spring boot without changing the HTTP method type and no change will be accepted in URL as well?