Spring Boot 3 🔥 | Feature Breakdown | Breaking Changes | New Changes | Part 1

Tech Primers
21 Apr 202316:48

Summary

TLDRThis video discusses the upgrade from Spring Boot 2 to 3, highlighting challenges, breaking changes, new features, and improvements. It covers the correlation between Java versions and Spring frameworks, the necessity of upgrading to Java 17 and Spring Framework 6, and the impacts on third-party dependencies. The video also demonstrates using GraalVM for faster startup times and outlines changes in property loading, deprecated libraries, and security updates. Additionally, it previews new features like improved micrometer API, Prometheus integration, and enhancements in log4j2 and Elasticsearch support.

Takeaways

  • 🚀 Spring Boot 3 was released with significant changes, including the requirement of Java 17 and Spring Framework 6.
  • 🔗 The correlation between Java and Spring Framework versions is crucial when upgrading Spring Boot, as seen from the initial Java 1.6 and Spring 4.0 to Java 17 and Spring 6 in Spring Boot 3.
  • 📈 Spring Boot 3 focuses on improvements such as faster boot times and ahead-of-time compilation, which are part of its new advancements.
  • 🛠️ Upgrading to Spring Boot 3 involves addressing breaking changes, including mandatory upgrades to Java 17 and Spring Framework 6, and dealing with third-party library compatibility.
  • 📚 The official release notes for Spring Boot 3 highlight Java 17 as the baseline, the requirement of GraalVM 22.3 for native image support, and updates to Spring Security and Jakarta EE.
  • 🔧 Spring Boot 3 introduces new features and deprecations, with the removal of deprecated libraries and changes to auto-configuration and property loading.
  • 🔄 The transition from Spring Boot 2 to 3 requires careful consideration of library upgrades, especially for those dependent on Java EE packages that have moved to Jakarta EE.
  • 📉 Deprecation of certain features in Spring Boot 3, such as the removal of 'spring.config.use-legacy-processing', may affect applications using specific configurations.
  • 🌐 GraalVM support in Spring Boot 3 is a notable feature, enabling the creation of native images for faster startup times and improved performance.
  • 📈 Other new features in Spring Boot 3 include upgrades to Micrometer APIs, improvements in Log4j2, and better integration with Prometheus for monitoring.
  • 🗓️ The video script also mentions upcoming discussions on support end dates for different Spring Boot versions and the implications for developers.

Q & A

  • What are the main topics covered in the video script about Spring Boot 3?

    -The script covers the release of Spring Boot 3, its correlation with Java and Spring Framework versions, the challenges faced during the upgrade from Spring Boot 1 or 2 to 3, and a detailed look at the new features, improvements, breaking changes, and deprecations in Spring Boot 3.

  • Why was Spring Boot created and what is its initial version?

    -Spring Boot was created on top of Java and the Spring Framework to simplify the bootstrapping and development of new Spring applications. Its initial version, launched in April 2014, was 1.0.0, using Java 1.6 and Spring Framework 4.0 plus.

  • What are the major Java and Spring Framework version jumps with Spring Boot 3?

    -Spring Boot 3 introduced a significant leap in JDK versions, moving to JDK 17, and also upgraded to Spring Framework 6, which includes improvements in boot-up times and ahead-of-time compilations.

  • What is the significance of the GraalVM in Spring Boot 3?

    -GraalVM is significant in Spring Boot 3 as it supports ahead-of-time compilation, which greatly reduces application startup time. Spring Boot 3 requires GraalVM version 22.3 or later for native image support.

  • What are the challenges one might face when upgrading from Spring Boot 2 to 3?

    -Challenges include the need to upgrade to JDK 17 and Spring Framework 6, potential incompatibilities with third-party libraries that may not support these newer versions, and the need to migrate to Jakarta EE for packages previously using Java EE.

  • What is the impact of upgrading to Spring Boot 3 on Spring Data JDBC?

    -There is a breaking change in Spring Data JDBC where the conditional bean auto-configuration has been altered. Users might need to re-inject beans using auto-configuration if they were using conditional bean injections in Spring Boot 2.4.

  • What is the default behavior when loading properties in Spring Boot 3.0 with multiple profiles?

    -In Spring Boot 3.0, the default behavior when loading properties with multiple profiles is that whatever gets loaded last will be the highest priority, as it uses a HashMap to store values.

  • What are some of the new features in Spring Boot 3 that could be beneficial for developers?

    -New features include improved micrometer API support for easier integration with Prometheus, enhancements in log4j2 for better profile and environment property management, and automatic population of trace IDs in Prometheus for micrometer tracing.

  • What does the script suggest for identifying deprecated classes or libraries in an existing Spring Boot application?

    -The script suggests using compiler arguments such as `-Werror` and `-Xlint:deprecation` with the Maven compiler plugin to identify deprecated classes or libraries and break the build if deprecations are used.

  • What is the importance of the support end dates mentioned in the script for Spring Boot versions?

    -The support end dates are important as they indicate the period during which a particular version of Spring Boot will receive updates and support. Understanding these dates can help in planning upgrades to newer versions.

  • How does Spring Boot 3 handle the integration of Spring Security?

    -Spring Boot 3 has upgraded Spring Security, leading to several changes in how it integrates with the Spring Security library. Developers using Spring Security extensively should look out for specific changes and updates in the upcoming videos mentioned in the script.

