Prior to this commit, SpelParserConfiguration exposed 8 overloaded constructors that accumulated over time as new configuration options were introduced (auto-grow support since 3.0, maximumExpressionLength in 5.2.25, maximumOperations in 6.2.19, and maximumBigPowerBits in 7.0.9), culminating in an 8-parameter constructor. This made call sites hard to read due to unlabeled sequences of booleans and ints, and it forced users who wanted to override a single setting to also supply every other value explicitly. To address that, this commit introduces a builder API in SpelParserConfiguration, following the pattern already established by SimpleEvaluationContext's builder API. Specifically, SpelParserConfiguration.builder() returns a Builder that is pre-populated with the same defaults as the no-arg constructor, including the SpringProperties-driven overrides for the default compiler mode, maximum operations, and maximum big-power bits -- the latter two are only resolved lazily in build(), so that overriding them via the builder never triggers an unnecessary SpringProperties lookup. Each property has a dedicated, named setter (compilerMode(), compilerClassLoader(), maximumAutoGrowSize(), maximumExpressionLength(), maximumOperations(), maximumBigPowerBits()), and the two auto-grow flags are exposed as simple no-arg opt-ins (autoGrowNullReferences(), autoGrowCollections()) since they both default to false. build() delegates to the existing canonical constructor, so validation and defaults remain centralized in one place. In addition, a new SpelParserConfiguration.withDefaults() factory method has been introduced as shorthand for SpelParserConfiguration.builder().build(), for the common case where none of the builder's defaults need to be overridden. As the one deliberate exception to matching the no-arg constructor's defaults, the builder defaults maximumAutoGrowSize to 256 -- aligned with DataBinder.DEFAULT_AUTO_GROW_COLLECTION_LIMIT -- rather than the constructors' Integer.MAX_VALUE. The constructors keep their legacy default for backward compatibility, but the builder is a new, opt-in API that is not bound by that compatibility contract. This change is purely additive: none of the existing constructors have been modified or deprecated. Deprecating those constructors in favor of the builder is being deferred to 7.1, since new deprecations should not be introduced in a patch release. In the meantime, the Javadoc for the constructors and for the SPRING_EXPRESSION_*_PROPERTY_NAME constants has been updated to favor the builder (or a specific Builder setter) instead of the constructors, and the class-level Javadoc now states that the constructors are planned to be deprecated in favor of the builder as of Spring Framework 7.1. SpelExpressionParser's no-arg constructor, ExpressionState's two convenience constructors, and StandardBeanExpressionResolver's ClassLoader-based constructor have all been switched from the SpelParserConfiguration constructors to the builder (or withDefaults()). This is behaviorally identical in every case: autoGrowCollections remains false at each of those call sites, and maximumAutoGrowSize -- the only property whose default differs between the constructors and the builder -- has no effect when autoGrowCollections is false. Tests have been added in a new SpelParserConfigurationTests class to verify that the builder's defaults match the no-arg constructor (with the one intentional maximumAutoGrowSize exception called out above), that custom values are applied correctly, and that invalid values are rejected. The nested LegacyConstructorTests class provides regression coverage for each of the legacy constructors, consolidating their usage in tests to a single class -- which will keep any future deprecation warnings confined to this class -- and documents that, unlike the builder, the canonical constructor does not (yet) reject a negative maximumAutoGrowSize. The remaining incidental usages of the SpelParserConfiguration constructors throughout EvaluationTests, IndexingTests, SpelCompilationCoverageTests, SpelReproTests, and SpelCompilerTests have been converted to use the builder. Furthermore, the reference documentation has been updated to recommend the builder and withDefaults() over the constructors, both in prose and in the Java/Kotlin examples. Closes gh-37187
Spring Framework

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
CI builds are defined with GitHub Actions workflows.
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.