This Week in Spring - September 12th, 2023

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

Hi, Spring fans! Welcome to another installment of This Week in Spring! How are you this fine 12th of September? I'm doing alright, elated, even. I've just returned from beautiful Oslo, Norway, and I've got a busy 30 days or so ahead, starting today. I'm visiting Seattle, WA; Mexico City, Mexico; Dallas, TX; Singapore (SpringOne Singapore); Antwerp, Belgium (Devoxx BE!); London, United Kingdom; Amsterdam, Netherlands; and (maybe) parts of Germany. Keep an eye on my socials and videos for details as those dates and duties become clearer. Anyway, we've got a ton to look into this week, so…

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

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

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

Learn more

Get support

Tanzu Spring Runtime 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