first support for meta-annotations for the integration tests #201

wants to merge 174 commits into


None yet

giovannidalloglio commented Dec 11, 2012

related to issue:

prior this commit, there was no support for meta-annotations in the Spring Intergation tests, now the @contextconfiguration annotation is searched also in meta-annotations.

Eg: you can write:

@ContextConfiguration([...]) // config for HSQLDB environment
public @interface InRamEnvironment
@ContextConfiguration([...]) // config for common-core part
public @interface CommonCoreIntegrationTest
public class OneBatchTest {

[...] // actual test methods

giovannidalloglio commented Dec 12, 2012

PS I have signed and agree to the terms of the SpringSource Individual Contributor License Agreement.

sbrannen was assigned Dec 12, 2012


giovannidalloglio commented Dec 14, 2012


I just discovered that I forgot an important thing: the inheritance of the AC configuration files in integration tests!

At the moment I "put together" all @ContextConfiguration in a single list, but I miss the necessary tests to understand how to behave in case the flags inheritLocations and inheritInitializers.

I suspect (very much) that my pull request should be extended.
I'll think about these days, and I hope to deal with them.

I apologize for this momentary oversight.

philwebb and others added some commits Jan 4, 2013

@philwebb @cbeams philwebb Add test dependencies sources for testCompile
Update the TestSourceSetDependenciesPlugin to consider testCompile
@philwebb @cbeams philwebb Polish test sourceSet dependencies
Remove all direct sourceSets.test.output dependencies and instead rely
on the 'test-source-set-dependencies' plugin.

This commit also updates the api JavaDoc task to ensure that
dependencies are not resolved too early.
@cbeams cbeams Merge branch 'share-test-classes' into cleanup-3.2.x
* share-test-classes:
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
@philwebb @cbeams philwebb Replace test beans with test objects
Refactor spring-core tests to replace test beans from
'org.springframework.beans' with lighter test objects in
@philwebb @cbeams philwebb Remove duplicate test classes
Prior to this commit many test utility classes and sample beans were
duplicated across projects. This was previously necessary due to the
fact that dependent test sources were not shared during a gradle
build. Since the introduction of the 'test-source-set-dependencies'
gradle plugin this is no longer the case.

This commit attempts to remove as much duplicate code as possible,
co-locating test utilities and beans in the most suitable project.
For example, test beans are now located in the 'spring-beans'

Some of the duplicated code had started to drift apart when
modifications made in one project where not ported to others. All
changes have now been consolidated and when necessary existing tests
have been refactored to account for the differences.

@cbeams cbeams Update Apache license headers for affected sources d1e6dbe
@cbeams cbeams Merge branch 'cleanup-test-duplicates' into cleanup-3.2.x
* cleanup-test-duplicates:
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects

@cbeams cbeams Merge branch 'cleanup-3.2.x' into SPR-9431
Catch up to latest changes on cleanup-3.2.x in order to avoid conflicts
when adding additional commits fixing compiler warnings.
@cbeams cbeams Fix warnings due to unused import statements
Issue: SPR-9431
@cbeams cbeams Remove duplicate test resources
The files deleted in this commit existed in identical form in two places
within a given module; typically in src/test/java and
src/test/resources. The version within src/test/resources has been
favored in all cases.

This change was prompted by associated Eclipse warnings, which have now
been quelled.

Issue: SPR-9431
@cbeams cbeams Fix several miscellaneous compiler/Eclipse warnings
 - Suppress an (intentional) AspectJ warning
 - Remove unused imports
 - Suppress a [hiding] warning
 - Fix a generics warning related to extension of final types

Issue: SPR-9431
@cbeams cbeams Move namespace tests to root integration module
Prior to this change, spring-beans contained its own META-INF containing
spring.handlers and spring.schemas files in src/main/resources; it also
had files of the same name within src/test/resources/META-INF, causing
'duplicate resource' warnings and confusion in general.

This commit moves the test package, it's associated namespace
parsing tests and test versions of META-INF files to the root project
and it's src/test integration testing folder.

Issue: SPR-9431
@cbeams cbeams Update Apache license headers for moved files
Issue: SPR-9431
@cbeams cbeams Eliminate AJ @Async warning in test case
Prior to this commit, ClassWithAsyncAnnotation#return5 forced an
unsuppressable warning in Eclipse, making it virtually impossible to
get to a zero-warnings state in the codebase.

The 'solution' here is simply to comment out the method and it's
associated test case. The 'declare warnings' functionality around
@Async is well-understood and has long been stable.

Also, the entire AnnotationAsyncExecutionAspectTests class has been
added to TestGroup#PERFORMANCE (SPR-9984), as opposed to just
asyncMethodGetsRoutedAsynchronously as it was previously, the
rationale being that all tests are actually timing dependent.

Issue: SPR-9431, SPR-9984
@cbeams cbeams Merge branch 'SPR-9431' into cleanup-3.2.x
* SPR-9431:
  Eliminate AJ @Async warning in test case
  Update Apache license headers for moved files
  Move namespace tests to root integration module
  Fix several miscellaneous compiler/Eclipse warnings
  Remove duplicate test resources
  Fix warnings due to unused import statements
@cbeams cbeams Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Eliminate AJ @Async warning in test case
  Update Apache license headers for moved files
  Move namespace tests to root integration module
  Fix several miscellaneous compiler/Eclipse warnings
  Remove duplicate test resources
  Fix warnings due to unused import statements
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
@philwebb philwebb Merge branch 'cleanup-3.2.x' into SPR-10126
* cleanup-3.2.x: (37 commits)
  Eliminate AJ @Async warning in test case
  Update Apache license headers for moved files
  Move namespace tests to root integration module
  Fix several miscellaneous compiler/Eclipse warnings
  Remove duplicate test resources
  Fix warnings due to unused import statements
  Update Apache license headers for affected sources
  Remove duplicate test classes
  Replace test beans with test objects
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
  Use unmodified 'version' when not on a topic branch
  Enable execution of TestNG tests in spring-test
  Polish support for topic branch-specific versions
  Segregate add'l long-running and performance tests
  Eliminate EBR dependencies and repository config
  Skip creation of IDEA metadata for spring-aspects
  Fix Eclipse compilation error in Gradle plugin
  Polish build.gradle
  Recursively add test dependencies
@sslavic @cbeams sslavic Mark all IsFastEnough tests as performance tests
This patch marks remaining/missed tests as ones belonging to
performance tests group.

Issue: SPR-9984
@cbeams cbeams Merge pull request #212 from sslavic/SPR-9984
# By Stevo Slavic
* sslavic/SPR-9984:
  Mark all IsFastEnough tests as performance tests
@cbeams cbeams Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Mark all IsFastEnough tests as performance tests
Glyn Normington Detect split packages at build time
Split packages are a well-known anti-pattern for OSGi and a blocker for
Eclipse Virgo (which prevents split packages being accessed via its
Import-Library construct).

Split packages are also unhelpful with a traditional linear classpath
as a split package name does not uniquely identify the Spring framework
JAR from which it came, thus complicating problem diagnosis and

Juergen Hoeller supports this position in the following comment in

>FWIW, I generally find split packages a bad practice, even without
>OSGi in the mix. For the Spring Framework codebase, I consider a
>split-package arrangement a design accident that we want to detect
>in any case - and that we're willing to fix if it happened.
>I'm actually equally concerned about the source perspective: After
>all, we want a package to be comprehensible from a single glance
>at the project, not requiring the developer to jump into several
>source modules to understand the overall layout of a package.

Split packages have crept into Spring framework twice in recent months
- see SPR-9811 and SPR-9988. Currently, they are only detected once
the Spring framework has been converted to OSGi bundles and these
bundles have been tested with Eclipse Virgo.

This commit adds a build-time check for split packages to the Spring
framework build.

Issue: SPR-9990


@rwinch rwinch Example SplitPackageDetectorPlugin a27a3be
Glyn Normington Rework split package detection code
Allow packages to be split across projects which will be merged into a
single JAR file.

Make split package detection a dependency of the 'check' task. This
is idiomatic gradle as well as allowing the 'test' task (another
dependency of 'check') to be executed without split packages being

Omit the project spring-instructment-tomcat from the check on the basis
of SPR-10150.

Issues: SPR-9990, SPR-10150



cbeams commented on build.gradle in 16a3a8b Jan 7, 2013

@philwebb, this change causes ./gradlew clean api to fail, because spring-core's asmRepackJar and cglibRepackJar tasks are not executed, meaning that these JARs are not available on the classpath when javadoc is trying to resolve symbols.

Your comment states that "This commit also updates the api JavaDoc task to ensure that dependencies are not resolved too early." — what was the actual problem here? Why was it "bad" to have deps resolving early?

In any case, can you see about fixing this up? I'd prefer not to go the route of having api depend on (cglib|asm)RepackJar tasks — this means that api has to know "too much", IMO.



philwebb replied Jan 31, 2013

Commit f92f58d has fixed this

philwebb and others added some commits Jan 7, 2013

@philwebb philwebb Gradle 'api' task depends on 'jar' tasks
Update the gradle 'api' task to depend on the 'jar' task of all
subprojects. This intern ensures that the 'asmRepackJar' and
'cglibRepackJar' tasks run which is critical for JavaDoc
@rstoyanchev rstoyanchev Support "X-Forwarded-Host" in UriComponentsBuilder
ServletUriComponentsBuilder now supports setting the host to the
value held in the X-Forwarded-Host [0] header used in reverse
proxy scenarios.


Issue: SPR-10110
@philwebb philwebb Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Gradle 'api' task depends on 'jar' tasks
  Mark all IsFastEnough tests as performance tests
@rstoyanchev rstoyanchev Add support for placeholders in @RequestMapping
@RequestMapping annotations now support ${...} placeholders.

Issue: SPR-9935
@cbeams cbeams Add 3.1 migration section to reference docs
Address error raised when using component-scan against the unqualified
"org" base package.

Issue: SPR-9843
@cbeams cbeams Merge branch 'SPR-9843' into 3.2.x
* SPR-9843:
  Add 3.1 migration section to reference docs
@acogoluegnes @rstoyanchev acogoluegnes Add support for HTTP OPTIONS in Spring MVC Test
Issue: SPR-10093
@rstoyanchev rstoyanchev Fix issue in BufferedImageHttpMessageConverter
This change ensures BufferedImageHttpMessageConverter writes when
"*/*" is requested.

Issue: SPR-7763
@rstoyanchev rstoyanchev Add decoding matrix variable values
Issue: SPR-10140
@rstoyanchev rstoyanchev Update mvc chapter on annotations and proxies
Issue: SPR-10132
@rstoyanchev rstoyanchev Remove closing tag in form tag's extra hidden fields
The fields returned from a RequestDataValueProcessor are now
written as hidden fields without a closing tag.

<input type="hidden" name="xxx" value="yyy"></input>

<input type="hidden" name="xxx" value="yyy" />

Issue: SPR-10103
@rstoyanchev rstoyanchev Merge pull request #205 from acogoluegnes/SPR-10093
* tmp:
  Add support for HTTP OPTIONS in Spring MVC Test
@cbeams cbeams Update license header for recently modified files
Issue: SPR-7763, SPR-10140, SPR-10132, SPR-10093, SPR-10103
@rstoyanchev rstoyanchev Update info on RestTemplate related to 401 status code
Issue: SPR-9367
@rstoyanchev rstoyanchev Add option to always append 'must-revalidate'
Issue: SPR-9248
@rstoyanchev rstoyanchev Add option to not trim path segments in AntPathMatch
Issue: SPR-8687
@rstoyanchev rstoyanchev Add protected method to AbstractHandlerMethodMapping 2f6e45f
@philwebb philwebb Replace EasyMock with Mockito in spring-orm
Issue: SPR-10126
@philwebb philwebb Merge branch 'SPR-10126' into cleanup-3.2.x
* SPR-10126:
  Replace EasyMock with Mockito in spring-orm
@philwebb philwebb Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Replace EasyMock with Mockito in spring-orm
@sbrannen sbrannen Ensure JUnit & TestNG tests run in spring-test
Prior to this commit, the Gradle build configuration only executed
TestNG-based tests and effectively disabled all JUnit-based tests in the
spring-test module. Furthermore, TestNG-based tests were not properly
reported in Bamboo CI builds.

This commit ensures that both JUnit and TestNG tests are executed in the
Gradle build by defining a new testNG task within the spring-test
configuration. The test task now depends on the new testNG task.
Furthermore, the testNG task makes use of Gradle 1.3's support for
generating test reports for TestNG tests alongside reports for JUnit
tests. The net effect is that all tests are executed and reportedly
properly in Bamboo builds on the CI server.

- Enabled both JUnit and TestNG tests for the spring-test module.
- Corrected bugs in FailingBeforeAndAfterMethodsTests introduced in
  commit 3d1b386.
- Deleted the now obsolete SPR-9398.txt file.

Issue: SPR-9398
@jhoeller jhoeller Marked LocalCacheProviderProxy as deprecated (following Hibernate 3.3…
….'s CacheProvider deprecation)
@jhoeller jhoeller MessageSourceResourceBundle overrides JDK 1.6 containsKey method, avo…
…iding NPE in getKeys

Issue: SPR-10136
@jhoeller jhoeller AbstractAdvisingBeanPostProcessor caches per bean target class, worki…
…ng for null bean names as well

Issue: SPR-10144
@jhoeller jhoeller MimeMessageHelper encodes attachment filename if not ASCII compliant
Issue: SPR-9258
@jhoeller jhoeller FreeMarkerConfigurationFactory properly supports TemplateLoaders when…
… recreating Configurations

Issue: SPR-9389
@jhoeller jhoeller SpringContextResourceAdapter implements equals/hashCode according to …
…the JCA 1.5 contract

Issue: SPR-9162
@jhoeller jhoeller Added dedicated sort method to AnnotationAwareOrderComparator
Issue: SPR-9625
@jhoeller jhoeller AnnotationAwareOrderComparator is able to sort Class objects as well
Issue: SPR-10152
@jhoeller jhoeller AnnotationAwareOrderComparator etc ea823fd
@sbrannen sbrannen Polish Javadoc in CookieValue and RequestHeader 2427391
@rwinch rwinch Use explicit JDK versions in aspects.gradle
Previously aspects.gradle used the Gradle conventions for the source
and target compatibility. This means that unless the conventions were
updated the current JDK would be used for both source and target
compatibilty. Since an update to build.gradle changed to configure the
compileJava and compileTestJava tasks explicitly spring-aspects has
been compiled with JDK 7 compatibility.

This commit explicitly uses the source and target compatibility from
spring-core to ensure that aspects.gradle is kept up to date.

Issue: SPR-10161
@sbrannen sbrannen Update Javadoc for MockMvc
Deleted reference to the obsolete configureWarRootDir() method from the
stand-alone spring-test-mvc project.
@philwebb philwebb Exclude stax test dependency
Exclude transitive stax 1.0 dependency to prevent compile time
eclipse errors.
@philwebb philwebb Exclude eclipse WTP generated artifacts c425d22
@cbeams cbeams Replace space indentation with tabs
Issue: SPR-9990
@cbeams cbeams Refactor detect-split-packages Gradle plugin
 - Use conventional plugin naming, i.e. "detect-split-packages" instead
   of applying plugin based on fully-qualified class name

 - Rename "diagnose" => "detect" consistently throughout plugin, task
   and method names and generally refactor naming throughout to follow
   "detect split packages" phrasing

 - Add Javadoc to DetectSplitPackagesPlugin

 - Improve error reporting when split packages are detected

   Upon detecting one or more split packages, `detectSplitPackages` now
   fails idiomatically, throwing a GradleException to signal task failure
   (as opposed to the previous approach of using an assert assertion), and
   the output reads as follows:

       $ gradle detectSplitPackages
       :buildSrc:build UP-TO-DATE
       :detectSplitPackages FAILED

       FAILURE: Build failed with an exception.

       * What went wrong:
       Execution failed for task ':detectSplitPackages'.
       > The following split package(s) have been detected:
          - org.springframework.beans (split across spring-beans and spring-orm)
          - org.springframework.core.env (split across spring-context and spring-core)

 - DetectSplitPackagesTask now automatically attaches itself to `check`
   task lifecycle if the enclosing project contains a `check` task

 - DetectSplitPackagesTask adds itself to the 'Verification' task group,
   ensuring that it shows up correctly in `gradle tasks` task listings

 - packagesToScan now defaults to all subprojects; users may then
   customize this by removing individual subprojects from the collection

Issue: SPR-9990
@cbeams cbeams Merge pull request #214 from glyn/SPR-9990
# By Chris Beams (2) and others
* SPR-9990:
  Refactor detect-split-packages Gradle plugin
  Replace space indentation with tabs
  Rework split package detection code
  Example SplitPackageDetectorPlugin
  Detect split packages at build time
@cbeams cbeams Polish changes from pull request #205
 - Replace space intendation with tabs
 - Remove leading tabs on otherwise empty lines
 - Remove illegal {@link ...} syntax in Javadoc @see reference

Issue: SPR-10093
@cbeams cbeams Merge branch 'SPR-10093' into 3.2.x
* SPR-10093:
  Polish changes from pull request #205
@philwebb philwebb Polish DetectSplitPackagesPlugin
Polish DetectSplitPackagesPlugin to favor double-quoted strings.
@sbrannen sbrannen Improve speed of spring-test build
- Now excluding *TestSuite classes from the JUnit test task.
- Renamed SpringJUnit4SuiteTests to SpringJUnit4TestSuite so that it is
  no longer executed in the build.
- Reduced sleep time in various timing related tests.
@philwebb philwebb Generate eclipse project settings from gradle
Update gradle to generate the following project specific eclipse

- Java formatting
- Cleanup options
- Warning settings
- Code template with copyright header
- WTP module meta-data

In addition this commit changes the eclipse project .classpath file
to output test and main classes to different folders. This is required
to prevent eclipse WTP from packaging test classes into /WEB-INF/lib
jar files.

Issue: SPR-9518
@philwebb philwebb Merge branch 'SPR-9518' into 3.2.x
* SPR-9518:
  Generate eclipse project settings from gradle
@jhoeller jhoeller JDBC parameter binding uses JDBC 3.0 ParameterMetaData (if available)…
… for type determination

Forward-ported from 3.1.2, with minor modifications for defensiveness against the JDBC driver.

Issue: SPR-10084
@rstoyanchev rstoyanchev Support multiple Validators in DataBinder
DataBinder now allows registering additional Validator instances.
This may be useful when adding a Spring Validator to a globally
registered JSR-303 LocalValidatorFactoryBean.

Issue: SPR-9436
@philwebb philwebb Upgrade to prop-deps gradle plugin 0.0.3 5ddc313
@philwebb philwebb Consider bridge methods in SpEL properties
Revert ReflectivePropertyAccessor changes from 107fafb and instead
consider all methods when resolving properties. Methods are now
sorted such that non-bridge methods are considered before bridge

Issue: SPR-10162
@philwebb philwebb Polish author and copyright year e8fcde0
@philwebb philwebb Remove accidentally committed interface @Override e4c1361

cbeams commented on 5b147bf Jan 14, 2013

Thanks, @sbrannen. Just noted that the copyright headers haven't been updated to 2013. Also, a minor point, but the the test methods named "OneSecond" aren't exactly accurate anymore now that the timeouts have been reduced from 1000ms to 20ms.


sbrannen replied Jan 14, 2013

Good catch! I'll fix that ASAP.

sbrannen and others added some commits Jan 14, 2013

@sbrannen sbrannen Fix copyright year & method names in spring-test
This commit fixes the copyright year for changes made in commit
5b147bf. In addition, method names
have been changed to reflect the semantic changes made in that same
@sbrannen sbrannen Minor changes to AnnotationUtils
- Polished Javadoc for isAnnotationDeclaredLocally() and
- Removed unnecessary call to Arrays.asList() in
@philwebb philwebb Allow 'gradle eclipse' without 'cleanEclipse'
Allow eclipse projects to be regenerated without first requiring the
'gradle cleanEclipse' task to be executed.
@philwebb philwebb Fix eclipse .settings generation
Fix issues where gradle would not regenerate .settings files due to
the task being considered UP-TO-DATE.
@philwebb philwebb Tweak eclipse warning settings
Hide raw-type, generic and resource leak warnings.
@philwebb philwebb Improve exceptions for multi-operand expressions
Fix SpEL expression parser and tokenizer to provide better exceptions
when dealing with operations that expect two operands. For example,
prior to this commit the expression '/foo' would throw a NPE due
to missing operands to the left of '/'.

Issue: SPR-10146
@philwebb philwebb SpEL support for static finals on interfaces
Update ReflectivePropertyAccessor to search for fields on super classes
and implemented interfaces.

Although the javadoc Class.getFields() implies that all public fields
of class should be returned SpelReproTests demonstrates that this is
not always the case.

Issue: SPR-10125
@rstoyanchev rstoyanchev Prepend context/servlet path to FormTag action
The Form tag now fills in the context and servlet path if not present
in the specified action.

Issue: SPR-8684
@rstoyanchev rstoyanchev Update Validation chapter
The Validation chapter now includes information on combining JSR-303
Bean Validation with additional Spring Validator's that don't require
the use of annotations.

Issue: SPR-9437
@rstoyanchev rstoyanchev Use MessageSource to resolve @ResponseStatus.reason
The reason attribute of @ResponseStatus can now be a code resolvable
through the ApplicationContext's MessageSource.

Issue: SPR-6044
@rstoyanchev rstoyanchev Add contentTypeCompatibleWith option to Spring MVC Test
An expectation such as content().contentType(MediaType.TEXT_PLAIN)
fails if the actual media type contains a charset or another parameter.
A new method allows comparing the media type and subtype only via

Issue: SPR-10165
@sbrannen sbrannen Fix broken test in ContentAssertionTests 33ee0ea
@sbrannen sbrannen Update copyright year, author tags, and Javadoc f3e5f8b
@jhoeller jhoeller AbstractCacheManager accepts no caches defined, allowing for EHCache …
…default cache setup

Issue: SPR-7955
@jhoeller jhoeller Polishing along with backport abbe1db
@jhoeller jhoeller Reintroduced "mode" and "proxy-target-class" attributes in spring-tas…

Issue: SPR-10177
@jhoeller jhoeller Polishing 2cd23a7
@jhoeller jhoeller Further fixes for 3.2.1 e44b4b8
@rwinch rwinch Restore *.aj whitespace
The removal of whitespace to the *.aj files made in 1762157 cause
NoSuchMethodError for code compiled against previous versions of
spring-aspects due to a bug in AspectJ (see SPR-10178 for details).

This commit reverts all the whitespace changes made in 1762157 which
resolves the NoSuchMethodErrors.

Issue: SPR-10178
@cbeams cbeams Handle non-void write methods deterministically
This change resolves a specific issue with processing
java.math.BigDecimal via ExtendedBeanInfo. BigDecimal has a particular
constellation of #setScale methods that, prior to this change, had the
potential to cause ExtendedBeanInfo to throw an IntrospectionException
depending on the order in which the methods were processed.

Because JDK 7 no longer returns deterministic results from
Class#getDeclaredMethods, it became a genuine possibility - indeed a
statistical certainty that the 'wrong' setScale method handling order
happens sooner or later. Typically one could observe this failure once
out of every four test runs.

This commit introduces deterministic method ordering of all discovered
non-void returning write methods in such a way that solves the problem
for BigDecimal as well as for any other class having a similar method


 - Remove unnecessary cast

 - Pass no method information to PropertyDescriptor superclasses when
   invoking super(...). This ensures that any 'type mismatch'
   IntrospectionExceptions are handled locally in ExtendedBeanInfo and
   its Simple* PropertyDescriptor variants where we have full control.

Issue: SPR-10111, SPR-9702
Backport-Commit: aa3e0be (forward-ported via cherry-pick from 3.1.x)
@cbeams cbeams Polish build.gradle 1944550
@cbeams cbeams Remove .aj sources from spring-aspects jar
Issue: SPR-10179
@jhoeller jhoeller CachedIntrospectionResults.clearClassLoader(null) removes cached clas…
…ses for the system class loader

Issue: SPR-9189
@jhoeller jhoeller spring-jms-3.2.xsd allows for SpEL expressions in prefetch and receiv…
…e-timeout attributes

Issue: SPR-9553
@jhoeller jhoeller Removed reference to AttributesJmxAttributeSource
Issue: SPR-8916
@jhoeller jhoeller Fixed ConnectionSpecConnectionFactoryAdapter explanation
Issue: SPR-9466
@jhoeller jhoeller Fixed reference to "fallbackToNoOpCache" flag
Issue: SPR-9064
@jhoeller jhoeller Added hint towards not using orm.hibernate3 classes with Hibernate 4
Issue: SPR-9365
@jhoeller jhoeller AbstractDriverBasedDataSource does not rely on Properties chaining an…

 Issue: SPR-9461
@jhoeller jhoeller SpringBeanAutowiringInterceptor eagerly releases BeanFactory if post-…
…construction fails

Issue: SPR-10013
@jhoeller jhoeller MBeanExporter does not log warnings for manually unregistered MBeans
Issue: SPR-9451
@jhoeller jhoeller LocalVariableTableParameterNameDiscoverer works for bridge methods as…
… well

Issue: SPR-9429
@jhoeller jhoeller BridgeMethodResolver properly handles bridge methods in interfaces
Issue: SPR-9330
@jhoeller jhoeller ContextLoader properly detects pre-refreshed WebApplicationContext
Issue: SPR-9996
@jhoeller jhoeller Added "exposeAccessContext" flag JndiRmiClientInterceptor/ProxyFactor…
…yBean (for WebLogic)

Issue: SPR-9428
@jhoeller jhoeller EhCacheManagerFactoryBean applies cacheManagerName ahead of creation …
…(for EHCache 2.5 compatibility)

Issue: SPR-9171
@jhoeller jhoeller Further preparations for 3.2.1 87968e5
@jhoeller jhoeller AbstractDriverBasedDataSource does not rely on Properties chaining an…

Issue: SPR-9461
@cbeams cbeams Fix typo in reference documentation
Issue: SPR-10171
@cbeams cbeams Fix broken Castor URLs in ref docs and mapping XML
Issue: SPR-10189
@cbeams cbeams Add TimedSpringRunnerTests to performance test group
Issue: SPR-9984
@cbeams cbeams Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add TimedSpringRunnerTests to performance test group
@cbeams cbeams Ensure -PtestGroups is passed through to unit tests
Issue: SPR-9984
@cbeams cbeams Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Ensure -PtestGroups is passed through to unit tests
@cbeams cbeams Attempt to repro ReflectionUtils performance issue
Issue: SPR-10197
@cbeams cbeams Merge branch 'SPR-10197' into 3.2.x
* SPR-10197:
  Attempt to repro ReflectionUtils performance issue
@rstoyanchev rstoyanchev Fix ClassCastException in TilesConfigurer
Issue: SPR-10195
@rstoyanchev rstoyanchev Fix exception message about producible media types
Issue: SPR-10175
@philwebb philwebb Support Date to String in JodaTimeConverters
Update JodaTimeConverters in include support for Date to String

The JodaTimeFormattingTests and DateFormattingTests have been extended
to ensure that Date to String conversion is supported with or without

Issue: SPR-10198
@rstoyanchev rstoyanchev Fix NPE in FormHttpMessageConverter
Issue: SPR-10187
@rstoyanchev rstoyanchev Add helpful error message to DispServlet initializer
Issue: SPR-10168
@rstoyanchev rstoyanchev Fix init order issue in RequestMappingHandlerMapping
Issue: SPR-10173
@cbeams cbeams Relax ConfigurableWebEnvironment signatures
ConfigurableWebEnvironment was introduced in 3.2.0.M1 with SPR-9439 in
order to break a cyclic dependency. At the same time, certain signatures
such as AbstractRefreshableWebApplicationContext#getEnviroment and
GenericWebApplicationContext#getEnvironment were updated to take
advantage of covariant return types and return this newer, more narrow
type and providing cast-free calls to ConfigurableWebEnvironment methods
where necessary. Similar changes were made to HttpServletBean in
3.2.0.M2 with SPR-9763.

Narrowing #getEnvironment signatures in this fashion required enforcing
at the #setEnvironment level that any Environment instance provided
(explicitly or via the EnvironmentAware callback) must be an instance of
ConfigurableWebEnvironment. This is a reasonable assertion in typical
web application scenarios, but as SPR-10138 demonstrates, there are
valid use cases in which one may want or need to inject a non-web
ConfigurableEnvironment variant, e.g. during automated unit/integration

On review, it was never strictly necessary to narrow #getEnvironment
signatures, although doing so did provided convenience and type safety.
In order to maintain as flexible and backward-compatible an arrangement
as possible, this commit relaxes these #getEnvironment signatures back
to their original, pre-3.2 state. Namely, they now return
ConfigurableEnvironment as opposed to ConfigurableWebEnvironment, and in
accordance, all instanceof assertions have been removed or relaxed to
ensure that injected Environment instances are of type

These changes have been verified against David Winterfeldt's Spring by
Example spring-rest-services project, as described at SPR-10138.

Issue: SPR-10138, SPR-9763, SPR-9439
@cbeams cbeams Introduce "dummy" Environment implementation
For testing purposes in which an Environment implementation is required
but a ConfigurableEnvironment is not desirable.

All methods are no-ops and return null, therefore NPEs are likely.
@sbrannen sbrannen Polish Javadoc in Spring MVC async support
This commit fixes some typographical and grammatical errors in various
classes in Spring MVC's async support.
@cbeams cbeams Support XML properties in ResourcePropertySource
JDK 5 introduced an XML-based properties file syntax. This commit
ensures that when such files are supplied as the underlying resource
for a ResourcePropertySource instance, they are routed appropriately
to Properties#loadFromXML as opposed to Properties#load.

Issue: SPR-9896
@cbeams cbeams Merge branch 'SPR-9896' into 3.2.x
* SPR-9896:
  Support XML properties in ResourcePropertySource
@cbeams cbeams Remove additional xsd versions from reference docs
A few versioned xsd references still existed in xsd-configuration.xml;
this commit removes them, completing the work for SPR-10010

Issue: SPR-10010
@rstoyanchev rstoyanchev Make UriComponents Serializable
Issue: SPR-10186
@rstoyanchev rstoyanchev Fix typo in reference docs
Issue: SPR-10204
@jhoeller jhoeller MockHttpServletRequest's getParameter(Values) returns null for null p…
…arameter name

Issue: SPR-10192
@jhoeller jhoeller MockHttpServletResponse's getHeaderNames declares Collection instead …
…of Set for Servlet 3.0 compatibility

Issue: SPR-9885
@jhoeller jhoeller SpringValidationAdapter properly detects invalid value for JSR-303 fi…
…eld-level bean constraints

Issue: SPR-9332
@jhoeller jhoeller EntityManagerFactoryUtils finds default EntityManagerFactory in paren…
…t contexts as well

Also introduces consistent use of getBean(Class) for similar use cases across the framework, accepting a locally unique target bean even if further matching beans would be available in parent contexts (in contrast to BeanFactoryUtils.beanOfType's behavior).

Issue: SPR-10160
@jhoeller jhoeller Introduced NoUniqueBeanDefinitionException as a dedicated subclass of…
… NoSuchBeanDefinitionException

Issue: SPR-10194
@jhoeller jhoeller Final preparations for 3.2.1 0a09da7
@rstoyanchev rstoyanchev Support sub-types of ResponseEntity
Issue: SPR-10207
@jhoeller jhoeller Aligned XML scheduled-task elements with @Scheduled in terms of kicki…
…ng in after context refresh

Issue: SPR-9231
@jhoeller jhoeller Introduced NoUniqueBeanDefinitionException as a dedicated subclass of…
… NoSuchBeanDefinitionException

Issue: SPR-10194
@philwebb philwebb Filter build folder resources in eclipse
Apply eclipse project 'filter' to hide generated build artifacts from
the workspace.
@philwebb philwebb Polish AbstractContextLoader Javadoc
Fix unnecessary HTML escaping from {@code} Javadoc.
@philwebb philwebb Test String to char[] conversion
Issue: SPR-9793
@rstoyanchev rstoyanchev Raise exception on missing request parameters
Issue: SPR-10193
@philwebb philwebb Allow TypeDescriptor array construction
Add a static factory method that can be used to create an array
TypeDescriptor with a specific element type. Allows array types
with generic elements to be constructed.

Issue: SPR-9792
@jhoeller jhoeller Added "awaitTerminationSeconds" property to ThreadPoolTaskExecutor/Th…

Issue: SPR-5387
@jhoeller jhoeller Polishing d5af9dc
@jhoeller jhoeller Final preparations for 3.2.1 5fb7530
@philwebb philwebb Consider primary attribute with getBean(Class)
Update DefaultListableBeanFactory.getBean(Class<?> beanClass) to
consider the 'primary' attribute of bean definitions. This makes
getBean() behave in the same way as autowiring.

Issue: SPR-7854
@sbrannen sbrannen Polish Javadoc in TypeDescriptor
- fix @since version in array()
- format method-level Javadoc
- unescape HTML-escaped angle brackets with {@code} blocks
@sbrannen sbrannen Fix typo in ContextLifecycleScheduledTaskRegistrar 3b8aba9
@sbrannen sbrannen Update distribution README regarding paths
- Corrected path to 'docs/spring-framework-reference'
- Minor formatting changes
@rstoyanchev rstoyanchev Add BS and VT char escape sequences to JavaScriptUtils
Issue: SPR-9983
@philwebb philwebb Allow nulls with multiple embedded value resolvers
Allow an embedded value resolver added to an AbstractBeanFactory to
return null without adversely effecting any subsequent resolvers.

Issue: SPR-8565
@rstoyanchev rstoyanchev Suppress serialization warning 2ee70d6
@jhoeller jhoeller MBeanInfoAssembler impls expose actual method parameter names if poss…

Issue: SPR-9985
@jhoeller jhoeller ThreadPoolExecutorFactoryBean exposes "createExecutor" method for cus…
…tom ThreadPoolExecutor subclasses

Issue: SPR-9435
@jhoeller jhoeller Added further MySQL error code for DataIntegrityViolationException
Issue: SPR-9237
@jhoeller jhoeller DisposableBeanAdapter detects "shutdown" as a destroy method as well …
…(for EHCache CacheManager setup)

 Issue: SPR-9713
@jhoeller jhoeller Updated resolvePath javadoc to reflect Environment-based placeholder …

Issue: SPR-9455
@jhoeller jhoeller ResourcePropertyResource accepts EncodedResource for properties files…
… with a specific encoding

Also added constructor with Charset argument to EncodedResource.

Issue: SPR-10096
@jhoeller jhoeller Removed pre-JDK-1.5 checks e5d9378
@jhoeller jhoeller Polishing 5759269
@jhoeller jhoeller Final preparations for 3.2.1 919aeb5
@philwebb philwebb Change merge.into project dependencies to provided
Change 'compile' dependencies to 'provided' for projects that are
merged into other projects. This seems to prevent '-sources' and
'-javadoc' jars from appearing on the classpath which can break
javadoc generation.
@jhoeller jhoeller Added note on thread safety to TypeConverter and SimpleTypeConverter …

 Issue: SPR-8659
@jhoeller jhoeller Made EncodedResource based variant public; consistently detect XML pr…
…operties across all variants

Issue: SPR-9078
@cbeams cbeams Avoid UnsupportedOperationEx. with active SecurityManager
Issue: SPR-9970
@cbeams cbeams Merge branch 'SPR-9970' into 3.2.x
* SPR-9970:
  Avoid UnsupportedOperationEx. with active SecurityManager
@jhoeller jhoeller Completed changelog entries for 3.2.1 8625504
@giovannidalloglio giovannidalloglio first support for meta-annotations for the integration tests
Issue: SPR-7827

prior this commit, there was no support for meta-annotations in the Spring Intergation tests, now the @ContextConfiguration annotation is searched also in meta-annotations.

Eg: you can write:
@ContextConfiguration([...]) // config for HSQLDB environment
public @interface InRamEnvironment
@ContextConfiguration([...]) // config for common-core part
public @interface CommonCoreIntegrationTest
public class OneBatchTest {

[...] // actual test methods
@giovannidalloglio giovannidalloglio First documentation for meta-annotations support on spring-test 1855e3b

giovannidalloglio commented Jan 24, 2013

I fixed the problems, and rebased, but there are too much commits, I'm closing this pull request, and open a fresh new one.


cbeams commented Jan 24, 2013

new PR: #219


KingBuzzer commented on 7f928e8 Jan 25, 2013

Then you cannot use spring-orm and transitively depend on spring-jdbc and spring-tx for instance. This will probably break a lot of builds.


sslavic replied Jan 25, 2013

@KingBuzzer It's a bad practice to use undeclared dependencies. In Apache Maven world maven-dependency-plugin analyze goal can help one flush out this and similar bad practices.


philwebb replied Jan 26, 2013


Thanks for raising this. These particular projects are merged into other projects and it was not my intention to change the dependency scope in the published POMs. Unfortunately it appears that the merge dependency is taking precedence and this is indeed a bug.

See for more details.

This breaks the form tag action in a portlet environment. In a portlet environment, the @action attribute must be kept as is, because it is usually generated by the portlet container via the portlet:actionURL/ tag, and that action does not necessarily start with the context root of the web application.


philwebb replied May 28, 2013

I think this issue may have been raised already (see comments in SPR-8684. If this is a different problem could you please open a new JIRA.


In m)
I think returning null is a bad Idea. It's probably the reason why we are getting null pointer exception. Maybe an empty String[] would be a better implementation of the API.


snicoll replied Mar 14, 2016

@juanmf this is not the place to discuss about an issue. If you feel you've hit a bug in the framework, please create a new issue that explains what you're experiencing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment