티스토리 뷰

솔루션에 사용되는 OSS version up을 하는데 만만치 않은 작업이다. 재수좋게 pom.xml 의 버전만 띡 올리고 잘 돌아가면 다행이지만 잘 되던 기능들이 안되는 경우도 종종 발생한다. 버전만 변경했을때 잘 되던게 안된다면 가장 먼저 취해야 할 액션은 migration guide를 보는 것이다. 


Springboot 2.1 > 2.2 migration

2.2 version을 간략히 설명하자면 Spring, Spring security의 version이 5.2로 올랐고 성능을 향상시켰으며 lazy init이 가능하고 JDK13 지원 정도 될것 같다. 자세한 설명은 아래를 참조하자. 

Dependency upgrades

Spring Boot 2.2 moves to new versions of several Spring projects:

  • Spring AMQP 2.2
  • Spring Batch 4.2
  • Spring Data Moore
  • Spring Framework 5.2
  • Spring HATEOAS 1.0
  • Spring Integration 5.2
  • Spring Kafka 2.3
  • Spring Security 5.2
  • Spring Session Corn

We’ve also upgraded to the latest stable releases of other third-party libraries wherever possible. Some of the more notable third-party dependency upgrades in this release include:

  • Elasticsearch 6.7
  • Flyway 6.0
  • Jackson 2.10
  • JUnit 5.5
  • Micrometer 1.3
  • Reactor Dysprosium
  • Solr 8.0

Performance improvements

As part of our ongoing efforts to improve performance, we’ve made some significant progress in Spring Boot 2.2 on top of those made in 2.1. Applications will now start even faster and consume less memory while they do so. This can be particularly beneficial in environments with very tight memory constraints.

Lazy initialization

It is now possible to enable global lazy initialization to reduce startup time via the spring.main.lazy-initialization property. Please note that using this feature does come at a cost:

  • Handling of HTTP requests may take longer while any deferred initialisation occurs
  • Failures that would normally occur at startup will now not occur until later

Please see this blog post for a broader discussion of the new feature and some guidance on when it should and should not be enabled.

Java 13 support

Following on from Spring Framework 5.2’s support for Java 13, Spring Boot 2.2 now also supports Java 13 while also remaining compatible with Java 11 and 8.

Immutable @ConfigurationProperties binding

Configuration properties now support constructor-based binding, which allows a @ConfigurationProperties-annotated class to be immutable. Constructor-based binding can be enabled by annotating a @ConfigurationProperties class or one of its constructors with @ConstructorBinding. Annotations such as @DefaultValue and @DateTimeFormat can be used on constructor parameters that are provided by configuration property binding.
Please see the relevant section of the reference documentation for further details.

RSocket Support

Extensive auto-configuration has been added for RSocket along with a new starter, spring-boot-starter-rsocket. Spring Security’s RSocket integration is also auto-configured when the spring-security-rsocket is on the classpath. Please see the relevant section of the reference documentation for further details.

Health indicator groups

It is now possible to organize health indicators into groups. A typical example, if you deploy your application to Kubernetes, is that you may want different groups of health indicators for your “liveness” and “readiness” probes.

Groups can be configured via configuration properties. The following creates a custom group with only the DataSource indicator:

management.endpoint.health.group.custom.include=dbCOPY

The custom group can be invoked by hitting localhost:8080/actuator/health/custom. Check the updated reference documentation for more details.

Other changes

There’s a whole host of other changes and improvements that are documented in the release notes. You can also find a list of deprecated classes and methods that we plan to remove in the next version.


Springboot 2.2 > 2.3 migration

2.3 version을 간략히 설명하자면 JDK 14를 지원하고 Docker에 대한 지원(빌드관련), Graceful Shutdown 지원 정도라고 보면 되겠다. 

Dependency upgrades

Spring Boot 2.3 moves to new versions of several Spring projects:

  • Spring Data Neumann
  • Spring HATEOAS 1.1
  • Spring Integration 5.3
  • Spring Kafka 2.5
  • Spring Security 5.3
  • Spring Session Dragonfruit

We’ve also upgraded to the latest stable releases of other third-party libraries wherever possible. Some of the more notable third-party dependency upgrades in this release include:

  • Cassandra Driver 4.6
  • Couchbase Client 3.0
  • Elasticsearch 7.6
  • Kafka 2.5
  • Micrometer 1.5
  • MongoDB 4.0

Java 14 support

Spring Boot 2.3 supports Java 14 while also remaining compatible with Java 11 and 8.

Docker support

Spring Boot 2.3 adds some interesting new features that can help you package up your Spring Boot application into Docker images.
Support for building Docker images using Cloud Native Buildpacks and has been added to the Maven and Gradle plugins via the spring-boot:build-image goal and the bootBuildImage task. The Paketo Java buildpack is used by default to create images.

