Prior to this commit, StandardServletEnvironment's servlet context PropertySource remained stubbed out until it the ServletContext became available and could be replaced during the refresh() of its enclosing WebApplicationContext. This behavior is acceptable in most cases. However, if the user has declared an ApplicationContextInitializer that attempts to access servlet context-params via the Environment API, this result in a kind of 'false negative', i.e. the context-param key and value are actually present in the ServletContext, but the PropertySource representing servlet context params is still a stub at this point, meaning that it returns an empty result in all cases. With this change, WebApplicationContextUtils#initServletPropertySources is invoked eagerly by the ContextLoader if any ACI classes have been declared. This swaps out the servlet context property source stub for the real thing just in time for ACIs to use it if necessary. Extra guard logic has been added to #initServletPropertySources to ensure idempotency -- once the stub has been replaced, the method never attempts the replacement again, e.g. during the normal context refresh() when this method will be called again. Issue: SPR-8991 |
||
|---|---|---|
| build-spring-framework | ||
| org.springframework.aop | ||
| org.springframework.asm | ||
| org.springframework.aspects | ||
| org.springframework.beans | ||
| org.springframework.context | ||
| org.springframework.context.support | ||
| org.springframework.core | ||
| org.springframework.expression | ||
| org.springframework.instrument | ||
| org.springframework.instrument.tomcat | ||
| org.springframework.integration-tests | ||
| org.springframework.jdbc | ||
| org.springframework.jms | ||
| org.springframework.orm | ||
| org.springframework.oxm | ||
| org.springframework.spring-library | ||
| org.springframework.spring-parent | ||
| org.springframework.test | ||
| org.springframework.transaction | ||
| org.springframework.web | ||
| org.springframework.web.portlet | ||
| org.springframework.web.servlet | ||
| org.springframework.web.struts | ||
| spring-build | ||
| spring-framework-reference | ||
| .gitignore | ||
| README.md | ||
| build.properties | ||
| build.versions | ||
| ci-build.properties | ||
| eclipse-code-formatter.xml | ||
| spring-framework.ipr | ||
| spring-framework.psf | ||
README.md
Spring Framework
The Spring Framework provides a comprehensive programming and configuration model for modern Java-based enterprise applications - on any kind of deployment platform. A key element of Spring is infrastructural support at the application level: Spring focuses on the "plumbing" of enterprise applications so that teams can focus on application-level business logic, without unnecessary ties to specific deployment environments.
The framework also serves as the foundation for Spring Integration, Spring Batch and the rest of the Spring family of projects. Browse the repositories under the SpringSource organization on GitHub for a full list.
.NET and Python variants are available as well.
Downloading artifacts
Instructions on downloading Spring artifacts via Maven and other build systems are available via the project wiki.
Documentation
See the current Javadoc and Reference docs.
Getting support
Check out the Spring forums and the Spring tag on StackOverflow. Commercial support is available too.
Issue Tracking
Spring's JIRA issue tracker can be found here. Think you've found a bug? Please consider submitting a reproduction project via the spring-framework-issues repository. The readme provides simple step-by-step instructions.
Building from source
Instructions on building Spring from source are available via the project wiki.
Contributing
Pull requests are welcome; you'll be asked to sign our contributor license agreement (CLA). Trivial changes like typo fixes are especially appreciated (just fork and edit!). For larger changes, please search through JIRA for similiar issues, creating a new one if necessary, and discuss your ideas with the Spring team.
Staying in touch
Follow @springframework and its team members on Twitter. In-depth articles can be found at the SpringSource team blog, and releases are announced via our news feed.
License
The Spring Framework is released under version 2.0 of the Apache License.