Go to file
Brian Clozel d06255214e
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
Deploy Docs / Dispatch docs deployment (push) Waiting to run Details
Support wildcard path elements at the start of path patterns
Prior to this commit, the `PathPattern` and `PathPatternParser` would
allow multiple-segments matching and capturing with the following:

* "/files/**" (matching 0-N segments until the end)
* "/files/{*path}" (matching 0-N segments until the end and capturing
  the value as the "path" variable)

This would be only allowed as the last path element in the pattern and
the parser would reject other combinations.

This commit expands the support and allows multiple segments matching at
the beginning of the path:

* "/**/index.html" (matching 0-N segments from the start)
* "/{*path}/index.html" (matching 0-N segments until the end and capturing
  the value as the "path" variable)

This does come with additional restrictions:

1. "/files/**/file.txt" and "/files/{*path}/file.txt" are invalid,
   as multiple segment matching is not allowed in the middle of the
   pattern.
2. "/{*path}/files/**" is not allowed, as a single "{*path}" or "/**"
   element is allowed in a pattern
3. "/{*path}/{folder}/file.txt"  "/**/{folder:[a-z]+}/file.txt" are
   invalid because only a literal pattern is allowed right after
   multiple segments path elements.

Closes gh-35213
2025-07-25 13:24:18 +02:00
.github Update milestone release action 2025-07-12 19:09:27 +02:00
.idea Add a project icon for IntelliJ IDEA 2025-02-19 13:45:16 +01:00
buildSrc Restore Java 17 compatibility in KotlinConventions 2025-07-17 12:13:19 +02:00
framework-api Upgrade to Dokka 2.0.0 2025-07-16 18:27:10 +02:00
framework-bom Guard against new Spring modules in ApiDiff task 2022-07-28 10:51:53 +02:00
framework-docs Support wildcard path elements at the start of path patterns 2025-07-25 13:24:18 +02:00
framework-platform Upgrade to Jetty 12.1.0.beta2 2025-07-23 11:19:35 +02:00
gradle Upgrade to Dokka 2.0.0 2025-07-16 18:27:10 +02:00
integration-tests Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-aop Merge branch '6.2.x' 2025-07-11 22:50:47 +02:00
spring-aspects Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-beans Merge branch '6.2.x' 2025-07-11 22:50:47 +02:00
spring-context Merge branch '6.2.x' 2025-07-23 16:30:12 +02:00
spring-context-indexer Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-context-support Re-initialize Quartz ConnectionProvider on context restart 2025-07-16 15:21:49 +02:00
spring-core Migrate to Palentir's JavaPoet 2025-07-17 16:25:46 +02:00
spring-core-test Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-expression Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-instrument Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-jdbc Specify flexible generics nullness in spring-jdbc 2025-07-07 16:35:25 +02:00
spring-jms Fix JmsClient visibility 2025-07-07 16:06:28 +02:00
spring-messaging Mark applicable Scope's methods as default 2025-07-07 13:37:47 +02:00
spring-orm Polishing 2025-07-10 20:05:47 +02:00
spring-oxm Update copyright headers in source files 2025-06-17 16:23:50 +02:00
spring-r2dbc Remove `@Suppress("EXTENSION_SHADOWED_BY_MEMBER")` 2025-06-24 11:40:23 +02:00
spring-test Merge branch '6.2.x' 2025-07-23 16:30:12 +02:00
spring-tx Add bindSynchronizedResource with automatic unbinding after transaction completion 2025-07-10 17:13:51 +02:00
spring-web Support wildcard path elements at the start of path patterns 2025-07-25 13:24:18 +02:00
spring-webflux Implement AutoCloseable in GzippedFiles 2025-07-18 15:45:59 +03:00
spring-webmvc Implement AutoCloseable in GzippedFiles 2025-07-18 15:45:59 +03:00
spring-websocket Merge branch '6.2.x' 2025-06-30 17:39:17 +02:00
src Fix Checkstyle configuration for nullability annotations 2025-07-15 16:50:21 +02:00
.editorconfig
.gitattributes Ensure line endings for binary files are not modified in Git 2019-10-18 11:56:18 +02:00
.gitignore Merge branch '6.2.x' 2025-02-19 13:45:35 +01:00
.sdkmanrc Upgrade SDKMAN to Java 24.0.1 2025-07-01 11:02:44 +02:00
CONTRIBUTING.md Update CONTRIBUTING guidelines for DCO 2025-01-07 09:55:36 +01:00
LICENSE.txt
README.md Fix link to code of conduct 2024-10-08 14:03:54 +02:00
SECURITY.md Update SECURITY.md 2024-10-15 17:13:29 +01:00
build.gradle Merge branch '6.2.x' 2025-07-21 13:24:47 +03:00
gradle.properties Next development version (v6.2.10-SNAPSHOT) 2025-07-17 09:55:21 +02:00
gradlew Upgrade to Gradle 8.14 2025-04-27 16:29:46 +02:00
gradlew.bat Upgrade to Gradle 8.14 2025-04-27 16:29:46 +02:00
import-into-eclipse.md Remove Groovy from "Eclipse/STS Project Import Guide" 2022-01-21 11:27:09 +01:00
import-into-idea.md Fix links in Javadoc and reference docs 2022-09-14 17:00:11 +02:00
settings.gradle Merge branch '6.2.x' 2025-06-06 18:21:24 +02:00

README.md

Spring Framework Build Status Revved up by Develocity

This is the home of the Spring Framework: the foundation for all Spring projects. Collectively the Spring Framework and the family of Spring projects are often referred to simply as "Spring".

Spring provides everything required beyond the Java programming language for creating enterprise applications for a wide range of scenarios and architectures. Please read the Overview section of the reference documentation for a more complete introduction.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@spring.io.

Access to Binaries

For access to artifacts or a distribution zip, see the Spring Framework Artifacts wiki page.

Documentation

The Spring Framework maintains reference documentation (published and source), GitHub wiki pages, and an API reference. There are also guides and tutorials across Spring projects.

Micro-Benchmarks

See the Micro-Benchmarks wiki page.

Build from Source

See the Build from Source wiki page and the CONTRIBUTING.md file.

Continuous Integration Builds

Information regarding CI builds can be found in the Spring Framework Concourse pipeline documentation.

Stay in Touch

Follow @SpringCentral, @SpringFramework, and its team members on 𝕏. In-depth articles can be found at The Spring Blog, and releases are announced via our releases feed.

License

The Spring Framework is released under version 2.0 of the Apache License.