Index
- Versions
- Interview Questions
Versions
| Version | Release Date | Major Features | Comment |
|---|---|---|---|
| 3.2.3 | February 22, 2024 | Upgraded dependencies (Spring Framework 6.1.4, Spring Data JPA 3.1.3, Spring Security 6.2.2, etc.) https://www.codejava.net/spring-boot-tutorials | |
| 3.1.3 | September 20, 2023 | Enhanced developer experience, improved reactive support, and updated dependencies https://spring.io/blog/2022/05/24/preparing-for-spring-boot-3-0 | |
| 3.0.x | May 2020 – December 2022 | Introduced reactive programming, improved build system, and various dependency updates throughout the series (refer to official documentation for details) | |
| 2.x | March 2018 – May 2020 | Introduced Spring Boot actuator, developer tools, and auto-configuration (refer to official documentation for specific features within each version) | 2.7.7 used in project (switch) |
| 1.x | April 2014 – February 2018 | Initial versions focusing on simplifying Spring application development | 1.5.22.RELEASE used in project (consumers) |
Springboot versions and corresponding spring version support:
| Spring Boot Version | Supported Spring Framework Versions |
|---|---|
| 1.x | 4.x |
| 2.0.x – 2.3.x | 5.x |
| 2.4.x | 5.x, 6.x |
| 3.0.x – 3.2.x | 6.x |
Interview Questions
- Why springboot over spring?
- Convention-over-Configuration:
- Spring Boot: Spring Boot follows convention-over-configuration principles, reducing the need for explicit configuration. Annotations like
@Serviceare automatically recognized and configured based on conventions. - Spring (Traditional): In traditional Spring applications, while you can use annotations, you might need more explicit configuration, especially in XML-based configurations.
- Spring Boot: Spring Boot follows convention-over-configuration principles, reducing the need for explicit configuration. Annotations like
- Auto-Configuration:
- Spring Boot: Spring Boot provides auto-configuration, which means that common configurations are automatically applied based on the project’s dependencies. For example, if you have
@Serviceannotated classes, Spring Boot will automatically configure them as Spring beans. - Spring (Traditional): In traditional Spring, you might need to configure components more explicitly, specifying details in XML files or Java-based configuration classes.
- Spring Boot: Spring Boot provides auto-configuration, which means that common configurations are automatically applied based on the project’s dependencies. For example, if you have
- Reduced Boilerplate Code:
- Spring Boot: Spring Boot’s defaults and starters significantly reduce boilerplate code. You can focus more on writing business logic and less on configuration.
- Spring (Traditional): Without the conventions and defaults of Spring Boot, you might find yourself writing more configuration code to set up beans and application context.
- Simplified Dependency Management:
- Spring Boot: The use of starters simplifies dependency management. With the appropriate starter, you get a predefined set of dependencies, including those for services, making it easy to include and manage dependencies.
- Spring (Traditional): While you can manage dependencies in traditional Spring, Spring Boot provides a more streamlined way to do so with starters.
- Out-of-the-Box Features:
- Spring Boot: Spring Boot provides out-of-the-box features, such as embedded servers, metrics, and health checks. These features are often automatically configured, making it easier to develop production-ready applications.
- Spring (Traditional): While you can manually configure these features in traditional Spring, Spring Boot simplifies the process and encourages best practices.
- Faster Project Bootstrap:
- Spring Boot: With its starters and defaults, Spring Boot allows for faster project bootstrapping. You can create a fully functional application with minimal setup.
- Spring (Traditional): Setting up a traditional Spring application might involve more manual configuration and a longer setup time.
- Convention-over-Configuration:
- Annotations in springboot
- @SpringbootApplication
- @EnableAutoconfiguration
- @ComponentScan
- @SpringBootConfiguration specialised form of @Configuration
- @SpringbootApplication