Go to file
Sam Brannen 1f93777bbd Support ApplicationContextInitializers in the TCF
Starting with Spring 3.1 applications can specify
contextInitializerClasses via context-param and init-param in web.xml;
however, there is currently no way to have such initializers invoked in
integration testing scenarios without writing a custom
SmartContextLoader. For comprehensive integration testing it should
therefore be possible to re-use ApplicationContextInitializers in the
Spring TestContext Framework as well.

This commit makes this possible at the @ContextConfiguration level by
allowing an array of ACI types to be specified, and the out-of-the-box
SmartContextLoader implementations invoke the declared initializers at
the appropriate time.

 - Added initializers and inheritInitializers attributes to
   @ContextConfiguration.

 - Introduced support for ApplicationContextInitializers in
   ContextConfigurationAttributes, MergedContextConfiguration, and
   ContextLoaderUtils.

 - MergedContextConfiguration stores context initializer classes as a
   Set and incorporates them into the implementations of hashCode() and
   equals() for proper context caching.

 - ApplicationContextInitializers are invoked in the new
   prepareContext(GenericApplicationContext, MergedContextConfiguration)
   method in AbstractGenericContextLoader, and ordering declared via the
   Ordered interface and @Order annotation is honored.

 - Updated DelegatingSmartContextLoader to support initializers.
   Specifically, a test class may optionally declare neither XML
   configuration files nor annotated classes and instead declare only
   application context initializers. In such cases, an attempt will
   still be made to detect defaults, but their absence will not result
   an an exception.

 - Documented support for application context initializers in Javadoc
   and in the testing chapter of the reference manual.

Issue: SPR-9011
2012-08-20 15:31:46 +02:00
.settings/gradle Remove spring-asm and inline ASM 4 into spring-core 2012-08-10 00:36:49 +02:00
gradle/wrapper Upgrade to Gradle 1.1 GA 2012-08-08 08:46:04 +02:00
spring-aop/src Upgrade to CGLIB 3 and inline into spring-core 2012-08-10 00:38:49 +02:00
spring-aspects Update dependencies for spring-aspects 2012-06-01 15:35:29 +02:00
spring-beans/src Upgrade to CGLIB 3 and inline into spring-core 2012-08-10 00:38:49 +02:00
spring-context Upgrade to CGLIB 3 and inline into spring-core 2012-08-10 00:38:49 +02:00
spring-context-support/src added "repeatCount" bean property to Quartz SimpleTriggerFactoryBean 2012-07-04 23:22:01 +02:00
spring-core/src Upgrade to CGLIB 3 and inline into spring-core 2012-08-10 00:38:49 +02:00
spring-expression Avoid NPE when registering a SpEL MethodFilter 2012-08-09 23:05:08 +02:00
spring-instrument/src Remove bundlor support 2012-01-31 14:37:11 +01:00
spring-instrument-tomcat/src Remove bundlor support 2012-01-31 14:37:11 +01:00
spring-jdbc/src Document default scripts for embedded databases 2012-06-19 20:48:07 +02:00
spring-jms/src Update spring.schemas to reflect 3.2 schemas 2012-05-18 14:31:33 +03:00
spring-orm/src Update remaining filter with async support 2012-08-17 13:09:52 -04:00
spring-oxm XStreamMarshaller supports stream directly 2012-08-13 13:48:16 +02:00
spring-struts/src Fix javadoc warnings 2012-04-30 11:31:02 +03:00
spring-test Support ApplicationContextInitializers in the TCF 2012-08-20 15:31:46 +02:00
spring-tx/src Fix typo in TransactionManagementConfigurer Javadoc 2012-07-27 00:04:55 +02:00
spring-web/src Update remaining filter with async support 2012-08-17 13:09:52 -04:00
spring-webmvc/src Add async options to MVC namespace and Java config 2012-08-17 17:05:16 -04:00
spring-webmvc-portlet/src Update MockHttpSession across the test suite 2012-08-16 13:38:51 +02:00
src Support ApplicationContextInitializers in the TCF 2012-08-20 15:31:46 +02:00
.gitignore Introduce Gradle-based build 2012-01-31 14:31:04 +01:00
README.md Work around apparent bug in README markdown parsing 2012-06-25 19:42:22 +02:00
build.gradle Add optional AspectJ dependencies where appropriate 2012-08-13 15:24:52 +02:00
gradle.properties Increment version to 3.2.0.BUILD-SNAPSHOT 2012-05-28 23:52:17 +03:00
gradlew Upgrade to Gradle 1.0-rc-3 2012-05-15 22:51:45 +03:00
gradlew.bat Upgrade to Gradle 1.0-rc-3 2012-05-15 22:51:45 +03:00
import-into-eclipse.sh Fix typo in Eclipse import instructions 2012-03-01 12:46:52 +01:00
import-into-idea.md Update README and add IDE import helper scripts 2012-01-31 14:37:12 +01:00
publish-maven.gradle Upgrade to Gradle 1.0-rc1 2012-04-14 12:52:07 +03:00
settings.gradle Remove spring-asm and inline ASM 4 into spring-core 2012-08-10 00:36:49 +02:00

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

See downloading Spring artifacts for Maven repository information. Unable to use Maven or other transitive dependency management tools? See building a distribution with dependencies.

Documentation

See the current Javadoc and reference docs.

Getting support

Check out the Spring forums and the spring and spring-mvc tags on Stack Overflow. Commercial support is available too.

Issue Tracking

Report issues via the Spring Framework JIRA. Understand our issue management process by reading about the lifecycle of an issue. Think you've found a bug? Please consider submitting a reproduction project via the spring-framework-issues GitHub repository. The readme there provides simple step-by-step instructions.

Building from source

The Spring Framework uses a Gradle-based build system. In the instructions below, ./gradlew is invoked from the root of the source tree and serves as a cross-platform, self-contained bootstrap mechanism for the build. The only prerequisites are Git and JDK 1.6+.

check out sources

git clone git://github.com/SpringSource/spring-framework.git

compile and test, build all jars, distribution zips and docs

./gradlew build

install all spring-* jars into your local Maven cache

./gradlew install

import sources into your IDE

Run ./import-into-eclipse.sh or read import-into-idea.md as appropriate.

... and discover more commands with ./gradlew tasks. See also the Gradle build and release FAQ.

Contributing

Pull requests are welcome; see the contributor guidelines for details.

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.