Outlines

00:00

🚀 Spring Boot 3 Release and Upgrade Challenges

This paragraph discusses the release of Spring Boot 3 and the challenges faced during the upgrade from previous versions. It outlines the agenda for the video, which includes understanding the correlation between Java, Spring Framework, and Spring Boot versions, as well as exploring the new features, improvements, and deprecations in Spring Boot 3. The video aims to provide a feature-level breakdown, highlighting the reasons for Spring Boot 3's creation, the official release notes, and a quick demo on identifying duplicated code or annotations.

05:01

🛠️ Breaking Changes and Dependencies in Spring Boot 3 Upgrade

The paragraph focuses on the significant changes and challenges in upgrading to Spring Boot 3, particularly the requirement to upgrade to Java 17 and Spring Framework 6. It discusses the impact on dependent libraries that may not support these newer versions and the need to be cautious with third-party libraries. It also mentions specific breaking changes, such as the removal of support for 'useLegacyProcessing' in property loading and the deprecation of certain libraries, emphasizing the importance of addressing these issues during the upgrade process.

10:02

🌟 New Features and GraalVM Support in Spring Boot 3

This paragraph introduces new features in Spring Boot 3, with a particular emphasis on GraalVM native image support. It provides a demonstration of building a GraalVM native image to showcase the benefits of ahead-of-time compilation, which significantly reduces application startup time. The paragraph also briefly mentions other improvements, such as updates to Micrometer APIs, Log4j2, and integration with Prometheus, and touches on the importance of understanding these new features for developers looking to upgrade.

15:04

🔍 Upcoming Topics and Community Engagement

The final paragraph wraps up the video by summarizing the topics covered and previewing upcoming content. It mentions plans to discuss further improvements in Spring Boot, deprecations, and support end dates in future videos. The speaker invites viewers to share topics they'd like to see covered and encourages engagement through likes and subscriptions, fostering a sense of community and ongoing dialogue around Spring Boot development.

Mindmap

Keywords

💡Spring Boot

Spring Boot is an open-source Java-based framework that simplifies the bootstrapping and development of new Spring applications. In the video, it is the primary subject, discussing its evolution from version 1 to 3, including the challenges and new features introduced with each upgrade.

💡Spring Framework

The Spring Framework is the foundation upon which Spring Boot is built. It provides comprehensive infrastructure support for developing Java applications. The script mentions the correlation between the versions of Java and the Spring Framework when upgrading Spring Boot.

💡Java JDK

Java JDK (Java Development Kit) is a software development environment that includes the Java runtime, necessary libraries, and tools to develop and run Java applications. The video discusses the requirement of upgrading to JDK 17 for Spring Boot 3.

💡Breaking Changes

Breaking changes refer to modifications in a software update that are not backward compatible, requiring developers to make corresponding changes in their code. The script outlines several breaking changes in Spring Boot 3, such as the mandatory upgrade to Java 17 and Spring Framework 6.

💡New Features

New features are enhancements or additions to a software product that provide extra capabilities or improvements. The video highlights new features in Spring Boot 3, such as support for GraalVM native images and improvements in startup times.

💡Deprecations

Deprecations are announcements that certain features of a software will no longer be supported in future versions, advising users to migrate to alternative solutions. The script discusses the removal of deprecated libraries and features in Spring Boot 3.

💡GraalVM

GraalVM is a high-performance runtime that provides significant improvements in application startup time and memory consumption. The video demonstrates the use of GraalVM with Spring Boot 3 to create native images for faster application startup.

