Commit Graph

6095 Commits

Author SHA1 Message Date
Juergen Hoeller 9c6aa3e43b Java 5 Closeable and Java 7 AutoCloseable automatically detected as destroy methods
Also, @Bean destroy method inference not applying for DisposableBean implementers anymore (avoiding double destruction).

Issue: SPR-10034
2012-11-26 22:47:08 +01:00
Rossen Stoyanchev 5cb1930550 Fix issue in Callable processing interceptor chain 2012-11-26 16:04:17 -05:00
Rossen Stoyanchev 79edf627db Fix failing test from last commit
Issue: SPR-9917
2012-11-26 15:31:21 -05:00
Phillip Webb b1040af22e Update maximum width of reference HTML
This change upgrade the framework to consume the newly-published
docbook-reference-plugin version 0.2.1 containing a maximum width
for the HTML reference guide.
2012-11-26 11:29:12 -08:00
Rossen Stoyanchev 3a50dafc90 Add MockMvcClientHttpRequestFactory
Issue: SPR-9917
2012-11-26 14:23:12 -05:00
Rossen Stoyanchev f30d33d32e Add spring-test-mvc tests with Spring HATEOAS links
Issue: SPR-9886
2012-11-26 13:00:00 -05:00
Phillip Webb 6e3c3c58b5 Polish whitespace and formatting 2012-11-26 09:34:22 -08:00
Chris Beams 40e8d3f1a9 Merge pull request #188 from olivergierke/SPR-10038
# By Oliver Gierke
* SPR-10038:
  Introduce AnnotationAwareOrderComparator#INSTANCE
2012-11-26 18:18:12 +01:00
Oliver Gierke e40e2b7cae Introduce AnnotationAwareOrderComparator#INSTANCE
Prior to this change, the INSTANCE constant one could refer to on
AnnotationAwareOrderComparator actually referred to the constant
declared in the OrderAwareComparator superclass. Thus
AnnotationAwareOrderComparator#INSTANCE did not actually return an
AnnotationAwareOrderComparator but an OrderAwareComparator instead. This
commit introduces a dedicated constant on AnnotationAwareOrderComparator
to avoid this glitch.

Issue: SPR-10038
2012-11-26 18:14:29 +01:00
Chris Beams 1394050ed2 Update reference docs to a more modern CSS style
This change upgrade the framework to consume the newly-published
docbook-reference-plugin version 0.2.0, which includes among other
improvements a revamped CSS approach designed to look as similar
as possible to the way markdown files are rendered by GitHub.

See associated commit [1] at SpringSource's gradle-plugins repo for
further details.

Issue: SPR-10036

[1]: b209c350ed
2012-11-26 13:37:17 +01:00
Phillip Webb 1e48c789da Update whats new in Spring 3.2
Issue: SPR-10015
2012-11-25 23:04:00 -08:00
Phillip Webb 37b0277a89 Restore custom reference manual titlepage
Restore the custom title page of the reference manual in order to
remove the large list of authors on the first page.

Note: This change will require updating to version 0.1.7 of the
docbook-reference-plugin when it is released.

Issue: SPR-10008
2012-11-25 20:22:26 -08:00
Phillip Webb 5a2130ad1a Polish maven samples to xml language
Set the language attribute on the maven <programlisting> elements
in the reference documentation to xml.
2012-11-25 20:13:41 -08:00
Phillip Webb 2b6d724fae Remove xsd versions from reference samples
Remove all xsd versions from the reference manual samples in favor of
"versionless" XSDs. For example, spring-beans-3.0.xsd becomes
spring-beans.xsd

Issue: SPR-10010
2012-11-25 20:00:25 -08:00
Phillip Webb 3749313d2f Drop Appendix E. spring-beans-2.0.dtd from docs
Issue: SPR-10011
2012-11-25 19:31:01 -08:00
Phillip Webb 438c2d8fc2 Update Spring logo in the PDF reference guide 2012-11-25 19:21:27 -08:00
Phillip Webb e0b1c0e614 Remove duplicate imagedata from reference guide
Prior to this commit many imagedata elements were duplicated in
order to configure PDF sizes. Since HTML generation is configured
to ignore image scaling altogether this was unnecessary duplication.

