Spring Boot FAQs
Spring Boot FAQs
Spring vs Spring Boot: Spring is a framework providing comprehensive infrastructure support for
building Java applications, while Spring Boot is an extension of Spring that simplifies application
2. Determining Active Profile: A Spring Boot application determines the active profile via the
argument (-Dspring.profiles.active=profileName).
configurations and use @Primary to define the default DataSource. Use EntityManagerFactory or
4. Filter vs Interceptor:
- Filter: Works at the servlet level and is used for request/response modification before reaching
the DispatcherServlet.
- Interceptor: Works at the Spring MVC level and is used for pre- and post-processing around
controller methods.
5. MVC Workflow:
- Controller processes the request, interacts with services, and retrieves data.
6. Authorization vs Authentication:
application.yml (e.g., URL, username, password). Spring Boot uses auto-configuration to connect
via DataSource.
8. Sessions in REST APIs: REST APIs are stateless by design, but sessions can be maintained
9. Lombok: Lombok is a Java library that reduces boilerplate code by providing annotations like
10. DispatcherServlet: The DispatcherServlet is the front controller in Spring MVC that handles all
- Spring Security: A framework for authentication, authorization, and securing web applications.
- Spring Cloud: Provides tools for building microservices, including service discovery,
12. IOC Container: The Inversion of Control (IOC) Container manages the lifecycle and
20. Spring Boot Actuator: Provides production-ready features like monitoring and metrics for a