💡Jakarta EE

Jakarta EE is a modern, open-source version of Java EE, which is a standard for developing enterprise-scale Java applications. The script mentions the migration to Jakarta EE in Spring Boot 3, affecting package versions like 'java.x.servlet' to 'jakarta.servlet'.

💡Spring Data JDBC

Spring Data JDBC is a part of the Spring Data project that provides support for JDBC access to databases while retaining the database independence of the code. The video mentions a breaking change in Spring Data JDBC related to conditional bean auto-configuration.

💡Micrometer

Micrometer is an application metrics facade that supports various monitoring systems. The script discusses improvements in Micrometer API support in Spring Boot 3, allowing for seamless integration with Prometheus for application metrics.

💡Log4j2

Log4j2 is an improvement over Log4j that provides significant performance, scalability, and flexibility. The video mentions enhancements in Log4j2 integration within Spring Boot 3, including better management of environment properties and system properties.

Highlights

Spring Boot 3 has been released, bringing with it a variety of new features, improvements, and breaking changes.

Upgrading from Spring Boot 1 or 2 to version 3 involves challenges due to new advancements and deprecations.

Spring Boot 3 introduces a feature level breakdown, including a correlation between Java, Spring, and Spring Boot Frameworks and libraries.

The creation of Spring Boot 3 is linked to the evolution of Java and Spring Framework versions, starting with Java 1.6 and Spring Framework 4.0.

Spring Boot 3 requires Java JDK 17, marking a significant leap from previous versions which supported Java 8.

Spring Framework 6 is integrated into Spring Boot 3, offering improvements in boot up times and ahead of time compilations.

Spring Boot 3's release notes highlight the Java 17 Baseline and the requirement of GraalVM 22.3 for native image support.

Spring Security and other libraries have been upgraded in Spring Boot 3, impacting security integrations.

Jakarta EE has replaced Java EE, moving package versions from 'java.x' to 'Jakarta.*'.

Log4j2, Micrometer, and Prometheus integrations have been improved in Spring Boot 3 for better observability.

Breaking changes in Spring Boot 3 include mandatory upgrades to Java 17 and Spring Framework 6, affecting dependent libraries.

Spring Data JDBC has seen breaking changes in conditional bean auto-configuration.

Spring Boot 3 removes support for legacy property processing, impacting how properties and YAML files are loaded.

Deprecated libraries have been removed from Spring Boot 3, requiring developers to address deprecations in their code base.

GraalVM support in Spring Boot 3 enables ahead of time compilation, significantly reducing application startup times.

Spring Boot 3's native image support with GraalVM allows for containerized applications to start up in milliseconds.

New and noteworthy features in Spring Boot 3 include improvements in Micrometer APIs, Log4j2, and automatic trace ID population for Prometheus.

Auto-configuration changes in Spring Boot 3 accommodate updates in the Elasticsearch Java client library.

Transcripts

play00:01

it's been a while since springboard 3

play00:03

got released if you have already

play00:05

upgraded do let us know what were some

play00:07

of the challenges which you faced when

play00:09

you are upgrading your spring boot

play00:11

version from two or one to three

play00:13

if you haven't upgraded then let's look

play00:16

at the feature level breakdown and

play00:18

understand what are some of the breaking

play00:19

changes what are some of the new

play00:21

advancements features improvements and

play00:23

also deprecations which happened within

play00:25

the springboard 3 version this is how

play00:27

the agenda goes we are going to see this

play00:29

particular breakdown in two different

play00:30

sections or two different parts in the

play00:33

first part we are going to look at why

play00:34

springboard 3 was even created what is

play00:37

the correlation between Java spring and

play00:39

also the spring boot Frameworks and the

play00:42

libraries

play00:43

we will look at the official feature

play00:45

release notes at a high level what did

play00:47

spring mention in their release notes we

play00:49

will break down into some of the

play00:51

breaking changes with respect to

play00:53

springboard 3.0 and also we will look at

play00:55

the new and noteworthy features which

play00:57

spring has added I'll show a quick demo

play01:00

on how to identify duplicated code or

play01:03

annotation or a method and also

play01:06

a new feature with a quick glimpse

play01:09

of course I cannot show everything in a

play01:11

particular video but then we will break

play01:12

down that in the further videos in the

play01:14

next part we will be looking at

play01:16

improvements deprecations and also the

play01:18

