Introduction to Spring Boot Versions
Spring boot releases various versions but the latest spring boot version is v2.2 with many new features. As we all know it is an open-source framework. It is used to create production-ready applications and microservices.
Versions of Spring Boot
Given below are the different versions of Spring Boot:
Older Versions:
- v1.1
- v1.2
- v1.3
- v1.4
Current Version:
- v2.0
- v2.1
- v2.2
1. v1.1
In this version test, POM i.e. spring-boot-starter-test is not going to add automatically to the parent class i.e. spring-boot-starter-parent. They have added default-test dependencies to parent POM but we cannot remove or changed them easily.
- Multipart Configuration: Here they have renamed some classes like MultiPartConfigFactory has been rename to MultipartConfigFactory.
- Error Controller: Here they have moved some interface and classes related to error handlings like errorController related classes and interfaces classes moved to spring-boot-autoconfigure before they are available in spring-boot-actuator. These changes are clear to the end-users, also they have renamed some packages.
- Spring data auto-configuration packages: Auto-configuration files moved to sub-packages. They cannot be used directly if we want to reference them using annotation @EnableAutoConfiguration with its exclude attribute, in this case, we may require to change the imports.
- Running our spring boot application using maven: Spring boot now provides a spring-boot run to run our application from the command line with no command-line argument we need to mention.
2. v1.2
- Severs: In this version, spring boot uses some embedded servers which are: Tomcat 8, Jetty 9. If you want you can also use Tomcat 7 and Jetty 8.
- Loggers: In spring 1.2they have updated the default configuration for logging, we do not need to write log files. But we can still customize our loggers by adding logback.xml
- Configuration Property: Rename some of the property like spring.data.mongodb.repositories.enabled.. which was before spring.data.mongo.repositories.enabled.
- @SpringBootApplication: They have added one new annotation i.e. @SpringBootApplication which is the combination of some of the annotations like @ComponentScan + @configuration + @EnableAutoConfiguration. Now we only need to use this single annotation instead of these three.
- Email: They have added a new POM to provide support for email i.e. spring-boot-starter-mail. We can use this by just to inject ‘JavaMailSender’ into our service also we can use the property of spring.mail.* to customize items such as SMTP.
- Undertow: One more embedded server is added i.e. Undertow with addition to tomcat and jetty.
3. v1.3
- Developers Tool: In this spring boot version they have to include a dev tool i.e. spring-boot-dev tools it will improve the development time experience.
This module provides us :
- Automatic start of the application.
- Disable template caches.
- Support remote development.
- It also persists in HTTP sessions on restarts.
- Auto-configuration for Cache: They have provided auto-configuration for a various point
Given below are auto-configuration for various points:
- Redis
- Infinispan
- EhCache
- Guava
- JSR 107
- Hazelcast
- Apart from this it also provides support for in-memory map-based. when we use @configuration with @EnableCaching so caching will automatically be configured in our application.
- Cassandra: They have also provided support for Cassandra.
4. v1.4
Third-party library upgrades:
- tomcat
- jetty
- Jackson
- spring session
- spring integration
- hibernate
- jersy
- spring rest docs
- Ehcache
- Hazelcast
- Elasticsearch etc.
- Couchbase Support: They have provided auto-configuration for Couchbase.
- Neo4J Support: They have also provided auto-configuration for Neo4J. We can now connect to the remote server also we can run a Neo4J server.
- Redis Spring Data Repositories: We can now use Redis with the spring data repository.
- Analysis on Startup Failure: spring now provides us the analysis of startup failures, also gives us useful diagnostic information.
5. v2.0
- Spring boot v2.0 needs java 8.0 as the minimum version of java. So java 8 has come across many new features like lambda expression, functional interface, stream apis, time API, default method in interfaces, etc. so many existing applications are updating themselves to use these java8 features.
Third-party library updates :
- Hibernate
- tomcat
- Thymeleaf
- Flyway
- Property Binding Configuration: This process is used to bind our environment process to @ConfigurationProperties.
- Netty Server: Offer support for netty as an embedded server. For his spring-boot-starter-webflux, POM will pull the netty for us.
- Kotlin: In this version Spring boot also provides support for Kotlin.
- Actuator Improvements: They have provided all HHTP endpoints to the actuator also the JSON paylods are improved. They also have so many improvements tit he actuator endpoints in this version.
- Hypermedia: Now the actuator endpoint available in link formate.
- Actuator Endpoint: Now we can use @Endpoint annotation with @DeleteOperation, @ReadOperation, and @WriteOperation to develope our endpoint.
6. v2.1
Third-party library :
- Micrometer
- Tomcat
- Hibernate
- Undertow
- JUnit
- Data Size Support: With this release, they support metadata and easy format. If a property wants to declare its size then it can use org.springframework.util.unit.data size.
- Logging: They have configured loggers in the one-shot. Like we can configure tomcat group which will do Catalina, coyote, and tomcat logger in one single shot.
- Task Scheduling: We can customize the task scheduler using spring.task.scheduling. Spring boot configures the task scheduling when we use @EnableScheduling annotation in our application. Now TaskSchedulerBuilder is the default.
- Task Execution: We can create custom ThreadPoolTaskExecutor by using TaskExecutorBuilder. in this version of spring it provides auto-configuration for task executor.
- Kafka Streams Support: They now provide auto-configuration for Kafka support by declaring org.apache.Kafka:Kafka-streams dependency.
- Spring JDBC Support: Now spring boot will automatically configure JDBC when we provide the necessary dependencies on the classpath. Or we can also include them by using single dependency spring-boot-starter-data-jdbc.
7. v2.2
- Performance Improvements: In this version, there are performance improvements by adding proxyBeanMethods into the class which contains @configuration annotation. We need to set this property as false like: proxyBeanMethods=false it the new attribute of @configuration annotation.
- They have disabled the tomcat registry by default. also, they have reduced the tomcat memory by 2MB.
- They have reduced the time taken by @configuration property.
- Now the beans which are related to the Actuator endpoint only be created if the given endpoint is exposed and enabled.
- They also improved the condition for auto-configuration now code will no longer be configured if it is not in use.
- Kubernetes: Now they can detect whether the application running on Kubernetes or not.
- Lazy Initialization: Now we can also enable the global lazy-initialization for this we need to use some property i.e. spring.main.lazy-initialization.
Conclusion
So spring boot running on the latest version v2.2 with all new features where we can make our application as small services says microservices.
Recommended Articles
This is a guide to Spring Boot Versions. Here we discuss the introduction and different versions of Spring Boot in detail. You may also have a look at the following articles to learn more –
2 Online Courses | 3 Hands-on Projects | 22+ Hours | Verifiable Certificate of Completion
4.5
View Course
Related Courses