SlideShare a Scribd company logo
Dan Vega
Spring Developer Advocate
Spring Boot 3
& Beyond
© 2020 Spring. A VMware-backed project.
Cover w/ Image
About Me
● Husband & Father
● Cleveland, OH
● Software Developer 22+ Years
● Spring Developer Advocate
● Content Creator www.danvega.dev
● Writing - Blog & Newsletter
● YouTuber
● @therealdanvega
Spring Boot 3 And Beyond
Cover w/ Image
A new generation of Spring for 2023 and beyond
● Spring Boot 3
● JDK 17+
● Jakarta EE 9 / 10 (Jakarta namespace)
● AOT (Ahead-Of-Time) Compilation
● Observability (Micrometer)
● But wait, there's more!
● Spring Boot 3.1
● Docker Compose Module
● Spring Boot 3.2
● Virtual Threads (“Project Loom”)
Spring Boot 3.0
Java and Jakarta
Spring Boot 3 And Beyond
Baseline: JDK 17 LTS
Language: text blocks, switch expressions
Core libraries: collection factory methods, etc
Type system: records, sealed classes
Module system: module introspection, module path scanning
Performance Improvements
Security Updates
Empowering the framework as well as applications
JDK 17 / 20 / 21
Spring generally embraces the latest JDK/JVM versions
JDK 17 baseline retained for long-term support purposes
E.g. in JDK 20: virtual threads, record patterns (preview)
JDK 21 on the horizon as next long-term support release
Consider upgrading your JDK along with Spring Framework 6.x
Baseline: Jakarta EE 9
A new namespace: Java EE 8 → Jakarta EE 9
Servlet API 5.0 : javax.servlet → jakarta.servlet
JPA 3.0 : javax.persistence → jakarta.persistence
Bean Validation 3.0 : javax.validation → jakarta.validation
Dependency Injection 2.0 : javax.inject → jakarta.inject
All further API evolution to happen in jakarta namespace
Migrating with the help of IDEs & Tools
Jakarta EE 9 / 10
Tomcat 10.0 / 10.1 – Servlet API 5.0 / 6.0
Jetty 11 / 12 – Servlet API 5.0 / 6.0
Undertow 2.3 – Servlet API 6.0
Hibernate ORM 6.1 – JPA 3.0 / 3.1
Hibernate Validator 7.0 / 8.0 – Bean Validation 3.0
Note: API upgrades not coupled to major provider versions anymore!
Ahead-of-Time
What is it?
● What is Ahead of Time Compilation?
● Java is a dynamic language
● Runtime hints for reflection, resources, serialization, proxies
● Precondition for GraalVM native executables
● Reducing startup time and memory footprint in production
● AOT is a tradeoff; extra build setup and less flexibility at runtime
Why Compile to Native?
Use Cases for Native Images
Observability
Observability
Observability is the ability to observe the internal state of a running
system from the outside. It consists of the three pillars logging, metrics
and traces.
Direct Observability instrumentation with Micrometer Observation in
several parts of the Spring Framework.
RestTemplate and WebClient are instrumented to produce HTTP client
request observations.
Spring Cloud Sleuth no longer needed for Distributed Tracing
Observation API
Spring Boot 3 - But wait there’s more!
HTTP Interface Client
RFC 7807 Problem Details
Spring Data 2022
Spring Security 6
Spring Authorization Server 1.0
Spring for GraphQL 1.1
More
Spring Boot 3.1
Spring Boot 3.1
Using Testcontainers at Development Time
Docker Compose spring-boot-docker-compose module
Auto-Configuration for Spring Authorization Server
Building Docker Images with Maven or Gradle
Spring for GraphQL 1.2
Dependency Upgrades
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.1-Release-Notes
Docker Compose Module
Spring Boot 3 And Beyond
Spring Boot 3 And Beyond
Demo
Spring Boot 3.2
Project Loom / Virtual Threads
What is a Thread in Java
● Java is Multithreaded by default
● java.lang.Thread
● Abstraction over operating system threads
● Every thread is essentially a wrapper over an OS thread
● OS/JVM thread = platform thread
● Platform threads are expensive
● Take a lot of memory / take time to create & destroy
● Traditional threads are stored on the JVM stack
Project Loom is to intended to explore,
incubate and deliver Java VM features and
APIs built on top of them for the purpose of
supporting easy-to-use, high-throughput
lightweight concurrency and new
programming models on the Java platform.
Project Loom
Project Loom includes the following JEPs.
● JEP 425: Virtual Threads (Preview) was integrated in JDK 19
● JEP 428: Structured Concurrency (Incubator) was integrated in JDK 19.
● JEP 429: Scoped Values (Incubator) has been integrated for JDK 20.
“Project Loom” Virtual Threads
Virtual Threads
● JDK 19 includes Virtual Threads as a Preview Feature
● Targeted for JDK 21
● Not Linked to an OS thread
● Use the heap for the stack (potential implications for GC)
● Have their own scheduler
● Created for a task and then allowed to terminate
● Do not pool virtual threads
Thread-Per-Request
Spring Boot 3 And Beyond
Spring Boot 3 And Beyond
Spring Boot 3 And Beyond
Spring Boot 3 And Beyond
Spring Boot 3 And Beyond
Virtual Threads &
Spring Applications
Embracing Virtual Threads in Spring Applications
Web Applications.
● Servlet callback based on Input / Output Stream
● Tomcat / Jetty Executor setup for dispatching to request handlers
● “Loom-ready” database drivers, scalable connection pool setup
● Ideally no code changes in the main application codebase
● Virtual threads supported in GraalVM Native Image as well
● Significant scalability benefits for database driven web applications
Embracing Virtual Threads in Spring Applications
Messaging / Scheduling
● Spring managed task executors with virtual thread options
● JMS Message Listener containers
● @Scheduled handler methods
● Many of those listeners and handlers methods trigger I/O operations
Embracing Virtual Threads in Spring Applications
Where it doesn’t make sense
● Purely CPU bound handler methods
● Reactive based web applications
Virtual Threads
Loom vs Reactive Programming
● Virtual Threads provide a different scalability mechanism
● Traditional imperative programming style
● Empowering Spring MVC to reach maximum scalability
● Spring Webflux as an architecture for stream based processing
● Reactive: Stream based processing not primarily for scalability (anymore)
Demo
Spring Framework 6.0 – available now
Foundation for Spring Boot 3.0 & 3.1
Production-ready on JDK 17 LTS
Regular stream of 6.0.x releases in 2023
Spring Framework 6.1 – November 2023
Foundation for Spring Boot 3.2 & 3.3
Production-ready on JDK 17 & 21 LTS
Release candidate expected in October 2023
Thank you
Contact me at dvega@vmware.com
@therealdanvega
Copyright © 2020 VMware, Inc. or its affiliates.