support end dates with this let's get

play01:22

started

play01:25

[Music]

play01:28

so why did spring boot even get created

play01:30

if you look at the history of spring

play01:32

boot spring boot was created on top of

play01:35

java and the spring framework

play01:38

so we have to correlate the versions of

play01:41

java and spring framework when we are

play01:43

upgrading or when we are correlating

play01:45

boot versions

play01:47

when initially spring boot was launched

play01:49

it was using the Java version 1.6 it was

play01:52

also using the spring framework 4.0 plus

play01:55

so which basically means 4.0 subversions

play01:58

whatever and spring boot was launched in

play02:00

April 2014 and they were naming that

play02:03

version as 1.0.0 that's the initial

play02:06

Inception of spring Boot and it started

play02:08

with jdk 1.6 later spring upgraded to

play02:11

Spring framework 5.0 and also version

play02:14

Java 8 was introduced and springboard 2

play02:18

was launched in March 2018. most of us I

play02:21

believe are using spring Boot 2 and in

play02:23

fact we are using 2.1 because we

play02:25

upgraded to Java or the jdk 11 whoever

play02:28

upgraded to jdk 11 they were able to

play02:31

easily move to Spring boot 2.1 over had

play02:34

to stay with Java 8 they stayed with the

play02:36

spring Boot 2 version if you see the

play02:38

correlation between the jump between

play02:39

spring Boot 2 and spring boot 2.1 you

play02:42

can see that both the spring framework

play02:44

and the Java version changed a lot

play02:45

however with spring boot 3 there is a

play02:48

huge leap in terms of jdk upgrade the

play02:51

spring framework update as well so Java

play02:54

has now jumped to Java jdk 17 which is

play02:57

the long term support version and also

play03:00

spring framework has been upgraded to

play03:02

Spring frame box 6 which has a lot of

play03:03

improvements in terms of boot up times

play03:05

and ahead of time compilations Etc

play03:08

so spring boot 3.0 got launched in

play03:11

November 2022 and it's been pretty solid

play03:13

in terms of providing features and

play03:15

faster boot up times compared to its

play03:17

previous versions however if you

play03:19

personally asked me what did I find

play03:21

interesting about spring boot 3 except

play03:24

for the ahead of time compilation I did

play03:25

not find it feature heavy but still I

play03:28

would show you some of the features

play03:30

which I liked and which I think would be

play03:32

helpful for the developers and the

play03:34

community so now let's look at the

play03:36

official release notes which spring has

play03:38

released

play03:40

of course the first and the foremost is

play03:42

the Java 17 Baseline so spring boot 3.0

play03:45

is now Baseline with Java 17 which

play03:48

basically means you cannot run any lower

play03:50

version less than Java 17 to run the

play03:53

spring boot version 3.

play03:54

of course recently they announced Java

play03:56

20 as well I'm not sure if springboot 3

play03:58

supports it already but Java 19 is

play04:01

already supported so if you are already

play04:03

ahead on time with respect to Java

play04:05

versions you can still use spring boot

play04:07

if you are lacking with the Java version

play04:09

definitely you will have to upgrade the

play04:10

jdk along with it

play04:13

in addition to it

play04:14

spring boot 3 requires gral 22.3 version

play04:17

or even the latest build to

play04:20

use the NATO build support and also the

play04:23

tools around it I'll show a quick demo

play04:25

in a bit on using crawl VM

play04:29

it also requires the spring framework

play04:30

six wheel which we just saw in addition

play04:33

to it Spring Security also got upgraded

play04:35

so there will be a lot of changes with

play04:37

respect to Security in terms of

play04:39

integrating with this Spring Security

play04:41

Library so if you are using heavily

play04:43

Spring Security for your spring boot

play04:45

application do check out

play04:47

my upcoming videos with respect to

play04:49

security changes in addition to it

play04:51

spring also migrated to the latest

play04:53

Jakarta EE

play04:56

so Java ee is duplicated so any package

play04:59

version which is like Java x dot servlet

play05:01

got moved to Jakarta solids so that's

play05:03

what is mentioned in the official

play05:05

documentation in addition to it there is

play05:07

mentioned about the gravel VM native

play05:08

image Support also there are a lot of

play05:10

improvements with respect to log 4j2

play05:12

micrometer Prometheus Etc

play05:15

these all provide seamless integration

play05:17

within the new spring boot framework or

play05:19

the version 3.0

play05:22