Issue: SPR-10033
2012-11-25 19:16:16 -08:00
Phillip Webb c37080d49d Migrate reference guide to well-formed docbook XML
Convert all docbook XML files to well-formed docbook 5 syntax:
 - Include xsi:schemaLocation element for tools support
 - Convert all id elements to xml:id
 - Convert all ulink elements to link
 - Simplify <lineannotation> mark-up
 - Fix misplaced </section> tags
 - Fix <interface> tags to <interfacename>
 - Cleanup trailing whitespace and tabs

Issue: SPR-10032
2012-11-25 19:02:55 -08:00
Juergen Hoeller 89b443c198 Allow for more async running time in succeedsWhenSubclassProxyAndScheduledMethodNotPresentOnInterface
After all, this test fails quite often as part of the CI build...
2012-11-26 00:54:07 +01:00
Juergen Hoeller b8d86330d1 Deprecated Spring's own JSP expression evaluation
Since web applications declaring a Servlet 2.3 web.xml become really rare now, we're finally deprecating Spring's own ExpressionEvaluationUtils class. As a consequence, we're also setting "springJspExpressionSupport" to false by default, avoiding the potential double EL evaluation problem on pre-Servlet-3.0 containers.

Issue: SPR-5308
2012-11-26 00:35:47 +01:00
Juergen Hoeller 62ccc8dd7e Deprecated Spring's own JSP expression evaluation
Since web applications declaring a Servlet 2.3 web.xml become really rare now, we're finally deprecating Spring's own ExpressionEvaluationUtils class. As a consequence, we're also setting "springJspExpressionSupport" to false by default, avoiding the potential double EL evaluation problem on pre-Servlet-3.0 containers.

Issue: SPR-5308
2012-11-26 00:15:10 +01:00
Juergen Hoeller 5af1c84b6d Preparations for 3.2 RC2 2012-11-25 23:41:32 +01:00
Juergen Hoeller 52124fa31b Avoid wide locks in order to remove deadlock potential in case of multi-threaded singleton creation/destruction
Issue: SPR-10020
Issue: SPR-8471
2012-11-25 23:32:52 +01:00
Juergen Hoeller 87b7e3d8cf Fixed @Lazy and @DependsOn annotation definitions to be non-inheritable
Issue: SPR-9589
Issue: SPR-9476
2012-11-25 22:28:23 +01:00
Juergen Hoeller 9e337d2705 Avoid a hard dependency on Sun's CachedRowSetImpl class
Also using the JDBC 4.1 RowSetProvider API directly instead of going through reflection, since we're building on JDK 7 now.
2012-11-25 22:20:25 +01:00
Juergen Hoeller e2f418ab4c Added "transactionAware" bean property to EhCacheCacheManager and JCacheCacheManager
In the course of this enhancement, the "cache.ehcache" and "cache.jcache" packages moved from spring-context to the spring-context-support module, expecting further transaction-related functionality. Also aligns with the presence of Spring's Quartz support in the spring-context-support module, since Quartz and EHCache are sort of sister projects at Terracotta now.

Issue: SPR-9966
2012-11-25 21:58:35 +01:00
Juergen Hoeller 7d7758bfc9 Polishing 2012-11-25 21:15:48 +01:00
Juergen Hoeller 0ec19dc95e Removed OC4J tests 2012-11-25 21:12:59 +01:00
Juergen Hoeller b0c6a24974 Deprecated "scheduling.backportconcurrent" package in favor of native JDK 6 "scheduling.concurrent" support 2012-11-25 21:08:06 +01:00
Juergen Hoeller 4dc336920c Deprecated EJB 2.x implementation class hierarchy in "ejb.support" package 2012-11-25 21:06:25 +01:00
Juergen Hoeller 3d5bfc35b6 Deprecated Oracle OC4J support in favor of Oracle WebLogic 2012-11-25 21:00:56 +01:00
Juergen Hoeller 9772eb8410 Deprecated Spring's own JSP expression evaluation
Since web applications declaring a Servlet 2.3 web.xml become really rare now, we're finally deprecating Spring's own ExpressionEvaluationUtils class. As a consequence, we're also setting "springJspExpressionSupport" to false by default, avoiding the potential double EL evaluation problem on pre-Servlet-3.0 containers.

