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…

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?

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…

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

This Week in Spring - August 22, 2023

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

Hi, Spring fans! Welcome to another installment of This Week in Spring! And, would you believe it, I'm writing this at SpringOne 2023, in sunny Las Vegas, Nevada. This is the first in-person SpringOne since 2019, and I'm so, so, so glad to be here!

We've got a ton of things to get into this week, let's dive right into it!

This Week in Spring - August 22nd, 2023

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

Hi, Spring fans! Welcome to another installment of This Week in Spring! And, would you believe it, I'm writing this at SpringOne 2023, in sunny Las Vegas, Nevada. This is the first in-person SpringOne since 2019, and I'm so, so, so glad to be here!

We've got a ton of things to get into this week, let's dive right into it!

Tackling the OAuth2 Client component model in Spring Security

Engineering | Steve Riesenberg | August 22, 2023 | ...

In Spring Security 5, we saw many developments in the OAuth2 story with the introduction of OAuth2 Resource Server and OAuth2 Client into the framework.

Today, it is quite convenient to develop applications that are secured by OAuth2 using the features available in OAuth2 Resource Server. Additionally, we can take advantage OAuth2 Client features to integrate with OAuth 2.0 and OpenID Connect 1.0 providers, making it possible to authenticate users with OAuth2 Login and/or make protected requests to applications secured by OAuth2.

However, the OAuth2 landscape is very complex, and customization…

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