now let's look at some of the braking

play05:24

changes and also the new improvements

play05:26

which were noteworthy

play05:28

the first and the foremost breaking

play05:30

change of course is the Java version if

play05:32

let's say I'm using Java 11 then there

play05:35

is no luxury for me to continue using

play05:37

Java 11 but I am forced to use Java 17

play05:39

in order to go to the latest version of

play05:41

spring boot so you will have to upgrade

play05:43

your Java version to Java 17 right it's

play05:46

a breaking change

play05:47

in addition to its spring framework 6

play05:49

like we mentioned earlier it's again a

play05:51

breaking change because we need to

play05:52

upgrade to string version 6. now the

play05:55

challenge with respect to upgrading jdk

play05:57

and the spring framework is the

play05:59

dependent libraries there are a lot of

play06:01

dependent libraries which may not be

play06:03

supporting Java 17 and the spring

play06:05

Frameworks so if you are having a

play06:08

application which has a lot of

play06:09

third-party dependencies or maybe like

play06:11

Downstream dependencies you have jars

play06:13

from some other team some other

play06:14

application created it some other

play06:16

libraries getting integrated then just

play06:18

be cautious around integrating these

play06:21

libraries because they need to be

play06:22

supporting Java 17 and also the spring

play06:24

framework 6 and in addition to it they

play06:27

also should be using Jakarta ee if you

play06:30

have package version such as Java x dot

play06:33

server then you might end up in issue

play06:35

something like these right Jetty for

play06:38

example if let's say you're not using

play06:40

Tomcat as a web server and if you're

play06:42

using Jetty then Jetty 11 recently

play06:45

supported or started supporting Jakarta

play06:48

servlets the Imports now is going to be

play06:50

Jakarta dot servlets instead of java x

play06:53

dot servlets right so lot of libraries

play06:56

which leverage the Java ee package might

play06:59

be affected so you might want to upgrade

play07:01

those as well so just be cautious with

play07:03

respect to third-party Library upgrades

play07:05

because majority of the projects will be

play07:07

failing in this particular phase so you

play07:09

will have to upgrade the dependent

play07:10

versions of those libraries as well

play07:13

one another noticeable thing which I saw

play07:15

was with respect to Spring data jdbc

play07:18

there is a breaking change in terms of

play07:20

providing a conditional beam Auto

play07:21

configuration compared to what we used

play07:23

to do earlier so it's a minor change but

play07:26

still if you're using spring data jdbc

play07:28

then I would just mention it's a

play07:30

breaking change just take a look at you

play07:32

might have to just re-inject the beam in

play07:34

terms of conditional beam injections

play07:36

using Auto configuration if you were

play07:38

using springboot 2.4 you know that the

play07:42

way we load properties and yaml file

play07:44

configurations into spring config got

play07:46

changed so in order to retain that we

play07:48

used a property called Spring config use

play07:50

Legacy processing that support has been

play07:53

dropped now with springboot 3.0 so let's

play07:55

say you had application.properties and

play07:57

also application.yaml then with respect

play08:00

to Spring boot application loader there

play08:02

was a change in Spring boot 2.4 and

play08:04

above where we were loading everything

play08:07

into a hash map so spring boot was

play08:08

loading everything into a hash map and

play08:10

whatever gets loaded last will be the

play08:13

highest price ready right and if you

play08:16

didn't want that kind of an off option

play08:17

let's say you were using a lot of

play08:18

profiles and you didn't want to load the

play08:21

last profile first right in that case we

play08:23

used to use this configuration called as

play08:25

use Legacy processing if you are using

play08:27

this that support has been removed from

play08:29

springboot 3.0 so just be mindful that

play08:32

it's a breaking change in terms of

play08:33

loading properties when you are using

play08:35

different profiles the last one used to

play08:38

get loaded so that's the default now so

play08:40

don't be surprised if some property got

play08:42

changed if you're using just one

play08:44

property file which is like either

play08:45

application or Properties or

play08:46

application.yaml I don't think you

play08:48

should have that issue but still be

play08:50

mindful that there is a priority in

play08:52

terms of Whatever Gets loaded last will

play08:54

be the one which gets stored because

play08:56

it's using hashmap to store the values

play08:59

and the final one spring boot removed

play09:02

all the ad deprecated libraries from its

play09:05

code base right so if let's say I'm

play09:07

using spring boot version 2.7 uh let me

play09:10

show you a real-time demo so I have a