Issue: SPR-5308
2012-11-25 20:50:53 +01:00
Juergen Hoeller c368068c0c CachedIntrospectionResults uses full WeakReference for any non-safe ClassLoader arrangement
Previously, CachedIntrospectionResults had three modes of caching, with the intermediate mode relying on WeakReferences in the JDK PropertyDescriptor implementation. Since the JDK is actually using SoftReferences there these days, losing information in case of a GC run with tough memory constraints, we want to allow for hard references in PropertyDescriptor objects and therefore use a full WeakReference for the CachedIntrospectionResults object itself.

Issue: SPR-10028
2012-11-25 20:43:27 +01:00
Juergen Hoeller df76f1497a Replaced use of EmbeddedValueResolverAware with ConfigurableBeanFactory's resolveEmbeddedValue in order to avoid a package cycle with the org.springframework.context package
Issue: SPR-10021
2012-11-25 20:18:59 +01:00
Sam Brannen 202b15e19b Fix typo and polish formatting 2012-11-25 15:57:15 +01:00
Chris Beams 4a8be69099 Overhaul non-void JavaBean write method support
This change revisits the implementation of ExtendedBeanInfo, simplifying
the overall approach while also ensuring that ExtendedBeanInfo is fully
isolated from the BeanInfo instance it wraps. This includes any existing
PropertyDescriptors in the wrapped BeanInfo - along with being copied
locally into ExtendedBeanInfo, each property descriptor is now also
wrapped with our own new "simple" PropertyDescriptor variants that
bypass the soft/weak reference management that goes on in both
java.beans.PropertyDescriptor and java.beans.IndexedPropertyDescriptor,
maintaining hard references to methods and bean classes instead. This
ensures that changes we make to property descriptors, e.g. adding write
methods, do not cause subtle conflicts during garbage collection (as was
reported and reproduced in SPR-9702).

Eliminating soft/weak reference management means that we must take extra
care to ensure that we do not cause ClassLoader leaks by maintaining
hard references to methods, and therefore transitively to the
ClassLoader in which the bean class was loaded. The forthcoming
SPR-10028 addresses this aspect.

See the updated ExtendedBeanInfo Javadoc for further details.

Issue: SPR-8079, SPR-8175, SPR-8347, SPR-8432, SPR-8491, SPR-8522,
       SPR-8806, SPR-8931, SPR-8937, SPR-8949, SPR-9007, SPR-9059,
       SPR-9414, SPR-9453, SPR-9542, SPR-9584, SPR-9677, SPR-9702,
       SPR-9723, SPR-9943, SPR-9978, SPR-10028, SPR-10029
2012-11-25 12:28:20 +01:00
Rossen Stoyanchev 2d8bacace7 Set the ApplicationContext prop of ExceptionResolver
The MVC Java config now sets the ApplicationContext property of
ExceptionHandlerExceptionResolver.

Issue: SPR-9997
2012-11-23 15:12:52 -05:00
Rossen Stoyanchev e3681c107d Set response to 503 for async requests that time out
Issue: SPR-10002
2012-11-22 15:39:22 -05:00
Chris Beams 631f24bb32 Introduce jdiff Gradle task
The new jdiff task generates a report of API differences between the
current version (i.e. the value of `version` in gradle.properties) and
any older version of the framework, as specified by -DOLD_VERSION at
the command line, or defaulting to `previousVersion` in
gradle.properties.

Running the command requires a separate clone directory pinned to the
desired old version, as specified by -DOLD_VERSION_ROOT at the command
line. This creates challenges from a build automation perspective,
largely because Gradle doesn't (yet) have APIs for working with Git.

This task may be further automated and included in nightly CI runs, but
in the meantime, a number of reports back to 3.1.3.RELEASE have been
generated manually and uploaded to [1], where one can now find the
following entries in the directory listing:

 - 3.1.3.RELEASE_to_3.2.0.RC1
 - 3.2.0.M1_to_3.2.0.M2
 - 3.2.0.M2_to_3.2.0.RC1
 - 3.2.0.RC1_to_3.2.0.BUILD-SNAPSHOT