More Related Content

PPT
Spring Core
PDF
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
PDF
Recent Trends in Personalization at Netflix
PDF
Data engineering zoomcamp introduction
DOCX
High level design document template
PDF
IBM WebSphere application server
PPTX
API Docs with OpenAPI 3.0
PDF
Making The Move To Java 17 (JConf 2022)
Spring Core
All About JSON and ClickHouse - Tips, Tricks and New Features-2022-07-26-FINA...
Recent Trends in Personalization at Netflix
Data engineering zoomcamp introduction
High level design document template
IBM WebSphere application server
API Docs with OpenAPI 3.0
Making The Move To Java 17 (JConf 2022)

What's hot (20)

PDF
SpringOne Tour: Spring Boot 3 and Beyond
PDF
REST APIs with Spring
PPTX
Angular introduction students
PDF
Swagger UI
PDF
REST vs GraphQL
PDF
Spring boot
PPTX
Introduction to Spring Framework
 
PDF
Spring MVC Framework
PDF
Spring boot introduction
ODP
Introduction to Swagger
PDF
Angular Advanced Routing
PPTX
Hibernate ppt
PPTX
Angular Data Binding
PPTX
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
PPTX
Document your rest api using swagger - Devoxx 2015
PPTX
Spring Boot
PDF
Understanding Reactive Programming
PDF
OpenAPI 3.0, And What It Means for the Future of Swagger
PPTX
Spring Boot and REST API
PDF
Express node js
SpringOne Tour: Spring Boot 3 and Beyond
REST APIs with Spring
Angular introduction students
Swagger UI
REST vs GraphQL
Spring boot
Introduction to Spring Framework
 