play09:13

project called load trading example

play09:15

um I recently did a load trading video I

play09:17

was using springboot 2.7 so this

play09:19

particular version of the application is

play09:21

using springboot 2.7 and I want to

play09:25

identify what are the duplicated

play09:26

libraries in this particular version so

play09:29

I want to upgrade to Spring boot 3 but I

play09:31

also want to make sure I identify what

play09:33

are the deprecated versions which I'm

play09:34

using within the code base so for

play09:36

example I right now don't have any

play09:39

duplicated version usage so what I did I

play09:42

added this parameter called as hyphen W

play09:45

error and then hyphen X lint deprecation

play09:47

these are two different compiler

play09:49

arguments which I'm providing to my

play09:51

Maven compiler plugin so using the maven

play09:54

compiler plugin I can just now do a May

play09:56

1 clean compile and this should now help

play10:00

me in Breaking the build if let's say

play10:02

there is a deprecation version so I'm

play10:04

going to use this deprecated class

play10:06

called as elasticsearch rest Health

play10:08

indicator so I'll go to the duplicated

play10:10

example I already wrote the simple

play10:13

usage right I just use that particular

play10:16

class and then I am just not doing

play10:18

anything I'm just assigning null right

play10:19

now if I recompile this code this code

play10:22

should break because I'm now using a

play10:24

duplicated class in my code base notice

play10:26

that my build failed here saying that

play10:28

there is a warning and there is a

play10:30

compilation error because I specify W

play10:32

error so that means I want to fail my

play10:35

build if there is a warning in terms of

play10:37

deprecation so there is a duplication

play10:39

warning so see here there is a

play10:41

compilation warning in terms of there is

play10:43

a duplicated Library so this is one

play10:46

example how you can identify what

play10:49

duplicated version of the library's

play10:51

classes or annotations which you are

play10:53

using in your current version when you

play10:56

are upgrading to Spring boot so this is

play10:57

a very useful way in which you can add

play10:59

identify breaking changes in terms of

play11:02

deprecations you shouldn't be surprised

play11:04

something got removed those are some of

play11:07

the breaking changes which I found if

play11:09

you think there is another breaking

play11:11

change which I missed or anything which

play11:12

I missed just let me know in the comment

play11:14

section below others could benefit from

play11:16

that as well

play11:17

now coming to the new and the note for

play11:20

the features the gralvium support is

play11:22

something which is new uh I have a quick

play11:25

demo for that as well uh in order to use

play11:27

this I'm going to use the Graal VM jdk

play11:29

version 22.3 you cannot use the open jdk

play11:32

version that doesn't work you will have

play11:34

to use the gravel VM version to support

play11:37

it so I have a Docker I'm using Rancher

play11:39

desktop running so Docker is running as

play11:42

well right

play11:43

um so in order to run an image you need

play11:45

a Docker image obviously you need a

play11:47

Docker runtime I have Docker you can use

play11:49

any container runtime now how to build

play11:51

this particular project is I'm going to

play11:53

use the command mavenclean package

play11:54

hyphen P NATO right this particular

play11:57

project ground demo is using spring boot

play12:01

3.0.6 which is the latest version of

play12:03

spring boot as of today I'm using this

play12:05

particular version now I want to create

play12:07

a gralvium image I'll show you why

play12:09

gralium is important in a bit

play12:12

I'm now converting this particular jar

play12:14

file whatever gets created into an image

play12:16

so that it's easy for me to load into a

play12:19

containerized environment right now let

play12:21

me run this and you will see the power

play12:23

of ahead of time compilation which I was

play12:25

talking about with respect to springboot

play12:27

3.0 now this particular project is

play12:30

getting built and you can see that we

play12:33

are generating an image it's going to

play12:35

take few minutes and you see the Java

play12:37

version which I'm using the raw

play12:39

vm22.3.1 and it's a Community Edition so

play12:42

I'm just using this particular version

play12:45

so this is going to generate a gral

play12:47

image within our Target folder right

play12:50

I'll show that image in a bit but the

play12:52

idea of this particular growl images

play12:54

it's going to compress our jar file into

play12:57

a format where you can easily start up

play12:59

the application in seconds or maybe less

play13:02

than seconds or even in milliseconds

play13:04

right in this case I don't have any code

play13:07

in this particular ground demo so I

play13:09

should be able to start this particular

play13:10

application in milliseconds but

play13:12

generally spring boot is famous for