Also, support for building jar files with contents separated into layers has been added to the Maven and Gradle plugins.

Graceful shutdown

Graceful shutdown is supported with all four embedded web servers (Jetty, Reactor Netty, Tomcat, and Undertow) and with both reactive and Servlet-based web applications. When a grace period is configured, upon shutdown, the web server will no longer permit new requests and will wait for up to the grace period for active requests to complete.

Liveness and Readiness probes

Spring Boot 2.3 has built-in knowledge of the availability of your application, tracking whether it is alive and whether it is ready to handle traffic. Check this blog post for more details.

Spring Data Neumann

Spring Boot 2.3 ships with Spring Data Neumann that contains numerous major version and driver upgrades. This release also adds GA support for R2DBC.

Other changes

There’s a whole host of other changes and improvements that are documented in the release notes. You can also find a list of deprecated classes and methods that we plan to remove in the next version.


Springboot 2.3 > 2.4 migration

2.4 version을 간략히 설명하자면 일단은 기존의 2.3.8.RELEASE 라고 사용하던 버전을 2.4.0 이런식으로 간결하게 가는 첫 버전이다. Spring의 버전은 5.3으로 올랐고 Security와 Batch도 각각 새로운 버전을 지원한다. JDK는 15까지 지원!

 

Config File Processing (application properties and YAML files)

Spring Boot 2.4 has improved the way that application.properties and application.yml files are processed. If you only have a simple application.properties or application.yml file, your upgrade should be seamless. If, however, you’ve have a more complex setup (with profile-specific properties, or profile activation properties) you may need to make some changes if you want to use the new features.

Volume Mounted Config Directory Trees

A new spring.config.import property can be used to import configuration trees that are commonly used with Kubernetes. A configuration tree is an alternative way of providing key/value pairs. Each pair is declared in its own file, with the filename forming the property key, and the file contents providing the value.

For a complete example, see the updated reference documentation.

Startup Endpoint

A new startup actuator endpoint is now available that shows information about your applications startup. The endpoint can help you identify beans that are taking longer than expected to start.

This work builds on the application startup tracking feature that was recently added to Spring Framwork 5.3. You can read more about the feature in the Spring Framework reference documentation.

Origin Chains

The Origin interface has been updated with a new getParent() method. This allows us to provide a full origin chain that can show exactly where an item originated from.

For example, you might use spring.config.import in your application.properties to import a second file. The Origin of properties loaded from this second file will have a parent that points back to the original import declaration.

You can try this yourself by looking at the output of the actuator/env or actuator/configprops actuator endpoints.

Docker/Buildpack Support

Publishing Images

The Maven plugin’s spring-boot:build-image goal and the Gradle plugin’s bootBuildImage task now have the ability to publish the generated image to a Docker registry. See the Maven and Gradle plugin documentation for more details on configuring the plugins for publishing images.

Authentication

When using Spring Boot’s buildpack support, you can now use a private authenticated Docker registry for your builder or run image. Both username/password and token based authentication are supported.

The Maven and Gradle documentation has been updated to show the new configuration.

Java 15 support

Spring Boot 2.4 supports Java 15 while also remaining compatible with Java 11 and 8.

Dependency upgrades

Spring Boot 2.4 moves to new versions of several Spring projects:

We’ve also upgraded to the latest stable releases of other third-party libraries wherever possible. Please see the release notes for details.

Other changes

There’s a whole host of other changes and improvements that are documented in the release notes. You can also find a list of deprecated classes and methods that we plan to remove in the next version.


Springboot 2.4 > 2.5 migration

2.5 version을 간략히 설명하자면 다음과 같다. 

  • Support for Java 16
  • Support for Gradle 7
  • Enhanced Docker image building
  • New mechanism for Datasource initialization

Additionally, the HTML documentation published by the project has an updated look-and-feel and some new features. There is also support for dark mode!

Dependency upgrades

Spring Boot 2.5 moves to new versions of several Spring projects:

We’ve also upgraded to the latest stable releases of other third-party libraries wherever possible. Please see the release notes for details.

Other changes

There’s a whole host of other changes and improvements that are documented in the release notes. You can also find a list of deprecated classes and methods that we plan to remove in the next version.

 

여기는 2.5 에 대해 간략히 기술되어 있는데 정식 릴리즈 노트에 가보면 어마어마하게 많은 부분이 바뀌었음을 알 수 있다. 

 

참고 : https://spring.io/blog

 

 

끝!

댓글
최근에 올라온 글
최근에 달린 댓글
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30