Spring MVC Framework
Spring boot introduction
Introduction to Swagger
Angular Advanced Routing
Hibernate ppt
Angular Data Binding
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Document your rest api using swagger - Devoxx 2015
Spring Boot
Understanding Reactive Programming
OpenAPI 3.0, And What It Means for the Future of Swagger
Spring Boot and REST API
Express node js
Ad

Similar to Spring Boot 3 And Beyond (20)

PDF
Spring Update | July 2023
PPTX
Micronaut: A new way to build microservices
PDF
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
PPT
J2EE Batch Processing
PPTX
Advance java prasentation
PPTX
WebLogic Developer Experience and Java EE 6
PDF
A Hitchhiker's Guide to Cloud Native Java EE
PDF
A Hitchhiker's Guide to Cloud Native Java EE
PPT
1.INTRODUCTION TO JAVA_2022 MB.ppt .
PPTX
Quarkus and GraalVM
PPTX
Java dev mar_2021_keynote
PPT
Cloud compiler - Minor Project by students of CBPGEC
PPT
Apache Tomcat 7 by Filip Hanik
PDF
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
PDF
Java 40 versions_sgp
PPT
Java2 platform
PDF
Java 9 and Beyond
PPT
Gwt Presentation1
PPT
EmbeddedJavaSmall.ppt
PDF
node.js 실무 - node js in practice by Jesang Yoon
Spring Update | July 2023
Micronaut: A new way to build microservices
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
J2EE Batch Processing
Advance java prasentation
WebLogic Developer Experience and Java EE 6
A Hitchhiker's Guide to Cloud Native Java EE
A Hitchhiker's Guide to Cloud Native Java EE
1.INTRODUCTION TO JAVA_2022 MB.ppt .
Quarkus and GraalVM
Java dev mar_2021_keynote
Cloud compiler - Minor Project by students of CBPGEC
Apache Tomcat 7 by Filip Hanik
What's coming in Airflow 2.0? - NYC Apache Airflow Meetup
Java 40 versions_sgp
Java2 platform
Java 9 and Beyond
Gwt Presentation1
EmbeddedJavaSmall.ppt
node.js 실무 - node js in practice by Jesang Yoon
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
PDF
What AI Means For Your Product Strategy And What To Do About It
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
PPTX
Enhancing DevEx and Simplifying Operations at Scale
PPTX
Platforms, Platform Engineering, & Platform as a Product
PPTX
Building Cloud Ready Apps
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
PPTX
tanzu_developer_connect.pptx
PDF
Tanzu Virtual Developer Connect Workshop - French
PDF
Tanzu Developer Connect Workshop - English
PDF
Virtual Developer Connect Workshop - English
PDF
Tanzu Developer Connect - French
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
PDF
SpringOne Tour: The Influential Software Engineer
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
PDF
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
PDF
SpringOne Tour: Doing Progressive Delivery with your Team
Spring into AI presented by Dan Vega 5/14
What AI Means For Your Product Strategy And What To Do About It
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Enhancing DevEx and Simplifying Operations at Scale
Platforms, Platform Engineering, & Platform as a Product
Building Cloud Ready Apps
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
tanzu_developer_connect.pptx
Tanzu Virtual Developer Connect Workshop - French
Tanzu Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
Tanzu Developer Connect - French
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Doing Progressive Delivery with your Team

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Sensors and Actuators in IoT Systems using pdf
PPTX
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
PDF
GamePlan Trading System Review: Professional Trader's Honest Take
PDF
KodekX | Application Modernization Development
PDF
REPORT: Heating appliances market in Poland 2024
PDF
madgavkar20181017ppt McKinsey Presentation.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Chapter 2 Digital Image Fundamentals.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Advanced IT Governance
PDF
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Sensors and Actuators in IoT Systems using pdf
Telecom Fraud Prevention Guide | Hyperlink InfoSystem
GamePlan Trading System Review: Professional Trader's Honest Take
KodekX | Application Modernization Development
REPORT: Heating appliances market in Poland 2024
madgavkar20181017ppt McKinsey Presentation.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
CIFDAQ's Market Insight: SEC Turns Pro Crypto
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Chapter 2 Digital Image Fundamentals.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
CIFDAQ's Teaching Thursday: Moving Averages Made Simple
Chapter 3 Spatial Domain Image Processing.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
CIFDAQ's Market Wrap: Ethereum Leads, Bitcoin Lags, Institutions Shift
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Advanced IT Governance
GDG Cloud Iasi [PUBLIC] Florian Blaga - Unveiling the Evolution of Cybersecur...