play13:13

starting up timer I mean it takes a lot

play13:15

of time even for a Hello World

play13:16

application right but with gral and over

play13:19

the period of time in the last few years

play13:20

springboot has been working in terms of

play13:23

improving their startup time and it's

play13:25

very clearly visible with respect to the

play13:27

new gravvium version and also the spring

play13:30

boot 3. if you don't know what is graul

play13:32

VM I have made a separate video on what

play13:34

is gralvium do take a look at that as

play13:36

well so the gral image got successfully

play13:39

built and we can see that the artifacts

play13:42

are now present in the Target folder let

play13:44

me go to the Target folder

play13:49

and you can see that there is a gral

play13:51

demo which is an image so this

play13:53

particular project is Graal demo so

play13:55

earlier we used to run something like

play13:57

Java hyphen jar and then just that run

play14:00

the Java application or we just have a

play14:02

container and then we run that container

play14:04

right we go to Docker images and then

play14:06

from there we used to run it now we have

play14:08

created a grawl image so I can just do a

play14:09

gral

play14:11

um

play14:12

demo and we should be able to spin up

play14:14

our spring boot application notice that

play14:16

this particular application came in

play14:18

almost like 83

play14:19

milliseconds right it's as fast as

play14:22

whatever it could get right this is the

play14:24

power of AD of time compilation so this

play14:27

is one of the major reasons I would want

play14:29

to move towards springboot 3.0 because

play14:31

ahead of time compilation like reduces

play14:33

the startup time like anything and I can

play14:36

easily containerize my application with

play14:37

a gral native support and it provides

play14:39

lot of improvements in terms of

play14:41

processing and removing the jet compiler

play14:44

based approach towards Graal approach

play14:46

now coming back to our spring boot

play14:48

features which are new and noteworthy

play14:50

there are few other features like

play14:53

um we saw in the previous section

play14:55

micrometer apis have been upgraded I

play14:58

don't have a demo to show quickly but

play15:00

definitely we will do that in the coming

play15:01

videos there has been a lot of

play15:04

improvement in the micrometer API

play15:06

support so you can easily plug

play15:07

Prometheus into micrometer and you can

play15:09

get stats out of it in addition to it

play15:11

the there's also Improvement in the log

play15:13

4j2

play15:15

the way we manage profiles environment

play15:17

properties their lookups and also the

play15:19

system properties a lot of improvement

play15:21

has been done with respect to that and

play15:23

also the Prometheus integration with

play15:24

micrometer tracing has been improved if

play15:27

let's say you have micrometer tracing

play15:29

enabled then the span ID and the trace

play15:32

ID is automatically populated for

play15:34

Prometheus so that you can get easily

play15:36

the trace ID or the traceable

play15:37

information across your micro Services

play15:39

when you are in a micro Services setup

play15:42

so all those are done automatically out

play15:44

of the box by the latest version of

play15:45

springboot and of course finally there

play15:47

are a lot of Auto configuration changes

play15:49

with respect to the new elasticsearch

play15:51

Java client Library which elastic

play15:53

recently updated and again spring boot

play15:56

supports that these are some of the high

play15:58

level changes which I thought would be

play16:00

helpful in terms of

play16:02

understanding what are the feature level

play16:03

breakdown and how springboot 3.0 fed in

play16:08

terms of improving its version for the

play16:09

betterment of the developer community in

play16:11

the next video I'm going to show you the

play16:13

improvements what spring boot has done

play16:15

the duplications with respect to Spring

play16:17

boot what are the annotations and the

play16:19

classes which got deprecated and finally

play16:21

we will look at what's beyond that what

play16:23

is the end date what are the support end

play16:25

dates what is the support indeed for

play16:27

even the 2.0 versions

play16:29

um I will be discussing all that in the

play16:31

next video If let's say you want me to

play16:33

specifically discuss anything with

play16:35

respect to Spring boot do let me know

play16:36

that particular Topic in the comment

play16:38

section below as always if you like the

play16:40

video go ahead and like it if you

play16:42

haven't subscribed to the channel go and

play16:43

subscribe to it meet you again in the

play16:45

next video thank you very much

Rate This

5.0 / 5 (0 votes)

相关标签
Spring BootJava 17GraalVMFramework UpgradeBreaking ChangesAhead-of-Time CompilationJakarta EESpring SecurityMicrometer APIDeveloper InsightsSpring Framework 6
您是否需要英文摘要?