Ideally, the final entry there would be kept up-to-date on a daily
basis - again we may revisit doing so in the future. Going forward,
reports will be generated and uploaded manually on an as needed basis
and as part of the release process.

The goal of these reports are as follows:

 - to ease the process of ensuring backward compatibility

 - to aid in code reviews, particularly when reviewing large pull
   requests

 - to ease the process of creating migration guides for project
   maintainers, i.e. to help us remember what's changed

 - to allow ambitious end-users to discover what's been changing at the
   API level without without needing to wait for detailed "what's new in
   version X" and/or migration guide documentation

See documentation in jdiff.gradle for usage details.

Note that the jdiff-1.1.1 distribution as downloaded from [2] has been
added wholesale to the source tree under gradle/jdiff instead of
uploading JDiff jars to repo.springsource.org as we would normally do.
This is due to some unfortunate limitations in the implementation of the
jdiff ant task that require a phisical JDIFF_HOME directory. Checking in
the jars and various resources represents the simplest and most
pragmatic solution to this problem, though ambitious contributors are
free to do what's necessary to arrive at a more elegant arrangement.

[1]: http://static.springframework.org/spring-framework/docs
[2]: http://sourceforge.net/projects/javadiff/files/latest/download

Issue: SPR-9957
2012-11-22 21:05:58 +01:00
Chris Beams d4fb1c8d63 Refactor Gradle script naming and organization
- inline test-mvc and tiles3 .gradle files for clarity
 - rename merge-dist.gradle to merge-artifacts.gradle
 - polish Javadoc for merge-artifacts.gradle
 - move merge-artifacts.gradle into gradle subdirectory
 - move publish-maven.gradle into gradle subdirectory
2012-11-22 20:48:26 +01:00
Rossen Stoyanchev 819be10931 Merge pull request #185 from rwinch/maven-multi-version-artifact
* rwinch-maven-multi-version-artifact:
  Support Gradle/maven with multi version artifacts
2012-11-22 13:22:58 -05:00
Rob Winch 39d419bbc3 Support Gradle/maven with multi version artifacts
Previously the publish-maven.gradle only supported having a single
artifact be marked as optional or provided. This causes problems now
that we are building modules that support multiple versions of an
artifact. For example, we compile against two versions of Tiles
artifacts with identical names, both of which need to be marked
optional.

This updates publish-maven.gradle to find all the artifacts and mark
them as optional as apposed to the first entry.
2012-11-22 13:18:43 -05:00
Rossen Stoyanchev b7f7fae78a Fix issue with @RequestBody args that are type vars
The change to support generic @RequestBody arguments introduced in
3.2 M2 also introduced a regression in reading arguments that are
type variables. This change fixes the issue.

Issue: SPR-9964
2012-11-22 11:35:22 -05:00
Phillip Webb 4181397c31 Merge pull request #85 from obecker/master
* pull85:
  Call ConversionService for null SpEL values
  Polish whitespace
2012-11-21 23:16:25 -08:00
Oliver Becker 759c9b35cd Call ConversionService for null SpEL values
Update SpEL boolean operators to always call the ConversionService
for null values. Primarily to allow null values to be treated as
false by overriding GenericConversionService.convertNullSource().

Issue: SPR-9445
2012-11-21 22:53:29 -08:00
Phillip Webb d9bd2e19a2 Polish whitespace 2012-11-21 22:52:11 -08:00
Phillip Webb c5f391550c Document global date time format configuration
Update reference documentation to detail how global date and time
formats can be specified.

Issue: SPR-9952
2012-11-21 20:42:41 -08:00
Phillip Webb fddb829b8b Update Joda Time references in documentation
Update documentation to reflect the fact that Joda Time is no longer
required to use the @DateTimeFormat annotation.
2012-11-21 20:42:40 -08:00
Rossen Stoyanchev b36ab83ab3 Support GenericArrayType in GenericTypeResolver method
Before this change GenericTypeResolver.resolveType supported
TypeVariable's and ParameterizedType's only. Now it also supports
GenericArrayType.
2012-11-21 13:26:56 -05:00
Phillip Webb 0e2904b71a Document cache and jdbc namespaces
Update the XSD section of the document with details of the cache and
jdbc namespace.

Issue: SPR-9824
2012-11-20 18:12:00 -08:00