URL Matching with PathPattern in Spring MVC

Engineering | Rossen Stoyanchev | June 30, 2020 | ...

The recent Spring Framework 5.3 M1 release announcement mentions "Spring MVC comes with PathPattern parsing for efficient URL matching". This post expands on that with more context and detail.

Overview

In Spring applications AntPathMatcher is used to identify classpath, file system, remote, and other resources in Spring configuration. It has also been used in Spring MVC to match URL paths. Over time the use of patterns in web applications grew in number and syntax with AntPathMatcher evolving to meet those needs but some pain points remain without a solution:

  1. In web applications, patterns need to be matched many times per request and therefore any gains in performance and efficiency matter. However String pattern matching limits what can be achieved.

  2. Choosing the most specific pattern among several that match a request has proven challenging over the years with no simple ways to make it more predictable without impacting other cases.

  3. Matching a String path to a String pattern makes it difficult to avoid URI encoding issues. For example should the incoming path be decoded first and then matched? That allows for patterns themselves to be declared without encoded characters, but what if the request path contains %2F or %3B which are / and ; respectively? Once decoded those alter the structure of the path making it harder to match reliably. We could leave the request path encoded via UrlPathHelper#urlDecode

Spring Integration 5.4 M1 Available

Releases | Artem Bilan | June 29, 2020 | ...

Dear Spring community,

On behalf of the team and everyone who contributed, it is my pleasure to announce the first milestone for Spring Integration 5.4 generation.

It can be downloaded from our milestone repository:

compile 'org.springframework.integration:spring-integration-core:5.4.0-M1'

The Spring Integration 5.4 generation is full based on recently released Spring Framework 5.3 M1 including all the deprecation resolutions, removal some obsolete API and aggressive upgrade the latest versions for dependencies.

Long-waiting community request has been fulfilled and now Spring Integration…

Spring Boot 2.4.0-M1 is now available

Releases | Andy Wilkinson | June 29, 2020 | ...

On behalf of the team and everyone that contributed, I am pleased to announce that the first milestone of Spring Boot 2.4 has been released and is available from our milestone repository. This release closes over 120 issues and pull requests.

Please note the slight change in the format of the version. 2.4.0-M1 is the first Spring Boot release to use the new versioning scheme.

With Spring Boot 2.4, we have switched to a 6-month release cadence. All being well, you can expect to see 2.4.0 reach general availability in October or November.

Highlights of this first milestone include:

Spring Batch 4.3.0-M1 is released now!

Releases | Mahmoud Ben Hassine | June 26, 2020 | ...

On behalf of the Spring Batch team, I am pleased to announce that Spring Batch 4.3.0-M1 is now available from our milestone repository.

What’s new?

This release is packed with new features, performance improvements, and bug fixes, as well as documentation and dependency updates! You can find the complete list of changes in the release notes, but here are the major highlights:

New features

1. New synchronized ItemStreamWriter

Similar to the SynchronizedItemStreamReader, we added a SynchronizedItemStreamWriter. This feature is useful in multi-threaded steps where concurrent threads need to be…

First Spring Framework 5.3 milestone released

Releases | Juergen Hoeller | June 25, 2020 | ...

Dear Spring community,

On behalf of the team and everyone who contributed, it is my pleasure to announce that Spring Framework 5.3 M1 is available from our milestone repository now! Find an initial list of new features and refinements and corresponding upgrade notes including several deprecations on our wiki.

Please note that 5.3 is designed as the final 5.x feature release, wrapping up the major themes in the Spring Framework 5 generation, in particular reactive programming and Kotlin support, while also taking GraalVM compatibility to the next level. Last but not least, we are not only…

First milestone of Spring Data 2020.0 available

Releases | Mark Paluch | June 25, 2020 | ...

On behalf of the Spring Data team, I’m happy to announce the first milestone of the 2020.0 (Code name "Ockham") release train, 2020.0.0-M1. This release ships with over 120 tickets fixed. This Spring Data release is the first release using calver as an update to the release train version scheme.

The most notable new features are:

  • Support for RxJava 3
  • Introduction of org.springframework.data:spring-data-bom, which replaces org.springframework.data:spring-data-releasetrain

You can find a curated changelog in our release train wiki or skim through a full list of changes in JIRA.

A second…

This Week in Spring - June 23, 2020

Engineering | Josh Long | June 23, 2020 | ...

Hi, Spring fans! What a week it's been! Tomorrow I'll be presenting a webinar on the easy integration between Spring Boot and Tanzu Wavefront. Wavefront is an all-in-one, integrated distributed tracing metrics analytics observability platform. Join us tomorrow to learn about observability, about Wavefront, and their integration in the Spring ecosystem with Spring Cloud Sleuth and Micrometer, among other things.

We've so many great things to look at this week so let's get to it!

Spring Tools 4.7.0 released

Releases | Martin Lippert | June 19, 2020 | ...

Dear Spring Community,

I am happy to announce the 4.7.0 release of the Spring Tools 4 for Eclipse, Visual Studio Code, and Theia.

Highlights from this release include:

  • (Spring Boot) bugfix: automatic live hover detection works again reliably
  • (Eclipse) update: Spring Tools 4 for Eclipse distribution updated to Eclipse 2020-06 release
  • (Eclipse) improvement: added support for multiple instances of symbols view
  • (Eclipse) improvement: added favorites dropdown to symbols view
  • (Eclipse) improvement: boot dashboard shows request mappings, beans, and the environment of running apps now if SSH tunnel is enabled for the app on CF
  • (Eclipse) update: Support SemVer format in Spring Initializr wizard (#473)
  • (Eclipse) bugfix: STS 4.6.2 and Eclipse 2020-06 RC1: FrameworkEvent ERROR (#477

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