Spring Boot 3 And Beyond

  • 1. Dan Vega Spring Developer Advocate Spring Boot 3 & Beyond © 2020 Spring. A VMware-backed project.
  • 2. Cover w/ Image About Me ● Husband & Father ● Cleveland, OH ● Software Developer 22+ Years ● Spring Developer Advocate ● Content Creator www.danvega.dev ● Writing - Blog & Newsletter ● YouTuber ● @therealdanvega
  • 4. Cover w/ Image A new generation of Spring for 2023 and beyond ● Spring Boot 3 ● JDK 17+ ● Jakarta EE 9 / 10 (Jakarta namespace) ● AOT (Ahead-Of-Time) Compilation ● Observability (Micrometer) ● But wait, there's more! ● Spring Boot 3.1 ● Docker Compose Module ● Spring Boot 3.2 ● Virtual Threads (“Project Loom”)
  • 8. Baseline: JDK 17 LTS Language: text blocks, switch expressions Core libraries: collection factory methods, etc Type system: records, sealed classes Module system: module introspection, module path scanning Performance Improvements Security Updates Empowering the framework as well as applications
  • 9. JDK 17 / 20 / 21 Spring generally embraces the latest JDK/JVM versions JDK 17 baseline retained for long-term support purposes E.g. in JDK 20: virtual threads, record patterns (preview) JDK 21 on the horizon as next long-term support release Consider upgrading your JDK along with Spring Framework 6.x
  • 10. Baseline: Jakarta EE 9 A new namespace: Java EE 8 → Jakarta EE 9 Servlet API 5.0 : javax.servlet → jakarta.servlet JPA 3.0 : javax.persistence → jakarta.persistence Bean Validation 3.0 : javax.validation → jakarta.validation Dependency Injection 2.0 : javax.inject → jakarta.inject All further API evolution to happen in jakarta namespace
  • 11. Migrating with the help of IDEs & Tools
  • 12. Jakarta EE 9 / 10 Tomcat 10.0 / 10.1 – Servlet API 5.0 / 6.0 Jetty 11 / 12 – Servlet API 5.0 / 6.0 Undertow 2.3 – Servlet API 6.0 Hibernate ORM 6.1 – JPA 3.0 / 3.1 Hibernate Validator 7.0 / 8.0 – Bean Validation 3.0 Note: API upgrades not coupled to major provider versions anymore!
  • 14. What is it? ● What is Ahead of Time Compilation? ● Java is a dynamic language ● Runtime hints for reflection, resources, serialization, proxies ● Precondition for GraalVM native executables ● Reducing startup time and memory footprint in production ● AOT is a tradeoff; extra build setup and less flexibility at runtime
  • 15. Why Compile to Native?
  • 16. Use Cases for Native Images
  • 18. Observability Observability is the ability to observe the internal state of a running system from the outside. It consists of the three pillars logging, metrics and traces. Direct Observability instrumentation with Micrometer Observation in several parts of the Spring Framework. RestTemplate and WebClient are instrumented to produce HTTP client request observations. Spring Cloud Sleuth no longer needed for Distributed Tracing
  • 20. Spring Boot 3 - But wait there’s more! HTTP Interface Client RFC 7807 Problem Details Spring Data 2022 Spring Security 6 Spring Authorization Server 1.0 Spring for GraphQL 1.1 More
  • 22. Spring Boot 3.1 Using Testcontainers at Development Time Docker Compose spring-boot-docker-compose module Auto-Configuration for Spring Authorization Server Building Docker Images with Maven or Gradle Spring for GraphQL 1.2 Dependency Upgrades https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.1-Release-Notes
  • 26. Demo
  • 28. Project Loom / Virtual Threads
  • 29. What is a Thread in Java ● Java is Multithreaded by default ● java.lang.Thread ● Abstraction over operating system threads ● Every thread is essentially a wrapper over an OS thread ● OS/JVM thread = platform thread ● Platform threads are expensive ● Take a lot of memory / take time to create & destroy ● Traditional threads are stored on the JVM stack
  • 30. Project Loom is to intended to explore, incubate and deliver Java VM features and APIs built on top of them for the purpose of supporting easy-to-use, high-throughput lightweight concurrency and new programming models on the Java platform.
  • 31. Project Loom Project Loom includes the following JEPs. ● JEP 425: Virtual Threads (Preview) was integrated in JDK 19 ● JEP 428: Structured Concurrency (Incubator) was integrated in JDK 19. ● JEP 429: Scoped Values (Incubator) has been integrated for JDK 20.
  • 32. “Project Loom” Virtual Threads Virtual Threads ● JDK 19 includes Virtual Threads as a Preview Feature ● Targeted for JDK 21 ● Not Linked to an OS thread ● Use the heap for the stack (potential implications for GC) ● Have their own scheduler ● Created for a task and then allowed to terminate ● Do not pool virtual threads
  • 39. Virtual Threads & Spring Applications
  • 40. Embracing Virtual Threads in Spring Applications Web Applications. ● Servlet callback based on Input / Output Stream ● Tomcat / Jetty Executor setup for dispatching to request handlers ● “Loom-ready” database drivers, scalable connection pool setup ● Ideally no code changes in the main application codebase ● Virtual threads supported in GraalVM Native Image as well ● Significant scalability benefits for database driven web applications
  • 41. Embracing Virtual Threads in Spring Applications Messaging / Scheduling ● Spring managed task executors with virtual thread options ● JMS Message Listener containers ● @Scheduled handler methods ● Many of those listeners and handlers methods trigger I/O operations
  • 42. Embracing Virtual Threads in Spring Applications Where it doesn’t make sense ● Purely CPU bound handler methods ● Reactive based web applications
  • 43. Virtual Threads Loom vs Reactive Programming ● Virtual Threads provide a different scalability mechanism ● Traditional imperative programming style ● Empowering Spring MVC to reach maximum scalability ● Spring Webflux as an architecture for stream based processing ● Reactive: Stream based processing not primarily for scalability (anymore)
  • 44. Demo
  • 45. Spring Framework 6.0 – available now Foundation for Spring Boot 3.0 & 3.1 Production-ready on JDK 17 LTS Regular stream of 6.0.x releases in 2023
  • 46. Spring Framework 6.1 – November 2023 Foundation for Spring Boot 3.2 & 3.3 Production-ready on JDK 17 & 21 LTS Release candidate expected in October 2023
  • 47. Thank you Contact me at [email protected] @therealdanvega Copyright © 2020 VMware, Inc. or its affiliates.