All together now: Spring Boot 3.2, GraalVM native images, Java 21, and virtual threads with Project Loom,

Engineering | Josh Long | September 09, 2023 | ...

This has been a very long time in coming, but finally we can create GraalVM native images that use Spring Boot (via Spring Boot 3.2) and Java 21's virtual threads (Project Loom)!

Why does all this matter? Each of these individual things, Project Loom, and GraalVM native images, offer compelling runtime characteristics. I've waited so very long for these to converge! Let's talk about them each in turn.

GraalVM Native Images

GraalVM is an OpenJDk distribution that provides some extra utilities, including a utility called native-image that does ahead-of-time (AOT) compilation on your code. We're…

This Week in Spring - September 5th, 2023

Engineering | Josh Long | September 05, 2023 | ...

Hi, Spring fans! Welcome to another installment of This Week in Spring! How are you? I just got back from another fabulous labor day weekend, and am headed to Oslo, Norway, for the fabulous JavaZone 2023 event. This will be my first time returning to lovely Oslo, Norway, since the pandemic! I can't wait! If you're there, don't hesitate to say "hey"!

This is the Beginning of the End of the N+1 Problem: Introducing Single Query Loading.

Engineering | Jens Schauder | August 31, 2023 | ...

TL;DR:

Starting with Spring Data JDBC 3.2.0-M2, Spring Data JDBC supports Single Query Loading. Single Query Loading loads arbitrary aggregates with a single select statement.

To enable Single Query Loading you need to call setSingleQueryLoadingEnabled(true) on your RelationalMappingContext.

In 3.2.0-M2, this works only for simple aggregates, consisting of an aggregate root and a single collection of other entities. It is also limited to the findAll, findById, and findAllByIds methods in CrudRepository. Future versions will improve on that. A final limitation is that the database you use has to support analytic functions (AKA window functions). All the officially supported databases except…

My SpringOne 2023 Recap

Engineering | Josh Long | August 29, 2023 | ...

Hi, Spring fans! Look, it's Monday after the first in-person SpringOne of the 2020s and the first since the pandemic, and, being honest, I'm bushed! Vegas is a dizzying, sensational, overwhelming, exciting experience, and SpringOne is too. But it was worth it. The SpringOne show surpassed all expectations, so it was definitely worth it.

This overwhelming scale was nowhere more evident than in the keynote, which was standing room only. I can't really recap the entire show, but I do want to talk about some of the huge themes you'd have seen addressed in the keynote.

During the keynote, the good…

This Week in Spring - August 29th, 2023 - the post SpringOne recovery blog

Engineering | Josh Long | August 29, 2023 | ...

Hi, Spring fans! Welcome to another installment of This Week in Spring! I'm exhausted. Seriously. Last week was mental. If you need me, I'll be over sipping on a tea...

But, before that, there's a ton of things to cover from this last week, as always, and there's no rest for the curious, so let's get that out of the way first, shall we?

Spring Data JDBC - How To Maintain Your Database Schema

Engineering | Jens Schauder | August 29, 2023 | ...

This is the fifth article of a series about how to tackle various challenges you might encounter when using Spring Data JDBC. The series consists of:

  1. Spring Data JDBC - How to use custom ID generation?

  2. Spring Data JDBC - How do I make bidirectional relationships?.

  3. Spring Data JDBC - How do I implement caching?

  4. Spring Data JDBC - How Can I Do a Partial Update of an Aggregate Root?

  5. Spring Data JDBC - How do I Generate the Schema for my Domain Model? (This article)

If you are new to Spring Data JDBC, you should start by reading its introduction and this article, which explains the relevance of aggregates in the context of Spring Data JDBC

Spring Boot 3.2.0-M2 available now

Releases | Stéphane Nicoll | August 24, 2023 | ...

On behalf of the team and everyone who has contributed, I'm happy to announce that Spring Boot 3.2.0-M2 has been released and is now available from https://repo.spring.io/milestone.

This release includes 132 enhancements, documentation improvements, dependency upgrades, and bug fixes. Notable new features include:

  • Improved support for virtual threads when running on Java 21
  • Auto-configuration for Spring Framework's new JdbcClient
  • Observability support for R2DBC
  • Numerous dependency upgrades, including new milestones of several Spring projects

Please see the release notes for more details and…

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all