This Week in Spring - 22/2/22

Engineering | Josh Long | February 22, 2022 | ...

Hi, Spring fans! Welcome to another installment of This Week in Spring! How are you? I'm doing alright, thank you! I'm really excited about this week, too, because it features a ton of cool stuff. Also, it's 22/2/22! And I posted this at 22:22! :D

Announcing ListCrudRepository & Friends for Spring Data 3.0

Engineering | Jens Schauder | February 22, 2022 | ...

The Spring Data CrudRepository has various methods that return multiple instances of the entity managed by the repository. It does so by using Iterable and not List, as one might expect. In many cases, that is of no consequence, since you typically want to iterate over the result anyway. However, you might occasionally prefer a List. In these cases, Iterable is annoying.

I will write more about why that choice was made in the first place and how you can deal with it as long as you are on Spring Data 2.x. However, let me get the good news out first:

Repositories returning Lists

Spring Data 3.0.0 now offers a ListCrudRepository in the latest snapshot releases, which returns a List where CrudRepository returns an Iterable

Spring Security 5.7.0-M2 released

Releases | Eleftheria Stein-Kousathana | February 21, 2022 | ...

On behalf of the team and everyone who has contributed, I am pleased to announce the release of Spring Security 5.7.0-M2.

You can find the complete list of dependency updates, bug fixes and enhancements in the release notes.

Among the enhancements you will find we have deprecated the WebSecurityConfigurerAdapter. For additional details you can check out this blog post on the future of Spring Security without the WebSecurityConfigurerAdapter.

We look forward to hearing your feedback.

Project Site | Reference | Help

Spring Security without the WebSecurityConfigurerAdapter

Engineering | Eleftheria Stein-Kousathana | February 21, 2022 | ...

In Spring Security 5.7.0-M2 we deprecated the WebSecurityConfigurerAdapter, as we encourage users to move towards a component-based security configuration.

To assist with the transition to this new style of configuration, we have compiled a list of common use-cases and the suggested alternatives going forward.

In the examples below we follow best practice by using the Spring Security lambda DSL and the method HttpSecurity#authorizeHttpRequests to define our authorization rules. If you are new to the lambda DSL you can read about it in this blog post. If you would like to learn more about why we choose to use HttpSecurity#authorizeHttpRequests you can check out the reference documentation

Spring Data 2021.2.0-M3, 2021.1.2, and 2021.0.9 released

Releases | Mark Paluch | February 18, 2022 | ...

On behalf of the team, I’m pleased to announce Spring Data service releases 2021.1.2 and 2020.0.9. Both releases ship with mostly bug fixes and dependency upgrades. For your convenience, Spring Boot 2.6.4 respective 2.5.10 are going to pick up these releases in the upcoming days.

Along with the service releases, we released the next milestone 2021.2.0-M3 of the 2021.2 release train. We have summarized the new and noteworthy changes in our release notes.

To round things off, here are the links to the individual modules, changelogs, and documentation:

2021.2.0-M3

Spring Cloud 2021.0.1 Has Been Released

Releases | Ryan Baxter | February 18, 2022 | ...

On behalf of the community, I am pleased to announce that the Service Release 1 of the Spring Cloud 2021.0 Release Train is available today. This was primarily a bug fix release. The release can be found in Maven Central. You can check out the 2021.0.1 release notes for more information.

Notable Changes in the 2021.0.1 Release Train

See the project page for all issues included in the release.

Spring Cloud Config

  • Fix pattern matching bug with JSON, YAML, and properties files (2020)

Spring Cloud Sleuth

Spring Cloud Contract

Spring Cloud Gateway

  • A new route predicate that checks for allowed values for the X-Forwarded-For header, similar to the RemoteAddr predicate. (783)
  • Allows setting of the order of the Gateway HandlerMapping. By default, the Gateway HandlerMapping has precedence, but it can be changed if require. (2469)

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