Compare commits

..

7637 Commits

Author SHA1 Message Date
Spring Buildmaster 299f8b15ad Release version 4.0.0.RELEASE 2013-12-11 23:15:13 -08:00
Phillip Webb 421292acf4 Final documentation polish before 4.0 2013-12-11 22:31:29 -08:00
Rossen Stoyanchev e637418010 Update stomp/websocket documentation 2013-12-11 23:36:55 -05:00
Rossen Stoyanchev f36863947d Update STOMP/WebSocket documentation 2013-12-11 21:18:06 -05:00
Juergen Hoeller 50b8a53415 What's New overhaul 2013-12-12 03:09:40 +01:00
Juergen Hoeller ca194261a4 Removed support for JBoss AS 5's VFS variant (since we require JBoss AS 6+ now) 2013-12-12 02:57:34 +01:00
Juergen Hoeller 21f680c861 Deprecated DefaultKeyGenerator
Issue: SPR-11210
2013-12-12 02:57:17 +01:00
Sam Brannen 6ee725031c Document meta-annotation support in the TCF
This commit documents meta-annotation support for test-related
annotations in the TestContext framework within the reference manual.

Issue: SPR-11109
2013-12-12 02:39:44 +01:00
Sam Brannen 341854fb56 Revised wording around “new in 3.2” 2013-12-12 01:53:29 +01:00
Sam Brannen 48ecf0af57 Do not format TestContext unless referring to class 2013-12-12 01:39:05 +01:00
Brian Clozel a9a20e297b changed Sun references and links to Oracle 2013-12-12 01:32:52 +01:00
Sam Brannen a83fb13fc4 Add Testing Improvements section to reference manual 2013-12-12 01:29:53 +01:00
Juergen Hoeller a3a43448d1 Polishing 2013-12-11 23:56:39 +01:00
Phillip Webb b085ec90b2 Replace references to VMware with Pivotal
Replace references to VMware in license, notices and maven generation
with Pivotal, Inc.

Issue: SPR-11073
2013-12-11 14:08:55 -08:00
Juergen Hoeller aa6e6c1349 Polishing 2013-12-11 22:58:23 +01:00
Juergen Hoeller 106a973a4d Prevent early FactoryBean creation for type checking purposes when coming from a factory method on yet another bean (e.g. from a configuration class)
Issue: SPR-11202
2013-12-11 22:57:22 +01:00
Phillip Webb b124066d63 Add What's new in 4.0 to reference documentation
Update the reference documentation with "What's new in Spring 4.0".
2013-12-11 13:52:49 -08:00
Brian Clozel 309fe9ceb1 Document MVC concepts introduced in Spring 4.0
Update the MVC reference documentation with the new concepts and classes
introduced in Spring 4.0
This reverts commit 6f874d734a2a38431c74444894f54797ecf74933.
2013-12-11 13:52:49 -08:00
Rossen Stoyanchev 01a78bbbac Add WebSocket reference documentation
Update reference documentation with a new section for Spring 4's
WebSocket support.
2013-12-11 13:52:48 -08:00
Brian Clozel 0a52c86559 Clean MVC reference documentation
Remove reference to removed deprecations and generally cleanup the MVC
documentation.
Cleanup Struts
2013-12-11 13:52:48 -08:00
Phillip Webb d6b4d92eed Clean reference docs and prepare for Spring 4
Polish and cleanup the asciidoc source and prepare the reference guide
for the upcoming Spring 4.0 release.
2013-12-11 13:52:48 -08:00
Brian Clozel 8b48ba2af3 Remove the What's new in Spring 3 from docs
Remove the entire What's new in Spring 3 section from the reference
documentation.
2013-12-11 13:52:47 -08:00
Phillip Webb 7e1e99d272 Extract appendix from main index.adoc
Extract the appendix into a separate asciidoc file in order to make the
main index.adoc easier to work with.
2013-12-11 13:52:47 -08:00
Juergen Hoeller bc5affa79a Made BeanUtils.copyProperties defensive about property type mismatches
Issue: SPR-11209
2013-12-11 20:49:18 +01:00
Rossen Stoyanchev 92dad1849f Rename @[Path/Destination]Variable in spring-messaging
Issue: SPR-11208
2013-12-11 14:44:57 -05:00
Juergen Hoeller a9605a11e9 "acceptExisting" flag allows for sharing per cacheManagerName on EhCache 2.5+
As a benefit over the "shared" flag, this allows for sharing a specific CacheManager in a system with potentially multiple CacheManagers involved, and it supports controlled shutdown by the EhCacheManagerFactoryBean that actually created the CacheManager.

Issue: SPR-11178
2013-12-11 17:25:02 +01:00
Juergen Hoeller 9c157ea073 DispatcherPortlet never uses a resource forward on Liferay
Issue: SPR-10791
2013-12-11 16:41:11 +01:00
Juergen Hoeller 8d6d6be39a MBean registration happens in a fully synchronized fashion for consistent results
Issue: SPR-11002
2013-12-11 16:31:26 +01:00
Juergen Hoeller 1b4e02b178 RequiredAnnotationBeanPostProcessor skips factory-bean definitions
Also moving the associated unit tests to the correct package beans.factory.annotation

Issue: SPR-10458
2013-12-11 16:11:16 +01:00
Juergen Hoeller 161819f141 Component scanning ignores attributes and meta-annotations on non-public annotations
Issue: SPR-11091
2013-12-11 15:29:55 +01:00
Sam Brannen a223e247c2 Document meta-annotation support in the TCF
- Completed Javadoc for MetaAnnotationUtils.
- Added Javadoc notes to multiple annotations in the TCF, pointing out
  which annotations can be used as meta-annotations.

Issue: SPR-11109
2013-12-11 14:43:10 +01:00
Juergen Hoeller 9fbb57c3ec Fixed CGLIB class validation to not raising warning for static final methods
Issue: SPR-11107
2013-12-11 12:34:59 +01:00
Juergen Hoeller 3ff3805ed6 Fixed extractOutputParameters to properly extract ResultSet in all cases
Issue: SPR-11076
2013-12-11 12:28:54 +01:00
Juergen Hoeller ccafccbec8 Actually accept String expressions for "prefetch" and "receive-timeout" in jms namespace
Issue: SPR-10986
2013-12-11 12:05:00 +01:00
Juergen Hoeller 2d2226baf6 Added 546 to Sybase data integrity violation codes
Issue: SPR-11097
2013-12-11 12:01:53 +01:00
Juergen Hoeller 62ea627965 Revised exclusion of java.lang.Class properties
Issue: SPR-11098
2013-12-11 11:58:46 +01:00
Phillip Webb a1529d498e Fix possible GenericMsgTemplate race condition
Fix a potential race condition with GenericMessagingTemplate's inner
TemporaryReplyChannel class.

Prior to this commit the `hasReceived` member variable was read after
calling `replyLatch.countDown()`.

Issue: SPR-11206
2013-12-11 00:08:34 -08:00
Phillip Webb f57c4a09ee Polish 2013-12-10 21:13:11 -08:00
Sam Brannen da7ae4a63b Polish meta-annotation terminology in MetaAnnoUtils 2013-12-11 02:14:50 +01:00
Sam Brannen 800018a817 Do not repopulate RequestContextHolder in ServTEL
This commit fixes a bug introduced in the last commit.

ServletTestExecutionListener (STEL) now tracks whether it has already
populated the RequestContextHolder.

Issue: SPR-11144
2013-12-11 01:00:04 +01:00
Sam Brannen 099b10d23b Honor presence of @WebAppConfiguration in ServTEL
The previous commit for issue SPR-11144 revealed a bug in
ServletTestExecutionListener (STEL). Specifically, STEL acted on the
fact that the ApplicationContext for a given TestContext was an
instance of WebApplicationContext. This behavior could potentially
break test code from previous releases of the Spring Framework that
relied on a custom setup of the RequestAttributes in the
RequestContextHolder with a custom WebApplicationContext ContextLoader.

This commit addresses this issue by ensuring that STEL only comes into
play if the test class is annotated with @WebAppConfiguration (for
prepareTestInstance() and beforeTestMethod()) or if the TestContext
attribute named RESET_REQUEST_CONTEXT_HOLDER_ATTRIBUTE is set to
Boolean.TRUE (for afterTestMethod()).

Issue: SPR-11144
2013-12-10 23:49:58 +01:00
Juergen Hoeller c5d797736b Added tests for custom qualifier annotations on scoped @Bean methods
Issue: SPR-11116
2013-12-10 22:35:34 +01:00
Juergen Hoeller cb624e25c5 Fixed ExtendedBeanInfo and its tests to accept JDK 8 b117+ introspection results
Specifically, read and write methods are allowed to express property types with superclass/subclass relationships in both directions now.

Issue: SPR-11139
2013-12-10 22:34:17 +01:00
Juergen Hoeller 92816492ed Established well-defined registration order for Hibernate package scanning
Issue: SPR-7742
2013-12-10 16:47:17 +01:00
Juergen Hoeller eb1b3c5a68 Use bean-creating factory's AutowireCandidateResolver even for dependencies in parent factory
Specifically, if the current factory has Qualifier/ContextAnnotationAutowireCandidateResolver set up, it is important to pass it on to ancestor factories to get consistent qualifier matching results.

Issue: SPR-10966
2013-12-10 15:33:57 +01:00
Juergen Hoeller be63c07b2e Polishing 2013-12-10 13:26:52 +01:00
Juergen Hoeller d6e84631f5 Fixed @since tag 2013-12-10 13:26:42 +01:00
Juergen Hoeller 4fe52d1953 Polishing 2013-12-10 12:00:32 +01:00
Juergen Hoeller 6d7ce439b1 Introduced GuavaCacheManager as an alternative to ConcurrentMapCacheManager 2013-12-10 11:59:35 +01:00
Juergen Hoeller 4c8a7899f2 Optimized use of JDBC 3.0 ParameterMetaData.getParameterType, caching information about drivers which do not support that feature
Issue: SPR-11100
2013-12-10 01:38:57 +01:00
Juergen Hoeller 26d143868f Compatibility with XStream 1.4.5
XStream 1.4.5 doesn't check a given ConverterLookup for a ConverterRegistry implementation anymore, so we have to manually perform that check and assignment.

Issue: SPR-11147
2013-12-09 22:47:16 +01:00
Juergen Hoeller 242ecdc448 Fixed inner bean name determination for multi-level nesting scenario, calculating a unique bean name as early as possible now (and for any kind of bean scope)
Our per-bean caching in AutowiredAnnotationBeanPostProcessor and co relies on unique bean names, so this change fixes potential cache mismatch problems occuring there.

Issue: SPR-11131
2013-12-09 21:45:44 +01:00
Juergen Hoeller 5dcd28761c Fixed type resolution for uninitialized factory-method declaration
Issue: SPR-11112
2013-12-09 18:53:27 +01:00
Sam Brannen a3b022aa48 Ensure ServTEL doesn't reset ReqAttrs by accident
Prior to this commit, the ServletTestExecutionListener did not
overwrite RequestAttributes in the RequestContextHolder if the
ApplicationContext associated with the given TestContext was not a
WebApplicationContext; however, the ServletTestExecutionListener would
clear the RequestAttributes after every test method execution,
regardless of whether the context was a WebApplicationContext or not.
This behavior breaks backwards compatibility with integration tests
that managed the RequestAttributes in RequestContextHolder themselves.

This commit addresses this issue by introducing a TestContext attribute
named RESET_REQUEST_CONTEXT_HOLDER_ATTRIBUTE in
ServletTestExecutionListener. This attribute is used internally within
ServletTestExecutionListener to ensure that the RequestContextHolder is
only cleared (i.e., reset) if the ServletTestExecutionListener actually
populated the RequestContextHolder.

Issue: SPR-11144
2013-12-09 15:35:54 +01:00
Rossen Stoyanchev 5f38996cd6 Add methods for static resolution of @ExceptionHandler 2013-12-09 08:19:17 -05:00
Juergen Hoeller 6078c27e60 Fixed evaluation of "!" operator in case of multiple profile expressions
Issue: SPR-11093
2013-12-09 13:29:21 +01:00
Juergen Hoeller f70739430b Polishing 2013-12-08 23:27:31 +01:00
Juergen Hoeller 8580d2d19e Fixed detection of generic types and qualifier annotations on scoped-proxy factory methods
Issue: SPR-11116
2013-12-08 23:24:16 +01:00
Juergen Hoeller 1f9b833c4d Introduced SockJsSession interface and moved SockJsSessionFactory and SockJsServiceConfig to sockjs.transport; added initialize(SockJsServiceConfig) method to TransportHandler interface; extracted TransportHandlingSockJsService from DefaultSockJsService; moved sockjs.support.frame to sockjs.frame and extracted (Default)SockJsFrameFormat from SockJsFrame; moved SockJsHttpRequestHandler to sockjs.support; removed Jackson 1.x support 2013-12-08 01:25:52 +01:00
Rossen Stoyanchev fcecd0328a Collapse messaging.simp.handler into messaging.simp 2013-12-06 17:23:31 -05:00
Rossen Stoyanchev 307bf4bede Add messaging.simp.user package 2013-12-06 17:05:29 -05:00
Rossen Stoyanchev 89455c00f6 Create messaging.simp.broker package 2013-12-06 16:24:04 -05:00
Juergen Hoeller ea8a2095ec Polishing 2013-12-06 21:51:18 +01:00
Juergen Hoeller 7a154e8e98 Renamed handler.support to handler.invocation 2013-12-06 21:50:47 +01:00
Juergen Hoeller c4163c7475 Moved messaging.support.converter to messaging.converter; moved messaging.support.tcp to messaging.tcp; moved messaging.support.channel to messaging.support itself; moved handler.condition to handler itself; reworked handler.method into handler.support 2013-12-06 18:24:38 +01:00
Rossen Stoyanchev 947f3d4b2b Update Javadoc, add tests and polish spring-messaging 2013-12-05 21:30:52 -05:00
Sam Brannen 3e0b0f100c Delete unused import in MockAsyncContext 2013-12-05 21:48:49 +01:00
Sam Brannen 4957131a7b Delete sysout.println call from MBean*Tests 2013-12-05 20:40:09 +01:00
Juergen Hoeller edeb11c556 Polishing 2013-12-04 23:58:05 +01:00
Brian Clozel efc5074395 Document ControllerAdvice annotation
Issue: SPR-11149
2013-12-04 17:14:55 +01:00
Spring Buildmaster 0912be105a Increment version to 4.0.0.BUILD-SNAPSHOT 2013-12-03 15:09:47 -08:00
Spring Buildmaster 8a4b36479a Release version 4.0.0.RC2 2013-12-03 14:45:38 -08:00
Phillip Webb 85b0bfff58 Only consider "is" methods with boolean returns
Fix regression introduced in b25e91a5 where ReflectivePropertyAccessor
does not consider the return type for "is" getters.

Issue: SPR-11142
2013-12-03 12:01:24 -08:00
Rossen Stoyanchev 8f569264da Fix issue in GlassfishRequestUpgradeStrategy
The observed behavior was that the client does not get a response from
the WebSocket HTTP handshake. On the server the handshake actually
succeeds, the response is set correctly to status 101, and the
WebSocketHandler gets notified of the successfully established
connection.

This change flushes the ServletResponse just before returning from the
GlassfishRequestUpgradeStrategy. This is actually what Glassfish's own
TyrusServletFilter does as well at the end along with a comment that it
is a possible bug.
2013-12-03 14:42:55 -05:00
Brian Clozel 3ac14e7cd8 Document websocket XML namespace
Issue: SPR-11063
2013-12-03 18:15:21 +01:00
Rossen Stoyanchev 14468e80f3 Add principal in GlassfishRequestUpgradeStrategy 2013-12-03 12:02:41 -05:00
Phillip Webb b1485420b6 Use port scanning for JMX tests
Attempt to fix performance build by scanning for a free JMX port.
2013-12-03 08:22:25 -08:00
Juergen Hoeller 1dff45c38a Consistent ".jetty" and ".standard" subpackages; consolidated GlassFishRequestUpgradeStrategy implementation; renamed Text/BinaryWebSocketHandler and moved them to web.socket.support 2013-12-03 17:18:24 +01:00
Rossen Stoyanchev 7713a55f6b Add test case for multivalue x-forwarded host header
Issue: SPR-11140
2013-12-03 09:24:40 -05:00
Phillip Webb d4245610a2 Fix performance test HSQLDB error
Fix QuartzSupportTests that has been failing since the HSQLDB upgrade.
2013-12-02 23:59:32 -08:00
Phillip Webb 526555de85 Tweak times in TimedSpringRunnerTests 2013-12-02 22:47:01 -08:00
Phillip Webb c2b56c07e5 Cache property TypeDescriptors
Attempt to improve performance by caching TypeDescriptors against bean
PropertyDescriptors in CachedIntrospectionResults.

This change is an attempt to fix the failing performance test case
`testPrototypeCreationWithOverriddenResourcePropertiesIsFastEnough` in
`AnnotationProcessorPerformanceTests`.
2013-12-02 21:55:00 -08:00
Phillip Webb fd1b48139f Polish 2013-12-02 21:35:13 -08:00
Rossen Stoyanchev bb5a53f7f7 Update websocket xml namespace attributes 2013-12-02 21:55:44 -05:00
Rossen Stoyanchev cea049b791 Move websocket config tests to annotation package 2013-12-02 21:32:06 -05:00
Phillip Webb cb46ef86c6 Fix test following ResolvableType hashcode change 2013-12-02 16:55:24 -08:00
Juergen Hoeller 6c1f62b19d EhCacheFactoryBean calls CacheManager.addCache before setStatisticsEnabled
Issue: SPR-11080
Issue: SPR-11092
(cherry picked from commit 6ce2eb9)
2013-12-03 01:37:24 +01:00
Juergen Hoeller f5a310ad57 Polishing (backported from 3.2.x) 2013-12-03 01:37:01 +01:00
Juergen Hoeller 2a52decbbc Polishing (including removal of javadoc imports that show as package cycles in IntelliJ) 2013-12-02 23:57:00 +01:00
Juergen Hoeller 41332728f9 Use AnnotationTransactionAttributeSource class name to avoid hard dependency on transaction.annotation package 2013-12-02 23:55:41 +01:00
Juergen Hoeller e62cd84ca2 Merged web.socket.messaging.config into web.socket.config and introduced web.socket.config.annotation 2013-12-02 23:54:38 +01:00
Phillip Webb ab2949f2b7 Fix ResolvableType hashCode generation
Fix ResolvableType.hashCode() to use the source of the variable
resolver, rather than the resolver itself.
2013-12-02 14:47:44 -08:00
Rossen Stoyanchev 69238ba66f Move WebSocketExtension to top-level package 2013-12-02 16:53:11 -05:00
Juergen Hoeller e3e1c1bcec Rearranged web.socket.server subpackages and introduced web.socket.config 2013-12-02 22:32:32 +01:00
Juergen Hoeller eb8b5c435c Polishing 2013-12-02 22:32:31 +01:00
Phillip Webb 5e02a6dda3 Fix casing in spring mvc namespace attributes
Update "enableMatrixVariables" and "ignoreDefaultModelOnRedirect" to
use the more conventional XML form "enable-matrix-variables" and
"ignore-default-model-on-redirect".

Both forms are now supported by `AnnotationDrivenBeanDefinitionParser`,
with newer names being defined in the 4.0 XSD and the older names
remaining in the 3.2 XSD.

Issue: SPR-11136
2013-12-02 12:28:56 -08:00
Rossen Stoyanchev 47ef45d152 Polish websocket xml namespace
Issue: SPR-11063
2013-12-02 15:25:49 -05:00
Phillip Webb 92e144a8a8 Add a 'bill of materials' project for Maven users
Add 'spring-framework-bom' meta-project that contains the other projects
in a dependencyManagement section.

Issue: SPR-11138
2013-12-02 11:55:22 -08:00
Rossen Stoyanchev 079fb2db73 Add assert AbstractStandardRequestUpgradeStrategy 2013-12-02 13:59:17 -05:00
Brian Clozel 10f5d96a78 Add XML namespace for WebSocket config
This commit adds an XML namespace equivalent of @EnableWebSocket and
@EnableWebSocketMessageBroker. Those are <websocket:handlers> and
<websocket:message-broker> respectively.

Examples can be found in the test suite.

This commit also alters the way MessageHandler's subscribe to their
respective MessageChannel's of interest. Rather than performing the
subscriptions in configuration code, the message channels are now
passed into MessageHandler's so they can subscribe themselves on
startup.

Issue: SPR-11063
2013-12-02 12:18:33 -05:00
Juergen Hoeller 8f1fefc159 Fixed javadoc 2013-12-02 14:55:56 +01:00
Juergen Hoeller 3e4b3cad6a Always preserve target class for configuration classes in case of auto-proxying
Issue: SPR-10561
2013-12-02 14:42:17 +01:00
Juergen Hoeller 8958912c94 Extended testPrototypeCreationWithOverriddenAutowiredPropertiesIsFastEnough's deadline (since that test repeatedly failed on the CI server) 2013-12-02 13:15:27 +01:00
Juergen Hoeller 676ad125a1 Reverted arrayToList signature to return plain List
This is necessary for source compatibility with existing callers, such as code found in Spring Integration: e.g. passing the arrayToList result into a typed HashSet constructor.
2013-12-02 13:10:41 +01:00
Juergen Hoeller bd8469990d Detect depends-on cycles and throw proper exception
Issue: SPR-7966
2013-12-02 12:39:37 +01:00
Juergen Hoeller de890fd100 Synchronized cache creation on CacheManager
Issue: SPR-11132
2013-12-02 11:02:07 +01:00
Juergen Hoeller ce917d5cbb Polishing around @EnableTransactionManagement
Issue: SPR-10864
2013-12-02 11:00:26 +01:00
Juergen Hoeller e8dead247c @EnableTransactionManagement and co get detected on superclasses as well
Issue: SPR-10864
2013-12-02 10:59:30 +01:00
Phillip Webb b0b40dade1 Detect cache hit with multiple @Cachables
Fix CacheAspectSupport to consider a cache hit from any of the multiple
@Cachables that may have been specified using the @Caching annotation.

Prior to this commit the following scenario would never produce a hit:

	@Caching(cacheable = {
		@Cacheable(value = "c1", unless = "#result.size() < 4"),
		@Cacheable(value = "c2", unless = "#result.size() > 3")
	})

Issue: SPR-11124
2013-11-26 17:13:15 -08:00
Phillip Webb 043a41e382 Consistent whitespace after imports
Update code to have a consistent number of new-line characters after
import statements.
2013-11-26 15:14:43 -08:00
Phillip Webb 15698860e1 General polish of new 4.0 classes
Apply consistent styling to new classes introduced in Spring 4.0.

- Javadoc line wrapping, whitespace and formatting
- General code whitespace
- Consistent Assert.notNull messages
2013-11-26 15:11:18 -08:00
Rossen Stoyanchev 690051f46c Add ability to customize message channels
@EnableWebSocketMessageBroker message channel configuration can now be
customized via WebSocketMessageBrokerConfigurer. It is necessary to
make this easy and even required as part of the basic configuration
since by default the message channels are backed by a thread pool of
size 1, not suitable for production use.

Issue: SPR-11023
2013-11-26 16:51:14 -05:00
Rossen Stoyanchev e764c8d897 Fix synchronization issue in StompSubProtocolHandler
Two concurrent threads should not send a message on a single WebSocket
session at the same time, for example see:
http://docs.oracle.com/javaee/7/api/javax/websocket/RemoteEndpoint.Basic.html

In StompSubProtocolHandler it is quite possible that multiple messages
may be broadcast to a single WebSocket client concurrently.

This change adds synchronization around the sending of a message to a
specific cilent session.

Issue: SPR-11023
2013-11-26 16:51:14 -05:00
Phillip Webb a31ac882c5 Fix various javadoc warnings 2013-11-26 13:25:37 -08:00
Sam Brannen c7c395d0d0 Merge pull request #421 from sbrannen/SPR-11038
* SPR-11038:
  Support meta-annotation attr overrides in the TCF
2013-11-26 15:59:00 -05:00
Sam Brannen 64f593db8f Support meta-annotation attr overrides in the TCF
Prior to this commit, the Spring TestContext Framework (TCF) supported
the use of test-related annotations as meta-annotations for composing
custom test stereotype annotations; however, attributes in custom
stereotypes could not be used to override meta-annotation attributes.

This commit addresses this by allowing attributes from the following
annotations (when used as meta-annotations) to be overridden in custom
stereotypes.

- @ContextConfiguration
- @ActiveProfiles
- @DirtiesContext
- @TransactionConfiguration
- @Timed
- @TestExecutionListeners

This support depends on functionality provided by
AnnotatedElementUtils. See the 'Notes' below for further details and
ramifications.

Notes:

- AnnotatedElementUtils does not support overrides for the 'value'
  attribute of an annotation. It is therefore not possible or not
  feasible to support meta-annotation attribute overrides for some
  test-related annotations.
- @ContextHierarchy, @WebAppConfiguration, @Rollback, @Repeat, and
  @ProfileValueSourceConfiguration define single 'value' attributes
  which cannot be overridden via Spring's meta-annotation attribute
  support.
- Although @IfProfileValue has 'values' and 'name' attributes, the
  typical usage scenario involves the 'value' attribute which is not
  supported for meta-annotation attribute overrides. Furthermore,
  'name' and 'values' are so generic that it is deemed unfeasible to
  provide meta-annotation attribute override support for these.
- @BeforeTransaction and @AfterTransaction do not define any attributes
  that can be overridden.
- Support for meta-annotation attribute overrides for @Transactional is
  provided indirectly via SpringTransactionAnnotationParser.

Implementation Details:

- MetaAnnotationUtils.AnnotationDescriptor now provides access to the
  AnnotationAttributes for the described annotation.
- MetaAnnotationUtils.AnnotationDescriptor now provides access to the
  root declaring class as well as the declaring class.
- ContextLoaderUtils now retrieves AnnotationAttributes from
  AnnotationDescriptor to look up annotation attributes for
  @ContextConfiguration and @ActiveProfiles.
- ContextConfigurationAttributes now provides a constructor to have its
  attributes sourced from an instance of AnnotationAttributes.
- ContextLoaderUtils.resolveContextHierarchyAttributes() now throws an
  IllegalStateException if no class in the class hierarchy declares
  @ContextHierarchy.
- TransactionalTestExecutionListener now uses AnnotatedElementUtils to
  look up annotation attributes for @TransactionConfiguration.
- Implemented missing unit tests for @Rollback resolution in
  TransactionalTestExecutionListener.
- SpringJUnit4ClassRunner now uses AnnotatedElementUtils to look up
  annotation attributes for @Timed.
- TestContextManager now retrieves AnnotationAttributes from
  AnnotationDescriptor to look up annotation attributes for
  @TestExecutionListeners.
- DirtiesContextTestExecutionListener now uses AnnotatedElementUtils to
  look up annotation attributes for @DirtiesContext.

Issue: SPR-11038
2013-11-26 15:56:37 -05:00
Phillip Webb c5779e2ed6 Remove unused GlassFishLoadTimeWeaverTests
Delete the unused GlassFishLoadTimeWeaverTests and in the process
fix the "Unable to load JUnit4 runner to calculate Ignored test cases"
Gradle error.

Issue: SPR-10563
2013-11-26 10:51:13 -08:00
Juergen Hoeller ef3a3b03ce @EnableMBeanExport supports empty placeholders as well
Issue: SPR-11105
2013-11-26 14:43:10 +01:00
Rossen Stoyanchev 119e793994 Fix concurrency issue in TestDispatcherServlet
This change fixes a timing issue in tests using Spring MVC Tests where
assertions on an async result may not wait long enough.

The fix involves the use of a new callback in  MockAsyncContext that
allows tests to detect when an async dispatch has been invoked.

Issue: SPR-10838
2013-11-25 21:51:08 -05:00
Rossen Stoyanchev ce3e55743f Extract IdGenerator into a top-level class 2013-11-25 21:50:47 -05:00
Sam Brannen a5d87fffd9 Polish Javadoc for @IfProfileValue 2013-11-25 21:22:54 -05:00
Sam Brannen 412f74f679 Provide meta-annotation support for @Rollback
@Rollback now supports ANNOTATION_TYPE as a target, allowing it to be
used as meta-annotation.

Note: this change was accidentally omitted from the original commit for
SPR-7827.

Issue: SPR-7827
2013-11-25 20:17:14 -05:00
Juergen Hoeller 1e6f2e79b9 Adapted getXmlAsSource implementation to avoid compilation failure in IntelliJ IDEA 2013-11-26 01:41:54 +01:00
Juergen Hoeller 1ee816b473 Re-introduced custom StaxSource and StaxResult for Spring Web Services 2013-11-26 01:40:34 +01:00
Phillip Webb e6952f41b7 Merge pull request #418 from ericdahl/doc-typos
* doc-typos:
  Fix various typos
2013-11-25 15:59:28 -08:00
Eric Dahl e9f78f6043 Fix various typos
Fix a variety of typos throughout the project, primarily in
comments (javadoc or otherwise) but also in a handful of log messages
and a couple exception messages.

ISSUE: SPR-11123
2013-11-25 15:58:27 -08:00
Rossen Stoyanchev 4e82416ba9 Add SubProtocolCapable interface
The addition of SubProtocolCapable simplifies configuration since it is
no longer necessary to explicitly configure DefaultHandshakeHandler
with a list of supported sub-protocols. We will not also check if the
WebSocketHandler to use for the WebSocket request is an instance of
SubProtocolCapable and obtain the list of sub-protocols that way. The
provided SubProtocolWebSocketHandler does implement this interface.

Issue: SPR-11111
2013-11-25 18:06:01 -05:00
Phillip Webb 59002f2456 Fix remaining compiler warnings
Fix remaining Java compiler warnings, mainly around missing
generics or deprecated code.

Also add the `-Werror` compiler option to ensure that any future
warnings will fail the build.

Issue: SPR-11064
2013-11-25 12:52:42 -08:00
Rossen Stoyanchev 4de3291dc7 Consolidate websocket/messaging code
Before this change spring-messaging contained a few WebSocket-related
classes including WebSocket sub-protocol support for STOMP as well
as @EnableWebSocketMessageBroker and related configuration classes.

After this change those classes are located in the spring-websocket
module under org.springframework.web.socket.messaging.

This means the following classes in application configuration must
have their packages updated:

org.springframework.web.socket.messaging.config.EnableWebSocketMessageBroker
org.springframework.web.socket.messaging.config.StompEndpointRegistry
org.springframework.web.socket.messaging.config.WebSocketMessageBrokerConfigurer

MessageBrokerConfigurer has been renamed to MessageBrokerRegistry and
is also located in the above package.
2013-11-23 21:09:17 -05:00
Juergen Hoeller f888b8816f Re-enabled tests for meta-annotations on interfaces
Issue: SPR-11108
2013-11-23 00:43:29 +01:00
Juergen Hoeller f39bb02628 Polishing 2013-11-22 23:29:54 +01:00
Juergen Hoeller 70164cb145 Properly handle InvocationTargetException in reflective JtaPlatform implementation 2013-11-22 23:26:09 +01:00
Juergen Hoeller 519f78c3f5 Optimized ImportAware processing to avoid re-reading class files 2013-11-22 23:22:20 +01:00
Juergen Hoeller 009e362709 @EnableMBeanExport supports placeholders for its attributes now
Issue: SPR-11105
2013-11-22 23:18:47 +01:00
Sam Brannen ad402dcb4a Status quo for composable stereotypes on interfaces
The tests introduced in this commit demonstrate the current lacking
support for composable stereotypes on interfaces (using @Transactional)
as a concrete example.

Issue: SPR-11108
2013-11-22 16:37:48 +01:00
Sam Brannen 44c5eaeaa3 Fix typo in Javadoc 2013-11-22 16:17:20 +01:00
Sam Brannen a613126be0 Polish AnnotationUtils
- Added explicit reference to “get” and “find” lookup types in the
  class-level Javadoc.
- Updated documentation for the underlying algorithms in
  findAnnotation(Method,Class) and findAnnotation(Class,Class) in line
  with the status quo.
- Reverted recent changes to findAnnotationDeclaringClass() by removing
  meta-annotation support in order to maintain backwards compatibility
  with previous releases.
2013-11-22 14:39:51 +01:00
Sam Brannen 665251fa2f Suppress deprecation warning in StatusResultMatchers 2013-11-22 12:55:12 +01:00
Sam Brannen 127bc07cda Delete unused package import 2013-11-22 12:49:25 +01:00
Phillip Webb f3504b2fd5 Fix docs sample for ConversionServiceFactoryBean
Fix the reference documentation example for ConversionServiceFactoryBean
to use a `<set>` instead of a `<list>`.

Issue: SPR-10802
2013-11-21 15:53:22 -08:00
Phillip Webb d9c4470461 Upgrade to HSQLDB 2.3.1
Replace `hsqldb:hsqldb:1.8.0.10` with `org.hsqldb:hsqldb:2.3.1` and
fix breaking tests.

Issue: SPR-10947
2013-11-21 15:48:17 -08:00
Phillip Webb 87e443b429 Merge pull request #80 from giovannidalloglio/SPR-9164
* SPR-9164:
  Add BigDecimal support for SpEl numeric operations
2013-11-21 14:33:13 -08:00
giovannidalloglio d0ab131a57 Add BigDecimal support for SpEl numeric operations
Prior to this change, SpEL supported numeric operations for int, float,
ect. `new java.math.BigDecimal('0.1') > 0` evaluated to false
(BigDecimal is truncated to int)

This commit introduces support for BigDecimal operations for all
mathematical operators. `new java.math.BigDecimal('0.1') > 0` now
evaluates to true (the comparison is made with BigDecimals)

Issue: SPR-9164
2013-11-21 14:28:29 -08:00
Phillip Webb a41958435a Merge pull request #406 from aclement/fix-SPR-9194
* fix-SPR-9194:
  Change SpEL equality operators to use .equals
2013-11-21 12:08:40 -08:00
Andy Clement 2a05e6afa1 Change SpEL equality operators to use .equals
Prior to this commit the SpEL operators `==` and `!=` were using the
Java `==` comparison operator as part of their equality checking. It is
more flexible to use the equals() method on Object.

Under this commit the change to .equals() has been made and the equality
checking code has been pushed into a common method in the Operator
superclass. This commit also makes some tweaks to the other operator
classes - the Float case was missing from OpGT.

Issue: SPR-9194
2013-11-21 12:06:31 -08:00
Phillip Webb 7c3cdf82cc Try a different mbean port 2013-11-21 11:49:49 -08:00
Sam Brannen 3200f3e9a7 Polish Javadoc for TestGroup 2013-11-21 10:53:57 +01:00
Sam Brannen cfe7a525e2 Revert accidental changes to TestGroupTests 2013-11-21 10:52:53 +01:00
Phillip Webb 639b2cb12e Increase performance test timeout 2013-11-20 22:05:34 -08:00
Phillip Webb 4385da7b84 Support for 'all excluding' test groups 2013-11-20 21:26:17 -08:00
Phillip Webb 02f7803860 Upgrade to Gradle 1.9 2013-11-20 13:14:57 -08:00
Phillip Webb 5c7eaaa969 Fix SpEL docs indicating +/- is Supported on Date
Issue: SPR-11057
2013-11-20 13:13:27 -08:00
Sam Brannen b830d7362d Support non-public anno. attr. values in AnnoUtils
Prior to this commit, the getValue(Annotation, String) method in
AnnotationUtils failed to retrieve the value of the desired annotation
attribute if the annotation itself was not public -- for example if the
annotation was declared as package private.

This commit addresses this issue by ensuring that getValue(Annotation,
String) uses reflection to make the desired annotation attribute method
accessible before attempting to invoke it to retrieve the value.

Issue: SPR-11104
2013-11-20 21:58:36 +01:00
Sam Brannen 45afd4fbe2 Update build in preparation for Gradle 2.0
As of Gradle 1.8, ‘testReport true’ is deprecated. Thus in order to
generate TestNG reports alongside JUnit reports with Gradle 2.0 and
beyond, we are now using:

  getReports().getHtml().setEnabled(true)
2013-11-20 20:10:19 +01:00
Phillip Webb 63c143be61 Merge pull request #409 from cdupuis/SPR-11083
* SPR-11083:
  Allow instrumentation to be used with Attach API
2013-11-20 10:39:33 -08:00
Christian Dupuis f6f0adf63b Allow instrumentation to be used with Attach API
Update InstrumentationSavingAgent to allow it to be used with the
Attach API

Issue: SPR-11083
2013-11-20 10:39:24 -08:00
Juergen Hoeller 41cdbd292a Defensively handle non-retrievable ApplicationListener bean names 2013-11-20 14:52:25 +01:00
Juergen Hoeller 6a9e116d78 Polishing 2013-11-20 14:50:59 +01:00
Juergen Hoeller 0de112198e Rely on presence of Servlet 2.5's ServletContext.getContextPath() 2013-11-20 14:50:32 +01:00
Brian Clozel 2ea5360b82 Upgrade Jetty to 9.1.0 GA
Issue: SPR-11099
2013-11-19 17:22:33 -08:00
Brian Clozel cc4faa5990 Fix standard multipart binding + Polish
Fixing standard multipart binding when multiple parts share
the same name.

Uncomment previously @Ignored tests now that Jetty supports
Servlet 3.0 spec.

Issue: SPR-10591
2013-11-19 17:13:31 -08:00
Phillip Webb 6f2004f4f8 Restore multi-page and PDF reference documentation
Generate docbook xml from the asciidoc reference guide and use the
docbook-reference-plugin to generate HTML (single and multi-page) and
PDF documentation.

Issue: SPR-11096
2013-11-19 16:50:56 -08:00
Phillip Webb e54fc7bbdc Add whitespace to improve asciidoc readability
Issue: SPR-11096
2013-11-19 16:50:46 -08:00
Phillip Webb 5d8b008a8b Remove superfluous spaces in asciidoc
Remove the superfluous spaces that appear in the asciidoc source.

Issue: SPR-11096
2013-11-19 16:39:37 -08:00
Phillip Webb 8d4d5af30a Polish build.gradle 2013-11-19 16:31:04 -08:00
Phillip Webb 8dd5e6da46 Upgrade to Gradle 1.8 and propdeps 0.0.5 2013-11-19 16:24:42 -08:00
Phillip Webb a7251041f1 Fix broken reference guide links
Remove or replace broken links from the reference documentation.

Issue: SPR-11096
2013-11-18 20:20:23 -08:00
Phillip Webb 99cf06bfc9 Remove superfluous space before 'http' in asciidoc
Remove the superfluous space that appears before each 'http' reference
in the asciidoc source. Presumably there due to some quirk of the
docbook conversion.

Issue: SPR-11096
2013-11-18 20:17:54 -08:00
Phillip Webb 13bef4fd2d Specify asciidoc type
Specify a specific asciidoc type of 'docbook' to prevent
'multiple titles at level 0' errors during generation.

Issue: SPR-11096
2013-11-18 20:14:24 -08:00
Phillip Webb 8e60bbc3ee Replace asciidoc authors convention with attribute
Replace the second line of the asciidoc reference guide that, by
convention, specifies authors with an 'author' explicit attribute.

Issue: SPR-11096
2013-11-18 20:11:49 -08:00
Phillip Webb 7d7f0063f8 Wrap reference asciidoc at 90 characters
Reformat the asciidoc source for the reference guide to wrap at about
90 characters.

Issue: SPR-11096
2013-11-18 20:08:41 -08:00
Phillip Webb cb858a3b01 Replace springsource.org links with spring.io
Update reference documentation links to use the new spring.io domain.

Issue: SPR-11096
2013-11-18 10:12:19 -08:00
Phillip Webb ea08d4b49c Add .gradletasknamecache to .gitignore 2013-11-18 10:12:19 -08:00
Phillip Webb 4b0de69246 Replace non UTF-8 characters in asciidoc source
Replace the odd instance of non UTF-8 characters in the reference
asciidoc source, mainly smart-quotes.

Issue: SPR-11096
2013-11-18 10:11:49 -08:00
Biju Kunjummen dfa7483812 Fix broken javadoc links in reference guide
Replace links in the reference documentation from
`http://static.springsource.org/spring/docs/current/api/..` to
`http://docs.spring.io/spring/docs/current/javadoc-api/..`

Issue: SPR-11087
2013-11-18 09:33:48 -08:00
Sam Brannen e910326bf7 Polish Javadoc for ListableBeanFactory 2013-11-17 14:59:47 +00:00
Rossen Stoyanchev 35b9b8400b Rename @SubscribeEvent to @SubscribeMapping
Also @SubscribeMapping is now a method-level annotation only that can
be used in combination with a type-level @MessageMapping.

This method also documents supported method arguments and return value
types on @Subscribe- and @MessageMapping methods.
2013-11-15 16:34:27 +00:00
Juergen Hoeller 2597cd2339 Upgraded to JCache 1.0 PFD 2013-11-15 16:48:34 +01:00
Juergen Hoeller 54571bf038 Introduced getBeanNamesForAnnotation method on ListableBeanFactory
Issue: SPR-11069
2013-11-15 16:04:11 +01:00
Juergen Hoeller b43901ed86 Upgraded to JSF 2.0 baseline; building against JSF 2.2 now 2013-11-15 12:07:42 +01:00
Juergen Hoeller ddebda1121 Ignoring non-loadable annotations in SourceClass.getAnnotations() and therefore in the collectImports algorithm
Issue: SPR-11086
2013-11-15 11:50:01 +01:00
Rossen Stoyanchev 6802f813de Polish STOMP codec
Issue: SPR-11088
2013-11-13 13:45:56 -05:00
Andy Wilkinson e84885c655 Update STOMP decoder to handle incomplete frames
Previously, StompDecoder would throw a StompConversionException when
it attempted to decode a Buffer that contained an incomplete frame.

This commit updates StompDecoder to return null when it encounters an
incomplete frame. It also resets the buffer, thereby allowing the
decode to be reattempted once more data has been received.
StompCodec's decoder function has been updated to stop attempting to
decode a Buffer when StompDecoder returns null.

Issue: SPR-11088
2013-11-13 13:45:12 -05:00
Rossen Stoyanchev 9600bf07c7 Upgrade to reactor-tcp 1.0 2013-11-12 16:44:11 -05:00
Rossen Stoyanchev df5d22e120 Improve logging in spring-messaging
Before this change the amount of logging was too little or too much
with TRACE turned on. This change separates useful debugging
information and logs it under DEBUG and leaves more detailed
information to be logged under TRACE.
2013-11-12 16:34:25 -05:00
Rossen Stoyanchev 72dec7d0fe Add default destination for @SendTo methods
Issue: SPR-11085
2013-11-11 16:59:36 -05:00
Sam Brannen d67fe1db86 Polish spring-context
- Cache interceptor internals now operate on collections of
   <? extends Cache> instead of <Cache>.
 - Deleted unused imports.
 - Deleted dead code.
 - Suppressed warnings for resource leaks related to not closing
   ApplicationContexts in tests.
 - Suppressed further non-issue warnings in tests.
2013-11-11 12:09:50 +01:00
Rossen Stoyanchev 5915b23e8a Rename method in MessageBrokerConfigurer 2013-11-10 10:47:35 -05:00
Sam Brannen 930d187723 Merge pull request #408 from AlexYursha/patch-1
Fix a typo in package description
2013-11-08 15:53:24 -08:00
Alex Yursha 6a1ca41cb7 Put accidentally deleted LF in place 2013-11-09 01:57:27 +03:00
Alex Yursha 6900645d59 Fix a typo in package description 2013-11-09 01:26:59 +03:00
Rossen Stoyanchev 2a6c1f75e7 Simplify determination of SockJS path
The SockJS path is now passed to the SockJsService handleRequest method
thus removing the need to guess it.

Issue: SPR-11058
2013-11-07 22:28:15 -05:00
Rossen Stoyanchev 6a18daea33 Return AbstractSubscribableChannel from @Bean methods
Declare SubscribableChannel @Beans in
WebSocketMessageBrokerConfigurationSupport as
AbstractSubscribableChannel to avoid the need for casting when
registering interceptors.

Issue: SPR-11065
2013-11-07 22:28:00 -05:00
Rossen Stoyanchev 0340cc5f03 Update user destinations handling
Before this change subscribing to a user-specific destination in STOMP
required manually appending a unique queue suffix provided in a header
with the CONNECTED frame.

This change removes the need to do that. Instead STOMP clients can
subscribe to "/user/queue/error" and can then begin to receive messages
sent to "/user/{username}/queue/error" without colliding with any other
user doing the same.

Issue: SPR-11077
2013-11-07 17:37:41 -05:00
Sam Brannen c09f85172b Use AsciiDoctor special characters
- Replaced ellipsis with "..."

 - Replaced em dash with "--"

 - Fixed issue with italics migration in the Standard Annotation Support
  section of the Testing chapter
2013-11-07 13:18:31 +01:00
Michael Irwin 467c770b4d Handle UnsupportedOperationException from getInstalledExtensions in Glassfish 4.0 2013-11-06 08:36:28 -05:00
Rossen Stoyanchev b5bd4d8a8a Add div around extra hidden fields in FormTag
Issue: SPR-10926
2013-11-05 20:45:50 -05:00
Juergen Hoeller e9a24da225 Added test for placeholder in alias definition
Issue: SPR-11018
2013-11-06 00:14:26 +01:00
Juergen Hoeller 0aedd81ccc JndiObjectFactoryBean converts a "defaultObject" value to the expected type if necessary
Issue: SPR-11039
2013-11-06 00:12:52 +01:00
Rob Winch dcc6ef262d Poish asciidoctor
Issues: SPR-10960
2013-11-05 16:50:06 -06:00
Rossen Stoyanchev 18b69903ca Return 415 on bad request body content-type
Issue: SPR-10982
2013-11-05 15:38:55 -05:00
Rob Winch 7bf4324f0f Poish asciidoctor
Issues: SPR-10960
2013-11-05 13:52:25 -06:00
Rob Winch 3476d11fb8 Poish asciidoctor
Issues: SPR-10960
grate documentation to #	deleted:    src/reference/docbook/index.xml
2013-11-05 11:01:30 -06:00
Rossen Stoyanchev 2e57cf8bfc Fold spring-test-mvc sources into spring-test
With spring-test compiling against Servlet 3.0 it is no longer required
to compile Spring MVC Test sources separately (from spring-test).
2013-11-05 11:44:13 -05:00
Rossen Stoyanchev 0eeb6717e0 Fix exception mock request builder
Issue: SPR-11043
2013-11-05 10:59:05 -05:00
Rossen Stoyanchev c6c5555034 Use final keyword in MessageHeaders 2013-11-05 10:06:35 -05:00
Rossen Stoyanchev 2ae6a6a341 Disable ext entities in SourceHttpMessageConverter
This change disables the processing of external entities in
SourceHttpMessageConverter by default and provides an option to enable
it if required.
2013-11-05 09:23:20 -05:00
Juergen Hoeller c5fcf19535 Perform setParent's Environment merging for ClassPathXmlApplicationContext etc constructors with parent argument as well
Issue: SPR-11068
2013-11-05 13:48:21 +01:00
Juergen Hoeller 4ac680103b Only retrieve the FlashMapManager if a non-empty output FlashMap has been found
Issue: SPR-10937
2013-11-05 13:38:10 +01:00
Juergen Hoeller 8f81a12236 Added actual overriding test to BeanMethodPolymorphismTests
Issue: SPR-10992
2013-11-05 01:09:51 +01:00
Juergen Hoeller eed1a323d1 Polishing (along with SPR-10992) 2013-11-04 23:44:47 +01:00
Juergen Hoeller 935bd25b09 Revised @Bean processing rules
@Bean method metadata is always being picked from the most concrete subclass; @Bean method overloads are allowed within the same config class as well; and @Bean overrides and overloads work with 'allowBeanDefinitionOverriding'=false now.

Issue: SPR-10992
Issue: SPR-11025
2013-11-04 23:34:00 +01:00
Juergen Hoeller e146e53d9b Added support for the JCA 1.7 getActivationName() method
Issue: SPR-11067
2013-11-04 23:14:57 +01:00
Rossen Stoyanchev bedb8e965f Update CONTRIBUTING-DOCUMENTATION.adoc 2013-11-04 15:56:48 -05:00
Rossen Stoyanchev 6ef9cbe473 Update CONTRIBUTING-DOCUMENTATION.adoc 2013-11-04 15:56:26 -05:00
Rob Winch fd0b6caf9e Migrate documentation to asciidoctor
This commit migrates to asciidoctor to ease writing documentation.

Issues: SPR-10960
2013-11-04 11:49:52 -06:00
Juergen Hoeller 50d3f71923 Added get(key, type) method to Cache interface
This new get variant not only allows for generically specifying the required value type; it also skips the ValueWrapper that the standard get method returns. Note that it is not possible to differentiate between non-existing cache entries and cached null values that way; for that purpose, the standard get variant needs to be used.

Issue: SPR-11061
2013-11-04 14:31:41 +01:00
Juergen Hoeller b093b84954 Use non-lenient constructor resolution mode for @Bean methods
Since @Bean methods are never used with externally specified constructor argument values but rather just with autowiring, the non-lenient constructor resolution mode is appropriate in case of an overloaded @Bean method, not performing any type difference weight checks. This change includes a refinement of Spring's existing non-lenient constructor resolution (which needs to be explicitly turned on and is therefore not well tested), narrowing the conditions for the ambiguity check (only in case of the same number of arguments and not for overridden methods).

Issue: SPR-10988
2013-11-04 00:19:55 +01:00
Juergen Hoeller 49758a2a96 Added convenience classes for typical JSR-236 setup in a Java EE 7 environment
Introduced DefaultManagedTaskExecutor, DefaultManagedTaskScheduler and DefaultManagedAwareThreadFactory classes, revised related javadoc, and deprecated unsupported JBossWorkManagerTaskExecutor in favor of JSR-236 setup on WildFly 8.

Issue: SPR-8195
2013-11-02 20:14:02 +01:00
Juergen Hoeller 00474ceecd Introduced setCacheRegionFactory method on LocalSessionFactoryBuilder/Bean
Issue: SPR-11056
2013-11-01 23:50:09 +01:00
Juergen Hoeller 13ed423387 Polished exception messages
Issue: SPR-11042
2013-11-01 23:07:50 +01:00
Juergen Hoeller 44dee37130 Added further author tags
Issue: SPR-1528
2013-11-01 22:43:02 +01:00
Juergen Hoeller 7ed108e974 Avoid potential NPE in toString()
Issue: SPR-1528
2013-11-01 22:42:17 +01:00
Juergen Hoeller 7b2ac6d194 LocaleContextHolder allows for independent setting of Locale and TimeZone
Issue: SPR-1528
2013-11-01 22:41:31 +01:00
Juergen Hoeller 1dc7ff8604 Avoid unnecessary char[] allocation in NamedParameterUtils
Issue: SPR-11042
2013-11-01 22:38:55 +01:00
Spring Buildmaster a32b94f85d Increment version to 4.0.0.BUILD-SNAPSHOT 2013-10-31 12:18:53 -07:00
Spring Buildmaster e5c254b081 Release version 4.0.0.RC1 2013-10-31 11:56:36 -07:00
Rossen Stoyanchev bfa6c2d5a2 Tweak method signatures in HttpComponentsClientHttpRF
This change replaces CloseableHttpClient with HttpClient in the
methods signatures of HttpComponentsClientHttpRequestFactory.
This allows 3rd party libraries such as Spring OAth, which configure
an instance of HttpComponentsClientHttpRequestFactory on the
RestTemplate to remain compatible with both Spring Framework 3/4

Issue: SPR-11053
2013-10-31 11:10:35 -04:00
Juergen Hoeller 9f3b8a2430 GenericTypeResolver's resolveTypeArguments needs to return null for raw types (for backwards compatibility with 3.2)
Issue: SPR-11052
2013-10-31 15:28:20 +01:00
Juergen Hoeller 84bc474016 Upgraded to Apache HttpComponents HttpClient 4.3.1 and HttpAsyncClient 4.0 GA, as well as Jackson 2.2.2 2013-10-31 15:26:11 +01:00
Juergen Hoeller 6e418fe43d QualifierAnnotationAutowireCandidateResolver matches regular bean name for FactoryBean dependency type as well 2013-10-31 15:26:10 +01:00
Sam Brannen ec24299092 Delete unused imports 2013-10-31 13:58:26 +01:00
Sam Brannen 8bb29750bf Deleted unused resourceLoader field in Jaxb2Marshaller 2013-10-31 13:48:27 +01:00
Sam Brannen c3afda3992 Delete unnecessary @SuppressWarnings("unused") 2013-10-31 13:43:38 +01:00
Sam Brannen 2e6c998168 Update Javadoc for mocks regarding Servlet 3.0
Commit deba32cad9 upgraded the Servlet API mocks to Servlet 3.0;
however, not all of the Javadoc was updated accordingly.

This commit updates the remaining Javadoc with regard to Servlet 3.0 as
the baseline for mocks in the spring-test module.

In addition, this commit syncs up the mocks used for internal testing in
the spring-web module with the most current versions from spring-test.

Issue: SPR-11049
2013-10-31 11:51:15 +01:00
Phillip Webb d371886988 Allow null method for getTransactionAttribute
Update MatchAlwaysTransactionAttributeSource.getTransactionAttribute
to allow a null method argument. Passing a null method is not
recommended and is not indicated as valid in the Javadoc, however,
this was allowed in previous versions of Spring.

Issue: SPR-11048
2013-10-30 22:43:29 -07:00
Rossen Stoyanchev 5d8fac86d7 Add timeout async request handling to OSIV components
This change adds async web request timeout handling to OSIV filters
and interceptors to ensure the session or entity manager is released.

Issue: SPR-10874
2013-10-30 22:54:21 -04:00
Juergen Hoeller b69ebe70a6 Consistent javadoc references to java.util.concurrent and javax.enterprise.concurrent 2013-10-31 01:13:58 +01:00
Juergen Hoeller 3402628a74 Polishing 2013-10-30 22:06:51 +01:00
Juergen Hoeller 148f8f011d AutowireCandidateResolver receives original bean name (including FactoryBean prefix if applicable) for correct generic type check in case of a FactoryBean definition
Issue: SPR-11045
2013-10-30 22:05:33 +01:00
Juergen Hoeller f9584184ef Allow for specific instance-based match to override factory method signature match
Issue: SPR-11046
2013-10-30 22:02:04 +01:00
Juergen Hoeller ac7e27b785 Polishing 2013-10-30 19:30:18 +01:00
Juergen Hoeller 9cbac985fb Refined check for cache turnoff threshold
Issue: SPR-10803
2013-10-30 19:28:08 +01:00
Phillip Webb e5aef5ee9d Protect against NPE when resolving generic array
Update ResolvableType to check that the resolved component type from
a generic array is not null before attempting to use it to generate the
resolved array class.

Issue: SPR-11044
2013-10-30 10:50:55 -07:00
Rossen Stoyanchev a7af9505de Avoid filling up AntPathMatcher cache
This change avoid use of AntPathMatcher to extract URI template
variables when the lookup path is used as the best matching pattern.

Issue: SPR-10803
2013-10-30 12:39:31 -04:00
Juergen Hoeller 48b9e9a203 Spring uses Joda-Time 2.0's specific parseLocalDate/parseLocalTime/parseLocalDateTime methods now
Issue: SPR-11014
2013-10-30 16:50:21 +01:00
Juergen Hoeller 4bcfbc3ba3 Apply name-matching transaction attributes to user-level methods only
In particular, do not apply them to GroovyObject methods and other kinds of synthetic methods in language runtimes. The only exception are bridge methods since those do eventually point to a user-level generic method.

Issue: SPR-10803
2013-10-30 12:38:45 +01:00
Juergen Hoeller 0fe49629c0 AbstractApplicationContext's ApplicationListenerDetector removes listeners from ApplicationEventMulticaster on individual destruction
Issue: SPR-7856
2013-10-30 12:30:13 +01:00
Rossen Stoyanchev eddb125836 Upgrade to Tomcat 8 RC5 2013-10-29 22:29:23 -04:00
Rossen Stoyanchev a640d84961 Fix issue in AbstractMethodMessageHandler 2013-10-29 21:57:27 -04:00
Rossen Stoyanchev 164a9f938c Update the Jetty WebSocket adapter
This changes switches from using Jetty's WebSocketListener interface
to use Jetty's @WebSocket annotations instead. The change should be
transparent but the annnotations provide a little more controler
including handling pong frames.

This change also introduces a WebSocketMessage interface.

Issue: SPR-10877
2013-10-29 21:37:49 -04:00
Rossen Stoyanchev 7d5b34a7c5 Fix warnings 2013-10-29 21:37:26 -04:00
Juergen Hoeller f669a40bd6 Removed deprecated TransactionAspectUtils class 2013-10-30 00:54:29 +01:00
Juergen Hoeller bfa30913fb Polishing 2013-10-30 00:53:55 +01:00
Juergen Hoeller 326154270f Refined caching of AntPathStringMatcher per pattern
Introduced a "setCachePatterns(boolean)" method for explicit configuration, a default turnoff threshold at 65536 entries (at which point we're deciding that caching isn't worthwhile because patterns are unlikely to be reoccurring often enough), and an "AntPathStringMatcher getStringMatcher(String pattern)" template method.

Issue: SPR-10803
2013-10-30 00:53:18 +01:00
Juergen Hoeller 62157fe38f Refined logging for advisors which are currently in creation
Issue: SPR-10430
2013-10-30 00:29:21 +01:00
Sam Brannen 7ca09d7e3d Polish NamedParameterUtils
- Fixed typos in Javadoc
- Formatted Javadoc
2013-10-29 23:44:53 +01:00
Brian Clozel 397d52ad17 Upgrade to Jetty 9.1.0 .RC0
This commit upgrades Jetty to the latest available 9.1.x version while
also preserving compatibility with 9.0.x.
2013-10-29 15:02:25 -04:00
Sam Brannen 75e61cc983 Polish spring-websocket
- Removed unused imports
- Organized imports
- Deleted unused fields
- Deleted unused local variables
- Deleted unused private static classes
2013-10-29 19:39:41 +01:00
Sam Brannen bf9ec78c5d Polish spring-messsaging
- Removed unused imports
- Organized imports
- Discontinued use of deprecated junit.framework.Assert class
- Suppressed warnings where appropriate
- Added missing generics to return type for getMappingComparator() in
  SimpAnnotationMethodMessageHandler
2013-10-29 19:29:23 +01:00
Phillip Webb 4043b1d381 Workaround Javadoc bug with JDK 8 (b112+)
Remove Javadoc linkplain to ExceptionHandler#value() from
AnnotationMethodHandlerExceptionResolver to work around JDK
Javadoc bug 9007707.
2013-10-29 09:55:54 -07:00
Rossen Stoyanchev 558aec294c Polish MvcUriComponentsBuilder 2013-10-29 11:39:59 -04:00
Rossen Stoyanchev c81754fa51 Merge pull request #392 from bclozel/SPR-10843 2013-10-28 22:41:31 -04:00
Rossen Stoyanchev 81dda069af Update WebSocket extensions change
- add WebSocketHttpHeaders
- client-side support for WebSocket extensions
- DefaultHandshakeHandler updates
- replace use of ServletAttributes in JettyRequestUpgradeStratey
- upgrade spring-web to jetty 9.0.5
2013-10-28 22:40:22 -04:00
Brian Clozel 6d00a3f0ee Add support for WebSocket Protocol Extensions
This commits adds simple, overridable WebSocket Extension
filtering during the handshake phase and adds that
information in the WebSocket session.

The actual WebSocket Extension negotiation happens
within the server implementation (Glassfish, Jetty, Tomcat...),
so one can only remove requested extensions from
the list provided by the WebSocket client.

See RFC6455 Section 9.

Issue: SPR-10843
2013-10-28 22:40:22 -04:00
Phillip Webb 78c10cd242 Polish BeanMethodPolymorphismTests
Polish BeanMethodPolymorphismTests and add @Ignored failing test
for SPR-10988.

Issue: SPR-10988
2013-10-28 16:51:20 -07:00
Rob Winch 64869db9e7 Ignore .idea 2013-10-28 12:05:31 -05:00
Juergen Hoeller 8c1767e223 Defensive handling of exceptions during factory method type checking
Also using ClassUtils.forName in AutowireUtils now in order to accept all common class name formats.

Issue: SPR-11034
2013-10-28 13:25:45 +01:00
Sam Brannen 180f41c4c5 Renamed @WebTests to @WebTest
@WebTests has been renamed to @WebTest so that the Gradle build does not
attempt to run it as a JUnit test.
2013-10-28 02:04:24 +01:00
Sam Brannen f9cadfe6f9 Relocate test class to src/test/java folder 2013-10-28 01:56:21 +01:00
Sam Brannen 2bd5a535e1 Merge pull request #393 from sbrannen/SPR-7827
* SPR-7827:
  Provide meta-annotation support in the TCF
2013-10-28 01:41:04 +01:00
Sam Brannen 5e7021f3f7 Provide meta-annotation support in the TCF
Spring 3.0 already allows component stereotypes to be used in a
meta-annotation fashion, for example by creating a custom
@TransactionalService stereotype annotation which combines
@Transactional and @Service in a single, reusable, application-specific
annotation. However, the Spring TestContext Framework (TCF) currently
does not provide any support for test-related annotations to be used as
meta-annotations.

This commit overhauls the TCF with regard to how annotations are
retrieved and adds explicit support for the following annotations to be
used as meta-annotations in conjunction with the TCF.

- @ContextConfiguration
- @ContextHierarchy
- @ActiveProfiles
- @DirtiesContext
- @IfProfileValue
- @ProfileValueSourceConfiguration
- @BeforeTransaction
- @AfterTransaction
- @TransactionConfiguration
- @Rollback
- @TestExecutionListeners
- @Repeat
- @Timed
- @WebAppConfiguration

Note that meta-annotation support for @Transactional was already
available prior to this commit.

The following is a summary of the major changes included in this commit.

- Now using AnnotationUtils.getAnnotation() instead of
  Class.getAnnotation() where appropriate in the TestContext Framework.
- Now using AnnotationUtils.findAnnotation() instead of
  Class.isAnnotationPresent() where appropriate in the TestContext
  Framework.
- Introduced findAnnotationPrefersInteracesOverLocalMetaAnnotations() in
  AnnotationUtilsTests in order to verify the status quo.
- AnnotationUtils.findAnnotationDeclaringClass() and
  AnnotationUtils.findAnnotationDeclaringClassForTypes() now support
  meta annotations.
- Introduced MetaAnnotationUtils and AnnotationDescriptor in the
  spring-test module.
- Introduced UntypedAnnotationDescriptor in MetaAnnotationUtils.
- Introduced findAnnotationDescriptorForTypes() in MetaAnnotationUtils.
- ContextLoaderUtils now uses MetaAnnotationUtils for looking up
  @ActiveProfiles as a potential meta-annotation.
- TestContextManager now uses MetaAnnotationUtils for looking up
  @TestExecutionListeners as a potential meta-annotation.
- DirtiesContextTestExecutionListener now uses AnnotationUtils for
  looking up @DirtiesContext as a potential meta-annotation.
- Introduced DirtiesContextTestExecutionListenerTests.
- ProfileValueUtils now uses AnnotationUtils for looking up
  @IfProfileValue and @ProfileValueSourceConfiguration as potential
  meta-annotations.
- @BeforeTransaction and @AfterTransaction now support ANNOTATION_TYPE
  as a target, allowing them to be used as meta-annotations.
- TransactionalTestExecutionListener now uses AnnotationUtils for
  looking up @BeforeTransaction, @AfterTransaction, @Rollback, and
  @TransactionConfiguration as potential meta-annotations.
- Introduced TransactionalTestExecutionListenerTests.
- @Repeat and @Timed now support ANNOTATION_TYPE as a target, allowing
  them to be used as meta-annotations.
- SpringJUnit4ClassRunner now uses AnnotationUtils for looking up
  @Repeat and @Timed as potential meta-annotations.
- Moved all remaining logic for building the MergedContextConfiguration
  from the DefaultTestContext constructor to
  ContextLoaderUtils.buildMergedContextConfiguration().
- Verified meta-annotation support for @WebAppConfiguration and
  @ContextConfiguration.

Issue: SPR-7827
2013-10-28 01:33:17 +01:00
Juergen Hoeller 56dfcd153e Aligned with refinements in 3.2.x branch
Issue: SPR-11034
2013-10-27 23:17:47 +01:00
Rossen Stoyanchev 24dfe8ec19 Replace use of jdk 1.8 api 2013-10-27 18:00:16 -04:00
Juergen Hoeller 2c2ed7edd3 Polishing 2013-10-27 21:26:16 +01:00
Juergen Hoeller 960ba379ca Fixed resolveReturnTypeForFactoryMethod to unwrap TypedStringValue
XML-defined arguments values are initially turned into TypedStringValue wrappers. If we encounter an unresolved argument, we need to unwrap such a TypedStringValue and then try to treat its content as a class name.

Issue: SPR-11034
2013-10-27 21:26:04 +01:00
Juergen Hoeller 671fad3cb5 Added further tests for raw matching of generic types
Issue: SPR-11034
Issue: SPR-11004
2013-10-27 11:02:16 +01:00
Juergen Hoeller 4cb453bbdc Polishing 2013-10-27 01:21:55 +02:00
Juergen Hoeller a6b0261000 Proper matching of raw generic types and generically typed factory methods
Also optimized getTypeForFactoryMethod's implementation for non-generic factory methods, and reduced calls to getResolvedFactoryMethod in order to avoid repeated synchronization.

Issue: SPR-11034
2013-10-27 00:35:36 +02:00
Sam Brannen 88fe2e9b00 Convert TestContext to interface & default impl
Since the Spring TestContext Framework was introduced in Spring
Framework 2.5, the TestContext class has always been a public class
with package private constructors. The visibility of TestContext's
constructor and methods was intentionally limited in order to hide the
implementation details of the context cache, etc. However, this fact
has made it difficult (if not impossible) to unit test custom
TestExecutionListener implementations.

This commit addresses this issue by converting TestContext into a
public interface with a package private DefaultTestContext
implementation. This enables unit testing of any components that depend
on a TestContext (e.g., TestExecutionListeners) while at the same time
preserving the encapsulation of the inner workings of the TestContext
implementation with regard to context loading and caching.

Issue: SPR-7692
2013-10-26 21:20:12 +02:00
Phillip Webb 2e1c035d42 Increased ResolvableType unit test coverage
Issue: SPR-11034
2013-10-26 09:33:40 -07:00
Juergen Hoeller 6cfbcf4f17 Avoid NPE in hasUnresolvableGenerics()
Issue: SPR-11034
2013-10-26 17:59:51 +02:00
Juergen Hoeller 231433f540 Polishing
(cherry picked from commit 6021822)
2013-10-26 17:37:11 +02:00
Juergen Hoeller 2d91309fdf Fixed detection of setter in case of getter with covariant return type narrowing
Issue: SPR-10995
(cherry picked from commit 045f78e)
2013-10-26 17:36:50 +02:00
Juergen Hoeller b32451ac9f Polishing 2013-10-26 15:18:34 +02:00
Juergen Hoeller 614387fe0e Sneaked in test for covariant return type narrowing in a getter method
Issue: SPR-10995
2013-10-26 15:14:31 +02:00
Juergen Hoeller 109faaced8 Factory method type resolution works with indexed and named arguments as well
Issue: SPR-11019
2013-10-26 14:05:37 +02:00
Juergen Hoeller 4675bc4e0c Cache InjectionMetadata per bean name instead of per Class, if possible
Issue: SPR-11027
2013-10-26 14:03:11 +02:00
Rossen Stoyanchev 14b9931ee3 Update MvcUriComponentsBuilder to use DispServlet WAC
Issue: SPR-8826
2013-10-25 23:25:13 -04:00
Rossen Stoyanchev cf5db8362b Replace MvcUrls with MvcUriComponentsBuilder
Issue: SPR-8826
2013-10-25 22:29:38 -04:00
Phillip Webb e7f89f87c1 Fix off-by-one error in parseLocaleString
Fix off-by-one error in StringUtils.parseLocaleString()

Issue: SPR-10364
2013-10-25 18:25:43 -07:00
Phillip Webb e80b7d1e22 Add getSource() to ResolvableType & TypeDescriptor
Add getSource() method to ResolvableType and TypeDescriptor allowing
access to the underlying source field or method parameter when possible.

Primarily added to provide access to additional type information or
meta-data that alternative JVM languages may provide.

Issue: SPR-10887
2013-10-25 18:14:41 -07:00
Phillip Webb 014d156f5b Make EvaluationException more informative
Update EvaluationException to expose the toDetailedString() method as
the exception message. The simple message can now be accessed via the
new getSimpleMessage() method.

Issue: SPR-10938
2013-10-25 17:55:02 -07:00
Phillip Webb 1a3ba79071 Restore prior resolveTypeArguments behavior
Restore prior behavior of GenericTypeResolver.resolveTypeArguments to
never include null elements in the returned array.

Issue: SPR-11030
2013-10-25 17:26:57 -07:00
Juergen Hoeller 393cfcff40 Cache InjectionMetadata per bean name instead of per Class
Issue: SPR-11027
2013-10-26 02:21:38 +02:00
Juergen Hoeller 166b7a906e Changed spring-beans-groovy's Groovy dependency to optional
Issue: SPR-11028
2013-10-26 02:21:37 +02:00
Juergen Hoeller 6d80da2e31 Polishing 2013-10-26 02:21:36 +02:00
Juergen Hoeller dfb29f4296 Introduced ScriptEvaluator strategy interface
Including ScriptEvaluator implementations for JSR-223, Groovy and BeanShell. BeanShell consistently receives the bean ClassLoader now. Also revised ScriptFactory and its implementations for varargs.

Issue: SPR-11007
2013-10-26 02:21:35 +02:00
Phillip Webb 12e896ed8b Polish 2013-10-25 16:42:47 -07:00
Juergen Hoeller 8bd480441e Made processCommonDefinitionAnnotations(AnnotatedBeanDefinition) public
Issue: SPR-11032
2013-10-26 00:02:55 +02:00
Juergen Hoeller 4aab31531b ExpressionState.getConfiguration() should never return null
Issue: SPR-11031
2013-10-26 00:01:31 +02:00
Juergen Hoeller 0851766738 Accept non-generic type match as a fallback
DefaultListableBeanFactory performs a fallback check for autowire candidates now, which GenericTypeAwareAutowireCandidateResolver implements to accept raw type matches if the target class has unresolvable type variables. Full generic matches are still preferred; the BeanFactory will only start looking for fallback matches if the first pass led to an empty result.

Issue: SPR-10993
Issue: SPR-11004
2013-10-25 17:52:38 +02:00
Juergen Hoeller 02f9b713b0 Added Groovy plugin to spring-context module as well 2013-10-25 17:51:23 +02:00
Juergen Hoeller 401056b520 Only apply Groovy plugin to modules where it is actually needed 2013-10-25 13:30:16 +02:00
Juergen Hoeller 833d76ba5e Upgraded to ASM 4.2 2013-10-25 13:29:20 +02:00
Rossen Stoyanchev b8809daf5f Refactor HandlerMethod support in spring-messaging
Introduce base class AbstractMethodMessageHandler for
HandlerMethod-based message handling.

Add MessageCondition interface for mapping conditions to messages
with support for combining type- and method-level annotation
conditions, the ability to match conditions to messages, and also
comparing matches to select the best match.

Issue: SPR-11024
2013-10-24 21:50:49 -04:00
Rossen Stoyanchev 4892a27016 Add STOMP broker relay unit tests 2013-10-23 16:26:28 -04:00
Rossen Stoyanchev bfa6645c7d Make changes for timing related test failures 2013-10-23 13:24:25 -04:00
Rossen Stoyanchev 2d78a066fb Add ListenableFuture to TcpOperations connect methods 2013-10-23 11:55:43 -04:00
Rossen Stoyanchev f3ca3c108c Switch to reactor snapshots and make use of API change 2013-10-22 22:34:41 -04:00
Sam Brannen 6b0a62569b Fix broken test in MvcNamespaceTests
The testDefaultConfig() method in MvcNamespaceTests creates a new Date()
in its test fixture but then performs an assertion against a hard coded
data string of "2013-10-21". This test therefore only passed yesterday,
on October 21, 2013.

This commit addresses this by changing the hard coded date string to one
based on the current date.

Issue: SPR-10665, SPR-8826
2013-10-22 22:38:32 +02:00
Phillip Webb e95bd9e250 Add @PropertySources and ignoreResourceNotFound
Support repeatable @PropertySource annotations in Java 8 and add
@PropertySources container annotation for Java 6/7. Also add an
ignoreResourceNotFound attribute to @PropertySource allowing missing
property resources to be silently ignored.

This commit also introduces some generally useful methods to
AnnotationUtils for working with @Repeatable annotations.

Issue: SPR-8371
2013-10-22 11:15:50 -07:00
Rossen Stoyanchev 8917821e95 Polish GenericMessage 2013-10-21 16:29:01 -04:00
Rossen Stoyanchev bafc73f147 Integrate suggested support for creating MVC URLs
The key contract is MvcUrls. An instance is automatically created with
the Spring MVC namespace and the MVC Java config but can also be easily
created in any configuration.

Some example tests can be found in DefaultMvcUrlsTests.

Issue: SPR-10665, SPR-8826
2013-10-21 16:26:08 -04:00
Oliver Gierke 4fd27b12fc Introduced MvcUriComponentsBuilder to create URIs pointing to controller methods.
MvcUriComponentsBuilder allows creating URIs that point to Spring MVC
controller methods annotated with @RequestMapping. It builds them by
exposing a mock method invocation API similar to Mockito, records the
method invocations and thus builds up the URI by inspecting the mapping
annotations and the parameters handed into the method invocations.

Introduced a new SPI UriComponentsContributor that should be implemented 
by HandlerMethodArgumentResolvers that actually contribute path segments 
or query parameters to a URI. While the newly introduced 
MvcUriComponentsBuilder looks up those UriComponentsContributor instances 
from the MVC configuration.

The MvcUriComponentsBuilderFactory (name to be discussed - MvcUris maybe?) 
prevents the multiple lookups by keeping the UriComponentsBuilder 
instances in an instance variable. So an instance of the factory could 
be exposed as Spring bean or through a HandlerMethodArgumentResolver to 
be injected into Controller methods.

Issue: SPR-10665, SPR-8826
2013-10-21 16:26:07 -04:00
Rossen Stoyanchev 92a48b72d7 Polish (minor) 2013-10-21 16:26:07 -04:00
Phillip Webb e3d3d8cd95 Consistent ordering for @PropertySource locations
Ensure that property source locations are processed in the same order
regardless if the 'name' attribute is set or not.

Prior to this commit multiple locations from a `@PropertySource` with
a name were added to a `CompositePropertySource` in such a way that
the first location would take precedence. This has now been reversed
for consistence with unnamed `@PropertySource`s

Issue: SPR-10820
2013-10-21 13:11:19 -07:00
Phillip Webb b0ff834ee3 Multicaster support for events with null source
Update `AbstractApplicationEventMulticaster` to support `EventObjects`
with a null source (which can happen if they have been serialized).

Issue: SPR-10945
2013-10-21 11:59:46 -07:00
Phillip Webb 6d882b149d Add targetIsClass to SpEL property cache key
Update the `CacheKey` class used by `ReflectivePropertyAccessor` to
include if the target object is class. The prevents an incorrect cache
hit from being returned when a property with the same name is read on
both an object and its class. For example:

	#{class.name}
	#{name}

Issue: SPR-10486
2013-10-21 11:02:09 -07:00
Sam Brannen 7658d856ca Assert context uniqueness against merged config
Prior to this commit, the uniqueness check for @ContextConfiguration
attributes within a @ContextHierarchy was performed at a single test
class level instead of against the merged configuration for all test
class levels in the test class hierarchy.

This commit addresses this issue by moving the uniqueness check
algorithm from resolveContextHierarchyAttributes() to
buildContextHierarchyMap() within ContextLoaderUtils.

Issue: SPR-10997
2013-10-21 19:33:04 +02:00
Phillip Webb 686cd79bdd Propagate EvaluationContext from LiteralExpression
Update getValue(EvaluationContext context, Object rootObject,
Class<T> desiredResultType) to propagate the EvaluationContext to
ExpressionUtils.

Issue: SPR-10953
2013-10-18 17:52:31 -07:00
Phillip Webb c9aace4da2 Skip convert to Object from TypeConverterDelegate
Update TypeConverterDelegate to bypass conversion when the target type
is Object.class. Prior to this commit converting a single element array
to an Object would result in the element being returned, rather than
the array itself.

Issue: SPR-10996
2013-10-18 17:19:41 -07:00
Phillip Webb b25e91a550 Relax JavaBean rules for SpEL property access
Relax the method search algorithm used by `ReflectivePropertyAccessor`
to include methods of the form `getXY()` for properties of the form
`xy`.

Although the JavaBean specification indicates that a property `xy`
should use the accessors `getxY()` and `setxY()`, in practice many
developers choose to have an uppercase first character. The
`ReflectivePropertyAccessor` will now consider these style methods if
the traditional conventions fail to find a match.

Issue: SPR-10716
2013-10-18 16:20:57 -07:00
Phillip Webb 59fcf5014f Increase timeout for Stomp integration tests 2013-10-18 16:19:33 -07:00
Rossen Stoyanchev d2eff4ead6 Improve GenericMessage.toString()
Restore pringing the payload first and headers second as it has been in
SI but also handle specifically the case where the body is a byte array
to minimize unnecessary "noise" that causes otherwise for STOMP msgs.
2013-10-18 15:28:59 -04:00
Rossen Stoyanchev 61d13547e1 Remove @UnsubscribeEvent
The STOMP UNSUBSCRIBE message does not have a destination header so
there is no obvious simple way to do a mapping and the need for it
is not clear yet.
2013-10-18 15:15:24 -04:00
Rossen Stoyanchev 715a11ce8c Polish AnnotationMethodMessageHandler and annotations 2013-10-18 15:10:34 -04:00
Brian Clozel fb586da673 Support @PathVariable in annotated message handling methods
Prior to this commit, @SubscribeEvent @UnsubscribeEvent and
@MessageMapping annotated message handling methods
could only match a strict message destination.

This commit adds a @PathVariable annotation and
updates the message matching/handling process, since
message handling methods can now match PathMatcher-like
destinations and get path variables injected in parameters.

Issue: SPR-10949
2013-10-18 15:10:34 -04:00
Brian Clozel efa86e80d8 Upgrade json-path to 0.9.0 version
This version fixed bugs and improved performance.
New features: "select multiple attributes" and
"Array operations and slicing improved" (a new example
has been added in tests to reflect that).

See https://github.com/jayway/JsonPath/blob/master/README

Issue: SPR-10990
2013-10-18 15:10:15 -04:00
Phillip Webb 79048e18be Allow TypeDescriptor create with null generics
Restore the ability to create a TypeDescriptor for a collection or
map where the generics may be null.

Issue: SPR-11006
2013-10-18 10:58:05 -07:00
Rossen Stoyanchev cfb66252eb Merge pull request #380 from bclozel/SPR-10222 2013-10-18 12:26:34 -04:00
Rossen Stoyanchev 4f28c77db7 Polish ControllerAdvice selectors
Issue: SPR-10222
2013-10-18 12:24:55 -04:00
Brian Clozel c4a8bf9c4d Add new features on @ControllerAdvice
Prior to this commit, @ControllerAdvice annotated beans would
assist all known Controllers, by applying @ExceptionHandler,
@InitBinder, and @ModelAttribute.

This commit updates the @ControllerAdvice annotation,
which accepts now base package names, assignableTypes,
annotations and basePackageClasses.

If attributes are set, only Controllers that match those
selectors will be assisted by the annotated class.
This commit does not change the default behavior when
no value is set, i.e. @ControllerAdvice().

Issue: SPR-10222
2013-10-18 11:35:06 -04:00
Rossen Stoyanchev be4e5d2841 Add SimpleMessageConverter 2013-10-18 11:33:59 -04:00
Rossen Stoyanchev a53233b351 Fix issue in AbstractMessagingTemplate 2013-10-17 22:23:03 -04:00
Rossen Stoyanchev 29934d7c02 Add TCP abstractions to spring-messaging
This change adds abstractions for opening and managing TCP connections
primarily for use with the STOMP broker support. As one immediate
benefit the change makes the  StompBrokerRelayMessageHandler more
easy to test.
2013-10-17 22:16:15 -04:00
Rossen Stoyanchev a172b32d4c Refactor STOMP relay session
This change consolidates TCP-related logic in the StompRelaySession. As
a result the sub-class SystemStompRelaySession now contains only logic
intrinsic to the shared system session.
2013-10-17 22:16:14 -04:00
Rossen Stoyanchev 17aea892f0 Fix issue with forwarding messaging to STOMP broker 2013-10-17 22:16:14 -04:00
Rossen Stoyanchev 4e3390ae04 Upgrade to reactor 1.0 RC1 and remove MessageChannel
This change upgrades reactor to 1.0 RC1 and also removes the
reactor-based message channel in favor of the one available from
org.projectreactor:reactor-spring.
2013-10-17 22:15:59 -04:00
Phillip Webb 57a36f3f56 Support for MultiValueMap in MapToMapConverter
Refactor TypeDescriptor to use ResolvableType in order to retain full
generic type information, in the process fixing MultiValueMap support
in MapToMapConverter.

Issue: SPR-9499
2013-10-17 13:48:02 -07:00
Phillip Webb f29092db23 Polish ResolvableType & SerializableTypeWrapper
Fix 'missing serialVersionUID' warnings, support for void.class types
and refine resolve() algorithm to support narrowed types.

Issue: SPR-10973
2013-10-17 13:48:02 -07:00
Phillip Webb f4a66a4326 Polish GroovyBeanDefinitionReader formatting
Consistent use of tabs and remove trailing whitespace.

Issue: SPR-7123
2013-10-17 13:46:32 -07:00
Juergen Hoeller bb2802208b Upgraded to JCache 0.11 for Spring Framework 4.0 RC1
Unfortunately, the JCache API changed quite a bit since 0.6. We're building against a snapshot of JCache 0.11 now, tracking its way to final after the Public Review Ballot.
2013-10-17 19:35:21 +02:00
Juergen Hoeller 8d6406bbae Groovy-based bean definitions
Formerly known as the Grails BeanBuilder, now in Spring proper. Based on https://github.com/spring-projects/spring-framework/pull/355 but heavily refactored and restructured.

Issue: SPR-7123
2013-10-17 19:24:08 +02:00
Juergen Hoeller bb8cf277fb Polishing 2013-10-17 19:23:51 +02:00
Phillip Webb 3337fd32cb Refine ResolvableType class
- Support for serialization
- Allow programmatic creation of an array from a given component type
- Allow programmatic creation with given generics
- Extract generics from Class types using Class.getTypeParameters()
- Move TypeVariableResolver to an inner class (and make method private)
- Refine 'resolve()' algorithm

Issue: SPR-10973
2013-10-16 23:45:51 -07:00
Sam Brannen 7ffd05a8e3 Document 'annotated classes' in Testing chapter
In order to help developers avoid surprises from unintended use of
"@Bean Lite Mode" when referencing classes via @ContextConfiguration in
the TestContext framework, this commit duplicates the previous
discussion of "annotated classes" from the Javadoc for
@ContextConfiguration as a tip in the "Context configuration with
annotated classes" section of the Testing chapter in the reference
manual.

Issue: SPR-10971
2013-10-16 18:10:47 +02:00
Juergen Hoeller d87838fc6d Polishing 2013-10-16 01:51:49 +02:00
Juergen Hoeller 187b681b9e Consistency between InvocableHandlerMethod in web and messaging modules 2013-10-16 01:51:48 +02:00
Juergen Hoeller c38bde259a Polishing
Issue: SPR-10185
2013-10-16 01:51:48 +02:00
Juergen Hoeller 9bfbe36b1c Restored registration of nested component classes (even without factory methods)
Issue: SPR-10865
Issue: SPR-10970
2013-10-16 01:51:47 +02:00
Rossen Stoyanchev 190bf247a3 Add helper method to ResourceHandlerRegistry 2013-10-15 09:49:54 -04:00
Sam Brannen 079bebcfb5 Delete unused import in StdReflParamNameDscoverer 2013-10-15 15:24:25 +02:00
Sam Brannen 8fdc7d4e8f Polish type prediction for generic factory methods
- Now avoiding NullPointerExceptions in GenericTypeResolver's
   resolveReturnTypeForGenericMethod() in case the supplied ClassLoader
   is null.
 - AutowireUtils.resolveReturnTypeForFactoryMethod() now properly
   asserts that the supplied ClassLoader is not null.
 - Fixed copy-n-paste errors in Javadoc for
   AutowireUtils.resolveReturnTypeForFactoryMethod().

Issue: SPR-10411
2013-10-15 15:21:47 +02:00
Sam Brannen e86e182d5d Reinstate deleted @author tag
SPR-10411
2013-10-15 15:09:05 +02:00
Rossen Stoyanchev bcfbd862c7 Add value() attribute to @Payload 2013-10-14 22:16:13 -04:00
Rossen Stoyanchev 70dfec269b Use alternative UUID strategy in MessageHeaders
This change adds an alternative UUID generation strategy to use by
default in MessageHeaders. Instead of using SecureRandom for each
new UUID, SecureRandom is used only for the initial seed to be
provided java.util.Random. Thereafter the same Random instance is
used instead. This provides improved performance while id's are
still random but less securely so.
2013-10-14 21:55:13 -04:00
Rossen Stoyanchev 57d127b55a Validate if STOMP frame is allowed to have a body
Issue: SPR-10890
2013-10-14 21:37:44 -04:00
Rossen Stoyanchev 7c3749769a Add STOMP broker relay to configure "host" header
Issue: SPR-10955
2013-10-14 21:06:53 -04:00
Rossen Stoyanchev cf7889e226 Fix issue with DeferredResult on @RestController
Before this change, async result handling on controller methods failed
to observe type-level annotations annotations. The issue was never
noticed until we started supporting type-level @ResponseBody and the
@RestController meta annotation.

Issue: SPR-10905
2013-10-14 21:06:53 -04:00
Juergen Hoeller 3bd6dfe047 Autowiring of generic types
Includes revisions of MethodParameter and DependencyDescriptor (in particular towards a reference to the containing class). Also refines several ResolvableType method signatures.

Issue: SPR-9965
2013-10-15 00:11:23 +02:00
Juergen Hoeller 74794190a5 Implement java.io.Flushable wherever applicable 2013-10-14 23:52:31 +02:00
Juergen Hoeller 8b1927f3ec Fixed type prediction for generic factory methods
We're consistently resolving class names now, and the entire algorithm moved from GenericTypeResolver to the internal AutowireUtils helper in the bean factory package.

Issue: SPR-10411
2013-10-14 23:50:04 +02:00
Juergen Hoeller 41f041e6ae Reduced "getParameterType call not supported" log message to single line
Issue: SPR-10185
2013-10-14 23:31:53 +02:00
Juergen Hoeller 7a9d58375f Changed JSR-330 detection logging from info to debug
Issue: SPR-10974
2013-10-14 23:24:25 +02:00
Sam Brannen 977c8c7137 Polish Javadoc for ResolvableType 2013-10-14 17:57:16 +02:00
Brian Clozel 5de5198005 Allow greater flexibility for template method createDataBinderFactory
Prior to this commit, the template method createDataBinderFactory
would only allow ServletRequestDataBinderFactory as a return type.

This commit updates the method signature and allows
InitBinderDataBinderFactory, a superclass of the previous one.
Then other implementations can override this method and return
other InitBinderDataBinderFactory types.

Issue: SPR-10920
2013-10-14 10:21:09 +02:00
Rossen Stoyanchev 8ae88c20d1 Add support for resolving message headers
This change adds support for @Header and @Headers annotated method
arguments to spring-messaging. Also supported are arguments of type
MessageHeaders, and MessageHeaderAccessor (including sub-types of
MessageHeaderAccessort as long as they provide a wrap(Message<?>)
static factory method).

This change also renames @MessageBody to @Payload.

Issue: SPR-10985
2013-10-13 11:13:16 -04:00
Phillip Webb ca9df4d2ef Return rather than throw converted http exception
Fix HttpInvokerClientInterceptor.convertHttpInvokerAccessException to
return the translated exception rather than throwing it. This brings
the method implementation in line with the Java Doc and the obvious
original intent.

Issue: SPR-10965
2013-10-11 14:47:58 -07:00
Phillip Webb 2c6282055c Merge pull request #315 from garyrussell/SPR-10501
* SPR-10501:
  Add Reference to Spring AMQP Remoting in docs
2013-10-11 09:34:59 -07:00
Gary Russell 0e7769b5bb Add Reference to Spring AMQP Remoting in docs
Beginning with 1.2.0, Spring AMQP now supports remoting over AMQP with
a proxy factory bean an invoker service exporter.

Add documentation to the Spring Framework remoting section with a link
to the Spring AMQP documentation.

Issue: SPR-10501
2013-10-11 09:33:09 -07:00
Phillip Webb 823dbdf232 Merge pull request #379 from Xaerxess/fix-doc-cache
* fix-doc-cache:
  Fix Cache documentation
2013-10-11 09:29:59 -07:00
Grzegorz Rożniecki 03daf593b2 Fix Cache documentation
Fixed malformed code snippets, formatted whitespace and changed invalid
external link.
2013-10-11 09:27:49 -07:00
Rossen Stoyanchev 7d3b6497b5 Add support for MIME-based message conversion
The MessageConverter interface in spring-messaging is now explicitly
designed to support conversion of the payload of a Message<?> to and
from serialized form based on MIME type message header.
By default, the MessageHeaders.CONTENT_HEADER header is used but a
custom ContentTypeResolver can be configured to customize that.

Currently available are Jackson 2, String, and byte array converters.
A CompositeMessageConverter can be used to configure several
message converters in various places such as a messaging template.
2013-10-10 17:25:18 -04:00
Phillip Webb ee8f1aa61a Clarify ResolvableType.resolve() Java Doc
Issue: SPR-10973
2013-10-10 11:58:21 -07:00
Phillip Webb 5358cc0f5f Fix ResolvableType isAssignableFrom for <?>
Fix ResolvableType.isAssignableFrom to correctly deal with <?> style
generics.

Issue: SPR-10973
2013-10-10 09:22:22 -07:00
Phillip Webb 501a1cbb5d Refactor from deprecated GenericTypeResolver calls
Refactor AbstractMessageConverterMethodArgumentResolver and
BridgeMethodResolver to use ResolvableType in preference to deprecated
GenericTypeResolver calls.

Issue: SPR-10980
2013-10-10 00:19:51 -07:00
Phillip Webb fdf0ef40c0 Use ResolvableType in GenericCollectnTypeResolver
Refactor GenericCollectionTypeResolver to make use of ResolvableType
for generic resolution.

Issue: SPR-10977
2013-10-10 00:19:51 -07:00
Phillip Webb 595efe9aab Use ResolvableType in GenericTypeResolver
Refactor GenericTypeResolver to make use of ResolvableType
for generic resolution.

Issue: SPR-10978
2013-10-10 00:19:51 -07:00
Phillip Webb 6a18b0048d Introduce ResolvableType Class
Add a new ResolvableType Class which encapsulates java.lang.reflect.Type,
providing access to supertypes, interfaces and generic parameters along
with the ability to ultimately resolve to a java.lang.Class.

ResolvableTypes may be obtained from fields, method parameters, method
returns, classes or directly from a java.lang.reflect.Type. Most methods
will themselves return ResolvableTypes, allowing easy navigation.

For example:

	private HashMap<Integer, List<String>> myMap;

	public void example() {
 		ResolvableType t = ResolvableType.forField(
 					getClass().getDeclaredField("myMap"));
 		t.getSuperType(); // AbstractMap<Integer, List<String>>;
 		t.asMap(); // Map<Integer, List<String>>
 		t.getGeneric(0).resolve(); // Integer
 		t.getGeneric(1).resolve(); // List
 		t.getGeneric(1); // List<String>
 		t.resolveGeneric(1, 0); // String
 	}

Issue: SPR-10973
2013-10-10 00:19:50 -07:00
Rossen Stoyanchev 449d91a06c Merge pull request #379 from bclozel/SPR-10789 2013-10-08 15:59:22 -04:00
Rossen Stoyanchev c9bb0594f3 Polish
Issue: SPR-10789
2013-10-08 15:57:59 -04:00
Brian Clozel e04a756968 Support AntPathMatch URLs in URL ResultMatchers
Prior to this commit, one could only match exact URLs in redirectedUrl
and forwardedUrl ResultMatchers. When creating a resource with
a REST service, URLs often contain the id the new resource,
like "/resource/12".

This commit updates those ResultMatchers to support both
exact matches and AntPath matches, using new methods.
The former URL then can be tested against "/resource/*" in MVC tests.

Issue: SPR-10789
2013-10-08 10:54:15 +02:00
Rossen Stoyanchev 4ca7d89a92 Revert resource handling changes
This change reverts recent commits made to expand the resource handling
mechanism in Spring MVC. The changes will move into a separate branch
and likely into a separate project allowing it to mature and evolve
without being tied to the main framework release schedule.

Issue: SPR-10933, SPR-10310
2013-10-07 21:29:48 -04:00
Rossen Stoyanchev 6a323292d8 Revert "Add initial cut of expanded resource handling"
This reverts commit d4a0e628d5, reversing
changes made to 8abe949734.
2013-10-07 21:18:41 -04:00
Rossen Stoyanchev 80e5513918 Revert "Remove unintended changes from last commit"
This reverts commit 1ba806b185.
2013-10-07 21:14:07 -04:00
Rossen Stoyanchev 2670d94c6a Revert "Update Spring MVC Java config for ResourceResolvers"
This reverts commit f8e1f06d08.
2013-10-07 21:13:22 -04:00
Rossen Stoyanchev 5c62c86fc9 Revert "Fix failing test"
This reverts commit c01f45fa59.
2013-10-07 21:10:05 -04:00
Brian Clozel 4bf5a0234c Add doesNotExist match to HeaderResultMatchers
Prior to this commit, one could not test for the absence of
a specific HTTP header in a response.
Using header("X-Custom-Header", Matchers.nullValue()) would not
work because it tests for an empty value of an existing header.

This commit adds a doesNotExist method on the
HeaderResultMatcher.

Issue: SPR-10771
2013-10-07 14:50:17 -04:00
Brian Clozel e4479c8669 Fix MockHttpServletResponse HTTP status update
Prior to this commit, one could call the setStatus method on
this Mock object and update the response's status,
even though the sendError method had already been called.

According to the HttpServletResponse Javadoc, sendError() methods
commit the response; so the response can't be written after that.

This commit fixes MockHttpServletResponse's behavior; setStatus
methods do not update the status once the response has been
committed.

Issue: SPR-10414
2013-10-07 14:43:06 -04:00
Rossen Stoyanchev 824cb9f8cd Polish MessageBuilder 2013-10-07 09:27:04 -04:00
Juergen Hoeller 4574528a27 Comprehensive update to the framework's TimeZone handling, including a new TimeZoneAwareLocaleContext and a LocaleContextResolver for Spring MVC
A few noteworthy minor changes: LocaleContext.getLocale() may return null in special cases (not by default), which our own accessing classes are able to handle now. If there is a non-null TimeZone user setting, we're exposing it to all collaborating libraries, in particular to JSTL, Velocity and JasperReports. Our JSR-310 and Joda-Time support falls back to checking the general LocaleContext TimeZone now, adapting it to their time zone types, if no more specific setting has been provided. Our DefaultConversionService has TimeZone<->ZoneId converters registered. And finally, we're using a custom parseTimeZoneString method now that doesn't accept the TimeZone.getTimeZone(String) GMT fallback for an invalid time zone id anymore.

Issue: SPR-1528
2013-10-04 23:14:08 +02:00
Juergen Hoeller 52cca48f40 Polishing 2013-10-04 22:53:49 +02:00
Juergen Hoeller 8b3afda6f4 Marked Jackson 1.x support classes as deprecated 2013-10-04 22:52:47 +02:00
Juergen Hoeller bd4c64af04 Turned ByteBufferConverter's visibility to package level 2013-10-04 22:52:14 +02:00
Juergen Hoeller 3fad0fa432 Introduced TomcatLoadTimeWeaver for Tomcat's new InstrumentableClassLoader interface
At the same time, dropped GlassFish 1/2 support from GlassFishLoadTimeWeaver and redesigned it to be as analogous to TomcatLoadTimeWeaver as possible.

Issue: SPR-10788
2013-10-03 14:51:27 +02:00
Juergen Hoeller 888e3c7e53 Polishing 2013-10-03 14:51:26 +02:00
Rossen Stoyanchev 52d663e596 Make method in RequestMappingHandlerMapping protected
Issue: SPR-10950
2013-10-02 17:47:31 -04:00
Brian Clozel a5e3916724 Add Jackson's Modules registration in Jackson2OMFactoryBean
Prior to this commit, one couldn't configure Jackson's ObjectMapper
with (De)SerializerModifiers or advanced configuration features
using XML configuration.

This commit updates the FactoryBean and adds a setModule method
that will register Modules with the ObjectMapper.

Note that this commit is only about XML configuration, since
this feature was already available with JavaConfig.

Issue: SPR-10429
2013-10-02 17:23:55 -04:00
Brian Clozel e91ce23cd0 Add javax.servlet.http.Part support for data binding
Prior to this commit, Multipart databinding would only support
MultiPartFile databinding using commons-multipart.

Now the WebRequestDataBinder supports Part and List<Part>
databinding for Servlet 3.0 compliant containers.

Issue: SPR-10591
2013-10-02 17:19:44 -04:00
Andy Wilkinson 41e411a8a5 Introduce new HEARTBEAT message type
Previously, there was no generic concept of a message that represents
a heartbeat and the STOMP-specific code used a null STOMP command to
represent a heartbeat.

This commit introduces HEARTBEAT as a new SimpMessageType. The STOMP
support has been updated to create HEARTBEAT messages to represent
heartbeats, and to use the new message type as the mechanism by which
heartbeats are identified.
2013-10-02 16:30:53 -04:00
Andy Wilkinson a7f735b50a Make the broker relay heartbeat intervals configurable
Prior to this commit, the intervals at which the broker relay's system
session would send heartbeats to the STOMP broker and expect to
receive heartbeats from the STOMP broker were hard-coded at 10
seconds.

This commit makes the intervals configurable, with 10 seconds being
the default value.
2013-10-02 16:29:43 -04:00
Andy Wilkinson ba11af7f11 Improve broker relay's shutdown and availability events
Previously, when the broker relay was shut down, the TCP client was
closed and the relay sessions were left to find out about the
shutdown as a result of their TCP connections being closed. This led
to problems where an attempt could be made to use a session that was,
in fact, in the process of being shut down.

This commit updates the broker relay to explicitly close each of its
relay sessions as part of its stop processing.
As part of the broker relay being shut down explicitly close each of
its relay sessions. It does so before closing the TCP client so that
the relay sessions know that they are  disconnected before their TCP
connections are closed.

The broker relay's publishing of availability events has also been
improved. Prior to this commit, availability events were published
based on the availability of any relay session. For example, this
meant that a successfully established client relay session would
result in an event being published indicating that the broker's
available even if the system relay session was yet to be established.
This commit updates the relay so that broker availability events are
only published by the system relay session. This allows application
code the use these events as an accurate indication of the
availability of the broker. Clients that are interested in the
broker's availability can find out through the use of heart beats or
through the receipt of an ERROR frame in response to an attempt to
communnicate with the broker.
2013-10-01 21:04:26 -04:00
Rossen Stoyanchev c01f45fa59 Fix failing test 2013-10-01 14:56:21 -04:00
Rossen Stoyanchev f8e1f06d08 Update Spring MVC Java config for ResourceResolvers 2013-10-01 14:43:38 -04:00
Rossen Stoyanchev 02cb86659d Prevent cache of sockjs known prefixes from growing
Issue: SPR-10893
2013-09-30 21:46:19 -04:00
Rossen Stoyanchev e60e8dc582 Fix issue with getting SockJS path
Issue: SPR-10923
2013-09-30 21:19:29 -04:00
Rossen Stoyanchev 6ddacdc01d Fix issue in simple broker with peer-to-peer messages
Issue: SPR-10930
2013-09-30 21:02:51 -04:00
Rossen Stoyanchev 48caeef4de Polish and fix issues in STOMP broker relay
Fix error in te code that handles the result of sending a heartbeat

Fix error in processing DISCONNECTED frames that closed the TCP
connection before the message was sent.
2013-09-30 16:37:18 -04:00
Andy Wilkinson 34dd844716 Polishing
- Polish javadoc for CONNECTED_USER_HEADER
 - Improve method ordering
2013-09-30 14:24:57 -04:00
Andy Wilkinson 5025c304b8 Introduce CONNECT_ACK message type
Previously, handling of a STOMP CONNECT message and sending of a
CONNECTED response was performed by StompProtocolHandler if it was
backed by SimpleBrokerMessageHandler, or left up to the real message
broker if it was backed by StompBrokerRelayMessageHandler. This
wasn't ideal as it should be StompProtocolHandler's job to simply map
messages to and from the STOMP protocol, not to do part of the
broker's job and respond directly to CONNECT.

This commit introduces a new message type, CONNECT_ACK. When it
receives a CONNECT message, SimpleBrokerMessageHandler will now
respond with a CONNECT_ACK message that StompProtocolHandler can map
into a STOMP CONNECTED message. The CONNECT_ACK message contains the
CONNECT message as a header so that StompProtocolHandler has access to
its accept-version header.

StompProtocolHandler has been simplified so that a CONNECT message
is always passed to the output channel, irrespective of whether it's
backed by a simple broker or a real broker. The handleConnect flag,
and the code that would set it correctly depending on the app's
configuration, has been removed.
2013-09-30 14:24:57 -04:00
Andy Wilkinson b2f31a3c74 Improve handling of send failures
Prior to this commit, a failure to send a heartbeat was ignored and a
failure to forward a message to the broker would result in an error
frame being sent but nothing more.

Following this commit, a failure to send a heartbeat to the broker
is treated as a TCP client failure. Furthermore, if the system relay
session fails to forward a message to the broker an exception is
thrown. Typically, the system relay session will be forwarding
messages on behalf of local application code, rather than a remote
WebSocket client. Throwing an exception allows the application code
to be notified of the problem directly, rather than via a broker
availability event.
2013-09-30 14:21:42 -04:00
Rossen Stoyanchev 9b2c041085 Fix issue in htmlfile sockjs transport
Issue: SPR-10854
2013-09-29 21:09:39 -04:00
Rossen Stoyanchev 1ba806b185 Remove unintended changes from last commit 2013-09-27 21:17:02 -04:00
Rossen Stoyanchev d4a0e628d5 Add initial cut of expanded resource handling
Issue: SPR-10933, SPR-10310
2013-09-27 21:09:53 -04:00
Rossen Stoyanchev 5a2e30c18b Refactor Resource URL generation and Servlet Filter
Renamed ResourceUrlMapper to ResourceUrlGenerator and refactored it
to be configured with Resource-serving HandlerMappings as opposed to
having them detected in the ApplicationContext through the
BeanPostProcessor contact.

Renamed and polished ResourceUrlEncodingFilter to ResourceUrlFilter
and added tests.
2013-09-27 21:07:31 -04:00
Rossen Stoyanchev 3c48b42106 Refactor ResourceResolverChain + resolver class names
This change splits out resource transformation out from the
ResourceResolverChain so that chain is focused entirely on resource
resolution (as its name suggests). The invocation of transformers
is left as a separate step, it uses a different (recursive)
algorithm in any case and iterates over a different set of objects.

Also ResourceResolverChain is now limited strictly to methods that
a ResourceResolver should be able to use to delegate to remaining
resolvers.

Furthermore, ResourceResolverChain now maintains an internal index
of the "current" resolver so that resolvers don't have to pass the
chain when invoking it much like a (Servlet API) FilterChain works.
If the last resolver calls the chain again, a null value is returned.
2013-09-27 21:07:31 -04:00
Rossen Stoyanchev 0e58125b15 Polish 2013-09-27 21:07:31 -04:00
Jeremy Grelle 61e61bd5fd Asset pipeline proposal. 2013-09-27 21:07:31 -04:00
Phillip Webb 8abe949734 Fix ArrayStoreException reading subclassed enums
Fix ASM AnnotationAttributesReadingVisitor to correctly deal with
subclasses enums.

Issue: SPR-10914
2013-09-27 11:25:57 -07:00
Rossen Stoyanchev f3611e767e Merge pull request #364 from mikesir87/ws-glassfish4-support
* mikesir87-ws-glassfish4-support:
  Added websocket upgrade support for GlassFish 4.0
2013-09-27 08:57:38 -04:00
Michael Irwin f1e929f38d Added websocket upgrade support for GlassFish 4.0
Commit 2397b21096 changed websocket
support to use GlassFish 4.0.1 nightlies, but broke support for 4.0. In
GlassFish 4.0.1, the package that TyrusEndpoint is located in changed.
This commit provides an abstract handler that does all required
GlassFish setup, but delegates to version specific upgrade handlers to
create the final TyrusEndpoint.

GlassFish 4.0 handler uses reflection to create its endpoint to prevent
dependency issues of depending on different versions of
tyrus-websocket-core and tyrus-container-servlet
2013-09-27 08:54:43 -04:00
Rossen Stoyanchev c06ea3b437 Polish logging 2013-09-26 21:27:11 -04:00
Phillip Webb 6ca8346ebd Remove unused snapshot repository definition 2013-09-26 15:44:30 -07:00
Rossen Stoyanchev d5dfd1b4ad Merge multiple pull requests from wilkinsona
* broker-relay:
  Polish
  Improve handling of missed heartbeats
  Upgrade to Reactor 1.0.0.M3
  Add heart-beat support to STOMP broker relay
  Remove CONNECT-related message buffer from STOMP relay
  Add StompCodec
2013-09-26 16:09:01 -04:00
Rossen Stoyanchev 469aaa8754 Polish 2013-09-26 16:06:35 -04:00
Andy Wilkinson 6679feb77b Improve handling of missed heartbeats
Previously, when a broker heartbeat was mnissed, the STOMP connection
would be left in a semi-disconnected state such that, for example, the
read and write idle callbacks would still be active, even though
the underlying TCP connection had been nulled out.

As part of disconnecting the STOMP connection, this commit closes the
underlying TCP connection when a heartbeat's missed which cancels the
read and write idle callbacks. It also now copes with the underlying
TCP connection being null when sending a heartbeat to the broker. This
protects again a race condition between the write idle callback being
fired, such that a heartbeat needs to be sent, and the connection
being nulled out due to it being closed.
2013-09-26 16:06:35 -04:00
Andy Wilkinson bae9134a6e Upgrade to Reactor 1.0.0.M3 2013-09-26 16:06:35 -04:00
Andy Wilkinson 496d8321c3 Add heart-beat support to STOMP broker relay
Previously, the STOMP broker relay did not support heart-beats. It sent
0,0 in the heart-beats header for its own CONNECTED message, and set the
heart-beats header to 0,0 when it was forwarding a CONNECTED from from a
client to the broker.

The broker relay now supports heart-beats for the system relay session.
It will send heart-beats at the send interval that's been negotiated
with the broker and will also expect to receive heart-beats at the
receive interval that's been negotiated with the broker. The receive
interval is multiplied by a factor of three to satisfy the STOMP spec's
suggestion of lenience and ActiveMQ 5.8.0's heart-beat behaviour (see
AMQ-4710).

The broker relay also supports heart-beats between clients and the
broker. For any given client's relay session, any heart-beats received
from the client are forwarded on to the broker and any heart-beats
received from the broker are sent back to the client.

Internally, a heart-beat is represented as a Message with a byte array
payload containing the single byte of new line ('\n') character and
'empty' headers. SubscriptionMethodReturnValueHandler has been updated
to default the message type to SimpMessageType.MESSAGE. This eases
the distinction between a heartbeat and a message that's been created
from a return value from application code.
2013-09-26 16:06:35 -04:00
Andy Wilkinson 8d2a376b0f Remove CONNECT-related message buffer from STOMP relay
Before this change, the StompProtocolHandler always responded to
clients with a CONNECTED frame, while the STOMP broker relay
independantly forwarded the client CONNECT to the broker and waited
for the CONNECTED frame back. That meant the relay had to buffer
client messages until it received the CONNECTED response from
the message broker.

This change ensures that clients wait for a CONNECTED frame from
the message broker. The broker relay forwards the CONNECT frame to
the broker. The broker responds with a CONNECTED frame, which the
relay then forwards to the client. As a result, a (well-written)
client will not send any messages to the relay until the connection
to the broker is fully established.

The StompProtcolHandler can now be configured whether to send CONNECTED
frame back. By default that is off. So when using the simple broker,
the StompProtocolHandler can still respond with CONNECTED frames.

The relay's handling of a connection being dropped has also been
improved. When a connection for a client relay session is dropped
an ERROR frame will be sent back to the client. If a connection is
closed as part of a DISCONNECT frame being sent, no ERROR frame
is sent back to the client. When the connection for the system relay
session is dropped, an event is published indicating that the broker
is unavailable. Reactor's TcpClient will then attempt to re-restablish
the connection.
2013-09-26 16:06:35 -04:00
Andy Wilkinson a489c2cf38 Add StompCodec
Previously, the broker relay's TCP client used Reactor's built in
delimited codec as part of its parsing of STOMP frames. \0 was used as
the delimiter. This worked for most STOMP frames but, crucially,
not for frames with a body that contained \0: when such a frame was
received it would be truncated.

This commit adds a custom codec that parses STOMP frames more
intelligently. It honours the content-length header allowing it to
correctly parse frames with a body that contains \0. The codec largely
delegates to two new classes: StompEncoder and StompDecoder. For
consistency, code that previously used StompMessageConverter has been
reworked to use these new encoder and decoder classes.

Issue: SPR-10818
2013-09-26 16:06:34 -04:00
Juergen Hoeller f705ec1a46 Added ASPECTJ and REGEX constants to FilterType, along with a corresponding 'pattern' attribute on ComponentScan.Filter
Issue: SPR-10593
2013-09-26 21:16:46 +02:00
Juergen Hoeller 11d20e337d Silently swallow IllegalStateException on commit if the JMS transaction is based on a JDBC transaction
This fine-tuned change restores the original Spring 3.0 behavior for Oracle AQ, and also allows for other ConnectionFactory types to comply with the "getDataSource()" pattern.

Issue: SPR-10829
2013-09-26 20:27:46 +02:00
Juergen Hoeller d3f063d0f9 After-returning advice strictly follows AspectJ's rules for return value matching
Issue: SPR-10834
2013-09-26 20:27:45 +02:00
Rossen Stoyanchev 77fa8698b3 Enable cookie_needed by default in SockJS service
Issue: SPR-10939
2013-09-26 12:52:59 -04:00
Sam Brannen e756ef5923 Merge pull request #363 from mikesir87/STS-url-fix
Fixed URLs in import-into-eclipse scripts
2013-09-26 03:48:41 -07:00
Michael Irwin 27820bfc8a Fixed URLs in import-into-eclipse scripts 2013-09-25 16:56:10 -04:00
Rossen Stoyanchev a64441e129 Merge pull request #359 from bclozel/SPR-10481
* bclozel-SPR-10481:
  Add NoHandlerFoundException to DispatcherServlet
2013-09-25 14:12:48 -04:00
Brian Clozel 62d6a43c61 Add NoHandlerFoundException to DispatcherServlet
Prior to this commit, the DispatcherServlet would send an error
response using the HttpServlet API when no Handler was found to
handle this request.

Now the DispatcherServlet can be configured to throw a
NoHandlerFoundException, when the throwExceptionIfNoHandlerFound
property is set to "true".
Those exceptions can be later on caught by default or custom
HandlerExceptionResolvers/ExceptionHandlers.

Issue: SPR-10481
2013-09-25 14:11:01 -04:00
Rossen Stoyanchev 4ef490621f Merge pull request #358 from bclozel/SPR-10539
* bclozel-SPR-10539:
  Polish
  Add IPv6 support in RestTemplate
2013-09-25 13:58:53 -04:00
Phillip Webb b409ba0076 Remove accidentally committed test case 2013-09-25 10:43:23 -07:00
Rossen Stoyanchev 92795f463a Polish
Issue: SPR-10539
2013-09-25 12:47:50 -04:00
Brian Clozel 2dd4480103 Add IPv6 support in RestTemplate
Prior to this commit, RestTemplate would not would
not accept IPv6 raw addresses in URLs because UriComponentsBuilder
would not parse/encode the Host part correctly.

The UriComponentsBuilder now parses and encode raw IPv6 addresses
in the "[1abc:2abc:3abc::5ABC:6abc]" format and also supports the
use of IPv6 scope_ids (see JDK8 java.net.Inet6Address),
like "[1abc:2abc:3abc::5ABC:6abc%eth0]".

Issue: SPR-10539
2013-09-25 16:28:12 +02:00
Juergen Hoeller beaf6992b2 Fixed BadSqlGrammarException usage in transaction test suite
Issue: SPR-10902
(cherry picked from commit ef66708)
2013-09-25 14:11:10 +02:00
Juergen Hoeller 5e88fe5842 Clarified Spring 4.0's dependency on JAX-WS 2.1+ / JAXB 2.1+ in javadoc 2013-09-25 12:54:25 +02:00
Juergen Hoeller 7b63745e04 Ignore setAliasesByType tests since they fail on OpenJDK 8 b108
Probably an XStream-internal problem: fails to marshal the flightNumber element.
2013-09-25 12:34:53 +02:00
Juergen Hoeller d9b620381e Removed S0 from BadSqlGrammarException codes
S0 doesn't seem to be universally used for SQL grammar problems: see MS SQL Server's RAISERROR. This was reported years back; not sure why the fix didn't actually appear in the codebase back then.

Issue: SPR-10902
2013-09-25 12:30:01 +02:00
Juergen Hoeller 7bc3e3b3f8 Fixed handling of @Resource's shareable value
Issue: SPR-10931
2013-09-25 12:27:17 +02:00
Phillip Webb 783871a42a Restore 'maven.java.net' repository
Restore 'maven.java.net' repository accidentally removed in commit
2337e763.
2013-09-25 11:21:55 +02:00
Fedor Bobin dac6aaecc8 Allow cursor returns from SQL functions
Update CallMetaDataContext to use the metaDataProvider
createDefaultOutParameter method when creating a SqlOutParameter as
a result of a SQL function call.

This change allows Spring to support Oracle cursor types when returned
from functions.

Issue: SPR-10606
2013-09-24 16:18:09 -07:00
Phillip Webb b1b355289b Restore 'maven.java.net' repository
Restore 'maven.java.net' repository accidentally removed in commit
2337e763.
2013-09-24 16:18:02 -07:00
Phillip Webb 371d255581 Fix typo in MVC reference documentation
Fix ContentNeogitatingViewResolver typo in MVC reference documentation.

Issue: SPR-10927
2013-09-23 16:05:00 -07:00
Phillip Webb 4abe4e9999 Add IssueManagement declaration to POMs
Update POM generation to include an issueManagement section.

Issue: SPR-10929
2013-09-23 15:59:28 -07:00
Phillip Webb 05072e1762 Expand var-args before passing to KeyGenerator
Update `CacheAspectSupport` to expand any var-arg parameters before
calling `KeyGenerator` implementations. Prior to this commit var-args
would be passed to `KeyGenerator` implementations as a nested array,
often causing the same key to be generated regardless of the arguments.

Issue: SPR-10870
2013-09-23 15:14:58 -07:00
Phillip Webb 2337e763d0 Fix tomcat maven repo location and use spring.io
Fix the maven repo used for tomcat 8 release candidates and update
spring repos from springsource.org to spring.io.
2013-09-23 15:10:37 -07:00
Rossen Stoyanchev a5c7018e8d Switch spring-websocket/messaging to Tomcat 8 RC3 2013-09-23 13:14:44 -04:00
Phillip Webb 17d59c5621 Merge pull request #357 from clemp6r/patch-2
# By Clément Plantier
* patch-2:
  Fix "Problem locating method" SpEL error message
2013-09-20 11:39:38 -07:00
Clément Plantier 824ac535d2 Fix "Problem locating method" SpEL error message
Replace "Problem locating method {0} cannot on type {1}" with
"Problem locating method {0} on type {1}".

Issue: SPR-10928
2013-09-20 11:38:51 -07:00
Juergen Hoeller 55f250afbc Fixed javadoc references 2013-09-14 07:33:49 +02:00
Juergen Hoeller a3df311bb5 EhCacheFactoryBean calls addCache after listener registration
Issue: SPR-10904
2013-09-14 07:33:48 +02:00
Juergen Hoeller e213561dac AbstractBeanFactory removes alreadyCreated entry after bean creation failure
Issue: SPR-10896
2013-09-14 07:33:47 +02:00
Rob Winch 0ee910c61a Add test for StandardReflectionParameterNameDiscoverer
Added test to StandardReflectionParameterNameDiscoverer that
demonstrates discovering of parameter names on an interface.

Issue: SPR-9643
2013-09-13 21:23:44 -07:00
Phillip Webb c9ce7aac37 Merge pull request #327 from olivergierke/SPR-10594
# By Oliver Gierke
* SPR-10594:
  Add support for Objenesis proxy creation.
2013-09-12 16:32:34 -07:00
Oliver Gierke 1f9e8f68d4 Add support for Objenesis proxy creation.
Extended DefaultAopProxyFactory to create Objenesis based proxies if the
library is on the classpath. This allows classes without a default
constructor being CGLib proxied. We're now falling back to original CGLib
based behavior in case the proxy creation using Objenesis fails.

Objenesis 2.0 is now inlined into spring-core to avoid interfering with
other Objenesis versions on the classpath.

Issue: SPR-10594
2013-09-12 16:32:27 -07:00
Sam Brannen 41fffdcf7b Polish Javadoc in ResourceUtils 2013-09-12 16:28:14 +02:00
Sam Brannen ee5d6c8f83 Exclude null requestURI in MHSR.getRequestURL()
This commit undoes the changes made in ec5d81e78e and ensures that the
getRequestURL() method in MockHttpServletRequest does not include the
String "null" for a null requestURI by first checking if the requestURI
contains text before including it in the composed URL.

Issue: SPR-10643
2013-09-11 23:08:05 +02:00
Rossen Stoyanchev 45eab23e15 Rename @ReplyTo to @SendTo 2013-09-08 21:22:53 -04:00
Sam Brannen 41fa15a484 Polish Javadoc for messaging annotations 2013-09-07 22:07:09 +02:00
Sam Brannen e1c16f6292 Polish Javadoc for ZoneIdEditor & TimeZoneEditor 2013-09-07 21:14:36 +02:00
Rossen Stoyanchev 62921683fd Introduce ListenableFuture to WebSocketClient
Issue: SPR-10888
2013-09-06 12:28:21 -04:00
Rossen Stoyanchev 71e76196fe Polish StompProtocolHandler 2013-09-05 21:40:15 -04:00
Juergen Hoeller c54b6e9e82 Polished exception message
(cherry picked from commit 6110919)
2013-09-04 22:33:31 +02:00
Juergen Hoeller df18e9173d Revised PersistenceExceptionTranslationInterceptor to lazily retrieve PersistenceExceptionTranslator beans on demand
Issue: SPR-10894
2013-09-04 18:33:25 +02:00
Juergen Hoeller baa698eddf Polishing
Issue: SPR-9495
2013-09-04 16:44:07 +02:00
Juergen Hoeller b7ff26aafb Only cache resolved method when coming from ReflectiveMethodResolver
Issue: SPR-9495
2013-09-04 16:43:51 +02:00
Juergen Hoeller 5e6044c45b Fixed EL resolution against static method with changing target class
Issue: SPR-10452
2013-09-04 15:37:01 +02:00
Arjen Poutsma 476af2e962 Merge pull request #351 from poutsma/listenable_future
* listenable_future:
  Added ListenableFuture interface
2013-09-04 14:39:22 +02:00
Arjen Poutsma d0aa158aef Added ListenableFuture interface
Added extension to Future with capabilities for registering callbacks
when the future is complete.

- Added ListenableFuture, ListenableFutureCallback,
  ListenableFutureCallbackRegistry, and ListenableFutureTask.
- Using ListenableFuture in AsyncRestOperations/AsyncRestTemplate.
- Added AsyncListenableTaskExecutor, implemented in
  SimpleAsyncTaskExecutor.
- Added FutureAdapter and ListenableFutureAdapter.
2013-09-04 14:32:47 +02:00
Rossen Stoyanchev 1c47c8f35c Remove TODOs (replaced with JIRA tickets)
Issue: SPR-10703
2013-09-03 23:29:20 -04:00
Juergen Hoeller 8a4c6eb605 Fixed accidental use of Reactor's Assert util
Issue: SPR-10880
2013-09-03 23:56:43 +02:00
Rossen Stoyanchev 30d2f783a7 Modify return type of subProtocolWebSocketHandler bean
The @Bean method now returns WebSocketHandler allowing it to be
decorated via WebSocketHandlerDecorator.
2013-09-03 15:26:47 -04:00
Juergen Hoeller 542b5b2029 First-class support for MultiTenantConnectionProvider and CurrentTenantIdentifierResolver
Uses Object-typed setter methods to bridge between package location changes in Hibernate 4.2 vs 4.3. As a side bonus, those setters accept Class and class names as well.

Issue: SPR-10823
2013-09-03 18:32:01 +02:00
Juergen Hoeller a9e727cd88 Compatibility with Hibernate 4.3
Due to key SPI interfaces such as ConnectionProvider and JtaPlatform changing their package location in Hibernate 4.3, we have to resort to reflection in a few places. Most importantly, the ConfigurableJtaPlatform used by the setJtaTransactionManager method has now been redesigned as a reflective proxy.

Issue: SPR-10839
2013-09-03 17:58:18 +02:00
Juergen Hoeller 0b37cec287 Consistent support for JTA 1.1 TransactionSynchronizationRegistry
JtaTransactionManager's configuration options for a TransactionSynchronizationRegistry are now in sync with the options for UserTransaction/TransactionManager. Specifically, there are setTransactionSynchronizationRegistry/getTransactionSynchronizationRegistry methods for programmatic configuration now.  Motivated by Spring's adapting to a Hibernate JtaPlatform, specifically the Hibernate 4.3 changes in that area.

Issue: SPR-10839
2013-09-03 17:57:31 +02:00
Rossen Stoyanchev 0ac6998e60 Refine destination semantics for msg-handling methods
After this change, annotated message handling methods configured to use
a destination prefix (e.g. "/app") no longer have to include the prefix
in their mapping. For example if a client sends a message to "/app/foo"
the annotated methods should be mapped with @MessageMapping("/foo").
2013-09-03 11:04:00 -04:00
Rossen Stoyanchev e1a46bb57a Add tests to spring-messaging 2013-09-02 20:36:54 -04:00
Juergen Hoeller d202573e1a Revised spring-oxm for 4.0
Added "target-package" to the jibx-marshaller element. Also fixed "context-path" and "binding-name" to follow Spring's usual attribute naming convention.

Issue: SPR-10882
2013-09-02 22:02:11 +02:00
Juergen Hoeller b25876fd0f Polishing 2013-09-02 22:01:57 +02:00
Juergen Hoeller facf31f01a Javadoc fixes 2013-09-02 21:20:46 +02:00
Juergen Hoeller e8c0ef8305 ThreadPoolTaskScheduler allows for setPoolSize changes at runtime
Also exposing "getPoolSize()" and "getActiveCount()" from ThreadPoolTaskScheduler now, analogous to ThreadPoolTaskExecutor.

Issue: SPR-10883
2013-09-02 21:18:41 +02:00
Juergen Hoeller e523152653 Properly handle getMethodDescriptors() null value on IBM JVM
Also internally renaming SimpleNonIndexedPropertyDescriptor to SimplePropertyDescriptor and preferring direct field access wherever possible.

Issue: SPR-10862
(cherry picked from commit 5639aa7)
2013-09-02 20:26:24 +02:00
Juergen Hoeller 3ca0dcd912 Fixed method count in AbstractMethodMockingControl's IllegalStateException message
Issue: SPR-10885
(cherry picked from commit 5596154)
2013-09-02 20:25:47 +02:00
Arjen Poutsma e33324b700 Changed Future<Void> to Future<?>
Changed return values of Future<Void> to Future<?> in AsyncRestTemplate
and AsyncRestOperations.
2013-09-02 15:33:30 +02:00
Rossen Stoyanchev 79ddba5d01 Polish WebSocket integration tests 2013-09-02 09:11:26 -04:00
Rossen Stoyanchev fee3148b0f Add Tomcat WebSocket integration tests 2013-09-02 09:11:26 -04:00
Rossen Stoyanchev e21bbdd933 Polish WebSocket/STOMP Java config
Ensure configuration provided for WebSocketHandler's (eg interceptors,
or HandshakeHandler) are passed on to the SockJsService if congiured.

Better separate Servlet-specific parts of the configuration to make it
more obvious where non-Servlet alternatives could fit in.

Add more tests.

Improve WebSocket integration tests.
2013-09-02 09:11:26 -04:00
Rossen Stoyanchev 5d69700515 Remove incorrect package import
Issue: SPR-10880
2013-09-02 09:11:26 -04:00
Juergen Hoeller ed7c8b5a53 Fixed getCachedExecutor race condition in MethodReference
Issue: SPR-10884
2013-09-02 14:55:14 +02:00
Spring Buildmaster fcd32bc5f5 Increment version to 4.0.0.BUILD-SNAPSHOT 2013-08-29 16:10:02 -07:00
Spring Buildmaster 8db4089e54 Release version 4.0.0.M3 2013-08-29 15:38:27 -07:00
Rossen Stoyanchev 1f897329f9 Add support for Ping and Pong WebSocket messages
Issue: SPR-10876
2013-08-29 15:11:03 -04:00
Rossen Stoyanchev cbdb99c042 Add basic javadoc to spring-messaging annotations 2013-08-29 14:09:52 -04:00
Rossen Stoyanchev 50178550eb Add option to remove path ext in ServletUriCompBuilder
Issue: SPR-10272
2013-08-29 13:39:26 -04:00
Juergen Hoeller caa1218d36 Polishing 2013-08-29 19:17:59 +02:00
Juergen Hoeller c664010001 Added conversion support for Java 8's ZoneId class and the 'of' method convention
Issue: SPR-1528
2013-08-29 19:15:22 +02:00
Juergen Hoeller 0c00b0d902 Added 'zone' attribute to @Scheduled
Issue: SPR-10456
2013-08-29 18:44:01 +02:00
Rossen Stoyanchev 39ff1e2c53 Add StompProtocolHandler tests 2013-08-29 09:58:41 -04:00
Andy Wilkinson 364bc35709 Use correct header for version in CONNECTED frame
Previously, the negotiated version was included in the CONNECTED frame
using the accept-version header. This is incorrect. The version
header should be used.
2013-08-29 09:58:41 -04:00
Arjen Poutsma 20c4177466 Merge pull request #350 from ok2c/httpclient_4_3
* httpclient_4_3:
  Post SPR-8804 optimizations: better use of HC 4.3 APIs
2013-08-29 15:24:16 +02:00
Oleg Kalnichevski 296e2189a2 Post SPR-8804 optimizations: better use of HC 4.3 APIs 2013-08-29 13:28:00 +02:00
Rossen Stoyanchev 80812d30d4 Protect STOMP passcode from showing up in logs
Issue: SRP-10868
2013-08-28 23:51:08 -04:00
Rossen Stoyanchev 1472e9795f Update SpringConfiguration to support beans by type
Issue: SPR-10605
2013-08-28 22:51:39 -04:00
Rossen Stoyanchev f0dda0e38b Add WebSocket integration tests w/ Java configuration
Issue: SPR-10835
2013-08-28 21:11:05 -04:00
Phillip Webb 744e1ed203 Merge pull request #304 from antonio-marrero/master
# By Antonio Marrero
* pull304:
  Assign lowest priority to `/**` pattern
2013-08-28 17:21:25 -07:00
Antonio Marrero 57f7b14b49 Assign lowest priority to /** pattern
Update AntPathMatcher Comparator to treat `/**` in the same way as
`null` paths.

Prior to this commit the pattern `/**` would be picked in preference
to patterns with 3 or more PathVariable (e.g. `/matches/{matchId}/
periods/{periodId}/teams/{teamId}/results`).

Issue: SPR-10550
2013-08-28 17:14:37 -07:00
Phillip Webb c1dafed886 Refine AntPathMatcher.combine when p1 contains '.'
Refine AntPathMatcher.combine rules to allow direct concatenation of
patterns when pattern1 does not contain '*.'. Prior to this commit
direct concatenation was allowed when pattern1 did not contain '.',
this prevented calls of the form:

	pathMatcher.combine("/1.0", "/foo/test")

from working as expected.

This commit also applies some general cleanup to the `combine` method.

Issue: SPR-10554
2013-08-28 14:30:08 -07:00
Phillip Webb 57dfc13f30 Merge pull request #326 from Xaerxess/SPR-10798
# By Grzegorz Rożniecki
* SPR-10798:
  Fix malformed code in documentation
2013-08-28 14:26:36 -07:00
Grzegorz Rożniecki 00c744ba1a Fix malformed code in documentation
Fixed code snippets in "Handling complex types for stored procedure
calls" paragraph.

Issue: SPR-10798
2013-08-28 14:25:57 -07:00
Phillip Webb c93fbda56d Merge pull request #335 from clemp6r/SPR-10850
# By clemp6r
* SPR-10850:
  Fix elvis operator mistake in reference docs
2013-08-28 14:16:15 -07:00
clemp6r 84242f1aff Fix elvis operator mistake in reference docs
In the given example the expression using the Elvis operator will
return "Nikola Tesla" and not "Mike Tesla".

Issue: SPR-10850
2013-08-28 14:16:01 -07:00
Juergen Hoeller 365ce55a93 Polishing 2013-08-28 22:16:20 +02:00
Juergen Hoeller 465e6292eb Javadoc fixes 2013-08-28 22:16:08 +02:00
Juergen Hoeller fe8dec912d @Bean methods are allowed to override existing bean definitions with a role other than ROLE_APPLICATION now (e.g. framework-generated default beans)
Also, DefaultListableBeanFactory logs a warning when overriding an application definition with a framework-generated definition now, which is expected to be an accident.

Issue: SPR-10607
2013-08-28 22:14:34 +02:00
Rossen Stoyanchev 4b2847d9d1 Add ChannelInterceptor to spring-messaging module
Issue: SPR-10866
2013-08-28 14:41:20 -04:00
Rossen Stoyanchev 467a6b9fa7 Fix failing tests and upgrade websocket to Jetty 9.0.5 2013-08-28 08:43:53 -04:00
Arjen Poutsma 3d645cf808 Added documentation on DecompressingHttpClient
Added documentation on the support for gzip encoding using the
DecompressingHttpClient in Apache HttpComponents.

Issue: SPR-7874
2013-08-28 14:09:07 +02:00
Juergen Hoeller 38c8c6d085 Turned AsyncRequestCallbackAdapter into a private inner class
Issue: SPR-8804
2013-08-28 12:56:18 +02:00
Juergen Hoeller bb971cecf1 A BeanDefinitionRegistryPostProcessor may register other BeanDefinitionRegistryPostProcessors
We're using the same subtle PriorityOrdered/Ordered/non-ordered separation as for regular BeanFactoryPostProcessors and BeanPostProcessors now. Additionally, we're re-detecting BeanDefinitionRegistryPostProcessor bean names after every invocation phase, up until no further ones appear.

Issue: SPR-10630
2013-08-28 12:49:53 +02:00
Juergen Hoeller bb18f81b50 Added "recovery-interval" attribute to <jms:listener-container>
Issue: SPR-10711
2013-08-28 09:36:23 +02:00
Rossen Stoyanchev 4c0da5867a Add Java config support for WebSocket and STOMP
Issue: SPR-10835
2013-08-27 22:20:07 -04:00
Rossen Stoyanchev 4b6a9ac180 Polish WebSocketHttpRequestHandler 2013-08-27 22:20:07 -04:00
Juergen Hoeller 4447248a83 Introduced support for @Lazy on injection points
This turned into a rather huge affair since it led to the introduction of a new AutowireCandidateResolver implementation in the spring-context module. That ACR impl is now being set through AnnotationConfigUtils; GenericApplicationContext and co do not set a default QualifierAnnotationAutowireCandidateResolver anymore (which has always been a smell anyway).  At the same time, dependency ordering has moved from AutowiredAnnotationBeanPostProcessor to DefaultListableBeanFactory itself through a "dependencyComparator" strategy, applying to constructor dependencies and lazy resolution proxies as well.

Issue: SPR-10353
2013-08-28 00:14:39 +02:00
Juergen Hoeller 01b8d9327d AnnotationConfigWebApplicationContext allows for repeated register/scan calls
Restoring consistency with AnnotationConfigApplicationContext.

Issue: SPR-10852
2013-08-28 00:04:53 +02:00
Juergen Hoeller 091712df06 Consistent use of Class<?> 2013-08-28 00:03:58 +02:00
Juergen Hoeller e812b6cea0 Marked @Profile as @Documented 2013-08-28 00:03:40 +02:00
Juergen Hoeller 5efe894ee4 Not exposing ApplicationContext on ConditionContext anymore 2013-08-28 00:00:54 +02:00
Juergen Hoeller 1e64eed6b2 Reintroducing deprecated addConstructorArg variant
Still used by Spring Security 2.0.x's NamespaceHandler etc.
2013-08-27 23:29:41 +02:00
Juergen Hoeller b75fa9d7a7 Upgraded to Reactor 1.0 M2 release 2013-08-27 23:27:35 +02:00
Rob Winch 6969ae94a0 Merge pull request #346 from rwinch/SPR-10860
Restore method signatures on MediaType
2013-08-27 13:00:35 -07:00
Rob Winch 00bc54dcc5 Restore method signatures on MediaType
Previously the method signatures for includes and isCompatibleWith were
incompatible with Spring 3.2.x since the argument was now MimeType.
This caused NoSuchMethodError to be thrown when a class was compiled
against MediaType from Spring 3.2.x and ran against MediaType
from Spring 4.x.

This commit restores the signatures and implements each method by
invoking the super class method.

Issue: SPR-10860
2013-08-27 14:37:56 -05:00
Rossen Stoyanchev 750930fa25 Fix bug with the order of messaging arg resolvers 2013-08-27 15:05:34 -04:00
Arjen Poutsma ebcee26d57 Add AsyncRestTemplate
Added AsyncRestTemplate, the asynchronous counterpart to the
RestTemplate that was introduced in Spring 3. All methods on the
AsyncRestTemplate are similar to those found on the synchronous
RestTemplatem, except that they return Future wrappers instead of
concrete results.

To enable this, this commit introduces the AsyncClientHttpRequest and
AsyncClientHttpRequestFactory, similar to the ClientHttpRequest and
ClientHttpRequestFactory, except that ClientHttpRequest returns a
Future<ClientHttpResponse> for the execute method. Two implementations
of these interfaces are provided, one based on the HttpURLConnection
incombination with a Spring AsyncTaskExecutor and one based on Apache
HttpComponents HttpAsyncClient.

Issue: SPR-8804
2013-08-27 14:22:37 -04:00
Phillip Webb 89b53cfcd5 Javadoc that @Conditionals are not inherited
Issue: SPR-10840
2013-08-27 10:48:38 -07:00
Phillip Webb ced5ea2f93 Revert "Ensure @Conditions consider super classes"
This reverts commit 620c16f5c7.
2013-08-27 10:39:51 -07:00
Rossen Stoyanchev 402a3b8473 Fix javadoc 2013-08-27 12:48:48 -04:00
Jan Machacek 3f130a1c08 Add support for custom types in AMMH 2013-08-27 12:43:21 -04:00
Jan Machacek c48a41ea7a Fix minor issue in JettyRequestUpgradeStrategy
Issue: SPR-10861
2013-08-27 12:34:11 -04:00
Rossen Stoyanchev ed9b2966c0 Revise use of FilterChain in MockMvc
MockFilterChain should not be re-used across requests. This is not an
issue unless tests are executed concurrently. This change ensures the
MockFilterChain is re-created for each request in MockMvc.

Issue: SPR-10838
2013-08-27 11:48:03 -04:00
Phillip Webb 620c16f5c7 Ensure @Conditions consider super classes
Fix @Condition evaluation to also consider super classes for both
@Configuration classes and regular @Components. This change allows
@Conditional annotations to be inherited and restores the previous
behavior of @Profile.

Issue: SPR-10840
2013-08-26 17:12:02 -07:00
Juergen Hoeller 8f90eacd92 Polishing 2013-08-26 20:04:40 +02:00
Juergen Hoeller aecf60d21f Discovering and accumulating all @Profile meta-annotations
Issue: SPR-10812
2013-08-26 20:03:32 +02:00
Juergen Hoeller c9771012e9 Introduced @Description annotation for populating BeanDefinition.getDescription()
Issue: SPR-10583
2013-08-23 16:49:25 +02:00
Rossen Stoyanchev cf2e1ffc65 Fix failing test
Issue: SPR-10605
2013-08-22 21:53:57 -04:00
Rossen Stoyanchev 64baef9f19 Fix failing tests
Issue: SPR-10825
2013-08-22 20:56:50 -04:00
Rossen Stoyanchev a5143057ce Add configurability for underlying WebSocket engine
Issue: SPR-10844
2013-08-22 20:35:03 -04:00
Rossen Stoyanchev ccaa101252 Fix typo 2013-08-22 16:09:32 -04:00
Gabriel Axel d66206704e Fix NPE in ResourceHttpMessageConverter
ResourceHttpMessageConverter tries to use the filename to determine the
media type, but for Resource implementations such as ByteArrayResource
it is null, which causes NullPointerException. The fix checks whether
getFilename returns null before attempting to determine the media type
by it.

Issue: SPR-10848
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev a455217743 Modify how SpringConfigurator finds Endpoint singleton
First try the endpoint type name converted to property
Then try @Component value

Issue: SPR-10605
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev c211c98b40 Support placeholder values in Spring MVC Test
Issue: SPR-10825
2013-08-22 16:05:44 -04:00
Dmitry Katsubo 47d40053a4 Add Jackson serialization inclusion to FactoryBean
Issue: SPR-10810
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev 08d36cf2e4 Allow custom expand algorithm in UriComponents
Issue: SPR-10647
2013-08-22 16:05:44 -04:00
Rossen Stoyanchev 1fd7bc3ee5 Make MediaType serializable
Issue: SPR-8738
2013-08-22 16:05:44 -04:00
Juergen Hoeller 88115212eb Consistent xsd header formatting 2013-08-22 19:37:42 +02:00
Juergen Hoeller 3d462b6dd9 Added missing spring.schemas entries for 4.0 xsds
Also fixing an old XmlBeanFactory test that relies on "ref local" which is gone in the 4.0 xsd now, redeclaring the affected file to an older xsd version.
2013-08-22 19:36:53 +02:00
Juergen Hoeller eb98f1f084 Added missing spring-jdbc-4.0.xsd 2013-08-22 19:33:01 +02:00
Juergen Hoeller 4a9af233ae @Autowired/@Inject with array/List value gets sorted against Ordered/@Order
Issue: SPR-5574
2013-08-22 16:43:10 +02:00
Rossen Stoyanchev 486a56dc1f Update TomcatRequestUpgradeStrategy for 8.0 RC1
While RC2 is not yet out, we need to support RC1 as well.
This change introduces temporary code that can be removed
once RC2 becomes available to avoid having to use Tomcat
snapshots.
2013-08-21 12:00:11 -04:00
Rossen Stoyanchev 0dcc5c048b Adjust SockJS use of ServerHttpResponse close vs flush 2013-08-21 12:00:11 -04:00
Rossen Stoyanchev 13ce20b1ca Remove IOException from HandshakeHandler 2013-08-21 12:00:11 -04:00
Rossen Stoyanchev 2397b21096 Upgrade spring-websocket to Tyrus 1.2.1
This targets currently nightly snapshots and future release
of Glassfish 4.0.1.
2013-08-21 12:00:11 -04:00
Rossen Stoyanchev e5406283c5 Polish DefaultHandshakeHandler
After this change the DefaultHandshakeHandler delegates to a
server-specific RequestUpgradeStrategy to update the HTTP response for
the handshake request and to begin the WebSocket interaction.

The DefaultHandshakeHandler however still retains the initial
validation of the WebSocket handshake including negotation of origin,
sub-protocol, etc. This allows sub-classes to override various
aspects of the negotiation independant of the WebSocket engine.
2013-08-21 12:00:11 -04:00
Rossen Stoyanchev 48996cf572 Update ServerEndpointRegistration
In addition to implementing ServerEndpointConfig, the
ServerEndpointRegistration now also extends
ServerEndpointConfig.Configurator making it easier to override
handshake customization methods without having to extend a separate
class.
2013-08-21 12:00:11 -04:00
Rossen Stoyanchev 64d45fe0a5 Make use of Tomcat's new WsServerContainer.doUpgrade
Tomcat now provides a method for initiating a WebSocket upgrade at
runtime vs relying on JSR-356 deployment at startup. This change
switches to use that latest feature. For more information on the
Tomcat change see:

https://issues.apache.org/bugzilla/show_bug.cgi?id=55314#c7
2013-08-21 12:00:11 -04:00
Juergen Hoeller f2fb0ec9e7 Minor polishing of related files
Issue: SPR-10181
2013-08-21 17:37:06 +02:00
Juergen Hoeller 6d3649858e Allow meta-annotations to override attributes from their parent
Issue: SPR-10181
2013-08-21 17:35:56 +02:00
Juergen Hoeller 87c2d6fd12 Updated build instructions to refer to OpenJDK 8 build 100 2013-08-20 22:44:05 +02:00
Juergen Hoeller 5d3d3c111b Revised JSR-303 references to include JSR-349 (Bean Validation 1.1) as well
Issue: SPR-10813
2013-08-20 22:38:17 +02:00
Juergen Hoeller ea6525f15f GenericTypeResolver properly handles bound parameterized type
Issue: SPR-10819
2013-08-20 19:36:57 +02:00
Juergen Hoeller da0128f120 Javadoc cleanup for Hibernate 3.6+ 2013-08-20 19:16:44 +02:00
Juergen Hoeller a65bc3851b Introduced local support for Hibernate 3.6 and 4.x exception translation to HibernateJpaDialect
Since Hibernate 3.6 and 4.x differ in exception handling now, this change makes HibernateJpaDialect independent from orm.hibernate3 now and avoids introducing a conditional dependency on orm.hibernate4.

Issue: SPR-10815
2013-08-20 19:10:39 +02:00
Juergen Hoeller c762b83a76 Explicit support for Hibernate 4.0's QueryTimeoutException, PessimisticLockException, PessimisticEntityLockException and OptimisticEntityLockException
Issue: SPR-10815
2013-08-20 19:06:24 +02:00
Juergen Hoeller 3b211335c7 Explicit support for Hibernate 3.6's QueryTimeoutException, PessimisticLockException and OptimisticLockException
Issue: SPR-10815
2013-08-20 19:05:23 +02:00
Juergen Hoeller f3b223034d Explicit support for JPA 2.0's QueryTimeoutException, LockTimeoutException and PessimisticLockException
Issue: SPR-10815
2013-08-20 19:02:02 +02:00
Rossen Stoyanchev 68c0df8305 Polish StompBrokerRelayMessageHandler 2013-08-19 21:16:00 -04:00
Rossen Stoyanchev 94fefec0f9 Add ActiveMQ-based STOMP relay integration tests 2013-08-19 21:16:00 -04:00
Andy Wilkinson 3fb5ff2654 Improve broker availability events
Use a single class for the broker availability event with a boolean
that indicates whether or not the broker is available, rather than one
event for an available broker and one event for an unavailable broker.

Publish broker availability events in SimpleBrokerMessageHandler so that
it can be used as a drop-in replacement for
StompBrokerRelayMessageHandler.
2013-08-19 21:16:00 -04:00
Andy Wilkinson 131b5de6f9 Add reconnect logic to the relay's system session
Upgrade to Reactor snapshot builds to take advantage of TcpClient's
reconnect support that was added post-M1. Now, the system relay session
will try every 5 seconds to establish a connection with the broker, both
when first connecting and in the event of subsequently becoming
disconnected.

A more sophisticated reconnection policy, including back off and
failover to different brokers, is possible with the Reactor API. We may
want to enhance the relay's reconnection policy in the future.

Typically, a broken connection is identified by the failure to forward
a message to the broker. As things stand, the message id then discarded.
Any further messages that are forwarded before the connection's been
re-established are queued for forwarding once the CONNECTED frame's been
received. We may want to consider also queueing the message that failed
to send, however we would then need to consider the possibility of the
message itself being what caused the broker to close the connection
and resending it would simply cause the connection to be closed again.
2013-08-19 21:15:59 -04:00
Andy Wilkinson 8b48d8f445 Publish events about broker's availability
Components that are using a StompBrokerRelayMessageHandler may want
to know whether or not the broker's unavailable. If they're sending
messages to the relay via an asynchronous channel there's currently
no way for them to find this out.

This commit enhances StompBrokerRelayMessageHandler to publish
application events when the broker's availability changes:
BrokerBecameAvailableEvent and BrokerBecameUnavailableEvent.
Irrespective of the number of relay sessions only a single event is
published for each change in the broker's availability.
2013-08-19 21:15:59 -04:00
Andy Wilkinson be6dbe54a3 Integration tests for the broker relay 2013-08-19 21:15:59 -04:00
Rossen Stoyanchev 71dbd7bc1f Remove qetQueryParams from ServerHttpRequest 2013-08-14 11:43:37 -04:00
Rossen Stoyanchev 4c0490a070 Remove Cookie support from ServerHttpRequest
Although ServletHttpRequest provides access to Cookies, other
implementations may not. At the moment this was only needed
for SockJS to check the value of the JSESSIONID cookie. This
is now down by parsing the raw cookie values locally.

If comprehensive cookie support is to be added, we should
probably consider HttpHeaders as a potential candidate.
2013-08-14 10:15:02 -04:00
Dmitry Katsubo b232dc9d2b Add canRead/Write to MarshallingHttpMessageConverter
Issue: SPR-10463
2013-08-13 18:48:20 -04:00
Arjen Poutsma 37861c3f90 Support 'empty' StreamSource in Jaxb2Marshaller
Added support for StreamSources that do not have a InputStream or
Reader, but do have a System ID.

Issue: 10828
2013-08-13 18:14:45 -04:00
Rossen Stoyanchev 319f18dddf Add HandshakeInterceptor
A HandshakeInterceptor can be used to intercept WebSocket handshakes
(or SockJS requests where a new session is created) in order to
inspect the request and response before and after the handshake
including the ability to pass attributes to the WebSocketHandler,
which the hander can access through
WebSocketSession.getHandshakeAttributes()

An HttpSessionHandshakeInterceptor is available that can copy
attributes from the HTTP session to make them available to the
WebSocket session.

Issue: SPR-10624
2013-08-13 17:28:01 -04:00
Rossen Stoyanchev 9925d8385f Fix configuration issues in DefaultSockJsService 2013-08-13 17:28:00 -04:00
Rossen Stoyanchev 01feae0ad5 Polish WebSocketSession
Update methods available on WebSocketSession interface.
Introduce DelegatingWebSocketSession interface.
2013-08-13 17:28:00 -04:00
Sam Brannen 14ac023e01 Avoid use of repeated @Scheduled in tests
Commented out severalFixedRatesWithRepeatedScheduledAnnotation() until
we have full Java 8 support in the IDEs (e.g., Eclipse).

Issue: SPR-10532
2013-08-12 23:32:35 +02:00
Phillip Webb 171b35815e Merge pull request #328 from lonre/typo-fix
# By Lonre Wang
* typo-fix:
  Fix typo in reference docs
2013-08-12 14:25:24 -07:00
Lonre Wang 5549bd909e Fix typo in reference docs 2013-08-12 14:24:58 -07:00
Arjen Poutsma d9bfac393b Added reference to CatchAllConverter
Added reference to CatchAllConverter in both javadoc and reference docs.

Issue: SPR-10821
2013-08-12 12:26:34 +02:00
Sam Brannen c3dd9ff342 Add test with @Schedules container annotation
Issue: SPR-10532
2013-08-11 00:05:36 +02:00
Arjen Poutsma 5311e84c64 Added XStream CatchAllConverter
Added XStream CatchAllConverter that supports all classes, but throws
exceptions for (un)marshalling.

Main purpose of this class is to register this converter as a catchall
last converter with a normal or higher priority in addition to
converters that explicitly  support the domain classes that should be
supported. As a result, default XStream  converters with lower
priorities and possible security vulnerabilities do not get invoked.
2013-08-09 08:43:29 -04:00
Juergen Hoeller b27e240fdb Consistent use of varargs, consistent template method order 2013-08-09 11:43:20 +02:00
Juergen Hoeller 92e3c52a48 XStreamMarshaller exposes public marshal methods with DataHolder parameter
Also splitted buildXStream into constructXStream and configureXStream now.

Issue: SPR-10421
2013-08-09 11:41:52 +02:00
Juergen Hoeller 1420b970a7 Introduced DefaultParameterNameDiscoverer which checks JDK 8's standard reflection first and then falls back to ASM-based debug symbol analysis
Also, StandardReflectionParameterNameDiscoverer calls "Parameter.isNamePresent()" now to return null (and pass on to the next discoverer) if no JDK 8 parameters are available. Note that this requires OpenJDK 8 b100 or higher to compile now.

Issue: SPR-10532
2013-08-08 15:52:43 +02:00
Juergen Hoeller f9325a8376 Added Java 8 compliant @Schedules container annotation for @Scheduled
Issue: SPR-10532
2013-08-08 15:52:41 +02:00
Rossen Stoyanchev ead0124b39 Fix bug that ignored custom json prefix
Issue: SPR-10817
2013-08-08 09:38:01 -04:00
Rossen Stoyanchev 82a26024ae Allow @ResponseBody on the type level
This change enables having @ResponseBody on the type-level in which
case it inherited and does not need to be added on the method level.

For added convenience, there is also a new @RestController annotation,
a meta-annotation in turn annotated with @Controller and @ResponseBody.
Classes with the new annotation do not need to have @ResponseBody
declared on the method level as it is inherited.

Issue: SPR-10814
2013-08-07 18:54:36 -04:00
Rossen Stoyanchev 172a0b9f5d Add header support to WebSocketConnectionManager
Issue: SPR-10796
2013-08-07 17:07:43 -04:00
Rossen Stoyanchev eb4579b4d4 Extract MimeType as a base class of MediaType
MimeType is available in core-spring and does not include support
for quality parameters and media used in HTTP content negotiation.
The MediaType sub-class in org.springframework.http adds q-parameters.
2013-08-07 13:21:37 -04:00
Arjen Poutsma 7576274874 Fix potential security risk when using Spring OXM
Disable by default external entity resolution when using Spring OXM
with jaxb. This prevents a XML entity from being able to resolve a
local file on the host system.

See:
https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing

Issue: SPR-10806
2013-08-06 15:08:53 -07:00
Phillip Webb 28be8e9063 Merge pull request #325 from Xaerxess/patch-1
# By Grzegorz Rożniecki
* patch-1:
  Fix SimpleJdbcCall and SimpleJdbcInsert Javadoc
2013-08-06 14:43:01 -07:00
Grzegorz Rożniecki 2344412e04 Fix SimpleJdbcCall and SimpleJdbcInsert Javadoc
Change "fluid" interface to "fluent" and "string" to "chain", plus fix
few typos in Javadoc.

Issue: SPR-10792
2013-08-06 14:42:49 -07:00
Juergen Hoeller ce06d1391f Polishing
Issue: SPR-10807
2013-08-06 02:05:49 +02:00
Juergen Hoeller 9645799264 Fixed accidental use of JDK 8 getOrDefault method on MultiValueMap
Issue: SPR-10807
2013-08-06 01:45:08 +02:00
Juergen Hoeller 2626a35f2c Added javadoc note on the use of CachingConnectionFactory
Issue: SPR-10581
2013-08-06 00:16:50 +02:00
Juergen Hoeller c3032349b1 Introduced "mapperWrappers" bean property
Issue: SPR-10421
2013-08-05 23:50:44 +02:00
Juergen Hoeller 3cd2eb83c5 Exposed all of XStream 1.4's configurable strategies as XStreamMarshaller bean properties
Issue: SPR-10421
2013-08-05 22:13:04 +02:00
Sam Brannen cc2e7bb3d7 Polish AbstractContextLoaderInitializer and subclasses
This commit polishes the Javadoc and assertion failure messages for
AbstractContextLoaderInitializer and its subclasses.
2013-08-05 19:13:16 +02:00
Rossen Stoyanchev cb77440936 Make date methods in HttpHeaders public
Issue: SPR-10713
2013-08-05 12:37:18 -04:00
Rossen Stoyanchev 9245fffcaf Return -1 after parse error for Expires header
Issue: SPR-10648
2013-08-05 12:25:26 -04:00
Juergen Hoeller 58bfd1ae9a Upgraded to XStream 1.4+; reworked XStream construction
Also introducing a "mapper" bean property and applying the stream driver and the class loader to the native XStream delegate now.

Issue: SPR-10421
2013-08-05 18:04:43 +02:00
Rossen Stoyanchev 123c01908a Remove unintended dependency on Servlet API in SockJS
Add a factory method in ServerHttpRequest for creating a
ServerHttpAsyncRequestControl.
2013-08-03 11:21:02 -04:00
Rossen Stoyanchev 15a2f03459 Polish SockJS exception handling and javadoc
See javadoc in SockJsService for details.

Also remove ReadOnlyMultiValueMap, CollectionUtils has a method for
that already.
2013-08-03 11:03:27 -04:00
Rossen Stoyanchev a03517fa35 Polish ServletServerHttpRequest query param handling
The method returning query parameters now returns only query string
parameters as opposed to any Servlet request parameter.

This commit also adds a ReadOnlyMultiValueMap.
2013-08-02 17:40:08 -04:00
Rossen Stoyanchev 9700f09fad Polish async feature for ServerHttpRequest/Response
ServerHttpAsyncResponseControl wraps a ServetHttpRequest and -Response
pair and allows putting the processing of the request in async mode
so that the response remains open until explicitly closed, either from
the current or from another thread.

ServletServerHttpAsyncResponseControl provides a Serlvet-based
implementation.
2013-08-02 15:12:20 -04:00
Rossen Stoyanchev 0d5901ffb6 Polish Cookie abstraction in http packge of spring-web
A getCookies method is now available on ServerHttpRequest with one
ServletServerCookie implementation that wraps a Servlet cookie.

The SockJS service makes use of this to check for an existing session
cookie in the request.
2013-08-02 12:30:43 -04:00
Juergen Hoeller c26272cef6 DelegatingFilterProxy avoids synchronization for pre-resolved delegate
Issue: SPR-10413
2013-08-02 18:17:13 +02:00
Juergen Hoeller fdaf7eb78a Updated for Tomcat 6.0+
Issue: SPR-10788
2013-08-02 18:08:03 +02:00
Juergen Hoeller 219eeb2369 Added JPA 2.0 compliant "sharedCacheMode" and "validationMode" properties to DefaultPersistenceUnitManager and LocalContainerEntityManagerFactoryBean
Issue: SPR-10764
2013-08-02 17:43:34 +02:00
Juergen Hoeller a841923f12 Scan for JPA 2.1 Converter annotation as well
Issue: SPR-10799
2013-08-02 11:08:30 +02:00
Juergen Hoeller f329140dd4 Fixed ClassFilterAwareUnionMethodMatcher equals implementation
Issue: SPR-10604
2013-08-02 10:34:28 +02:00
Andy Wilkinson 9e20a25607 Introduce SubProtocolHandler abstraction
Add SubProtocolHandler to encapsulate the logic for using a
sub-protocol.

A SubProtocolWebSocketHandler is also provided to
delegate to the appropriate SubProtocolHandler based on the
negotiated sub-protocol value at handshake.

StompSubProtocolHandler provides handling for STOMP messages.

Issue: SPR-10786
2013-08-01 17:31:27 -04:00
Juergen Hoeller e4d83bbefe Refined javadoc for WebLogic/WebSphere transaction setup
Issue: SPR-10777
(cherry picked from commit 9035a97)
2013-08-01 17:27:12 +02:00
Juergen Hoeller f88f5ed011 Optimized TomcatInstrumentableClassLoader implementation
Issue: SPR-10788
(cherry picked from commit d32a77a)
2013-08-01 17:27:06 +02:00
Rossen Stoyanchev dcf7813de8 Fix failing test
Issue: SPR-10800
2013-07-31 22:06:15 -04:00
Rossen Stoyanchev ad40ecff4b Refactor and polish SockJS package structure
After this change the top-level sockjs package contains the main types
for use in applications.
2013-07-31 21:42:56 -04:00
Rossen Stoyanchev dad7115c23 Add SockJsMessageCodec
A SockJS message frame is an array of JSON-encoded messages and before
this change the use of the Jackson 2 library was hard-coded.

A Jackson 2 and Jackson 1.x implementations are provided and
automatically used if those libraries are present on the classpath.

Issue: SPR-10800
2013-07-31 21:42:56 -04:00
Juergen Hoeller 2af891683e Polishing
Issue: SPR-10752
Issue: SPR-10627
(cherry picked from commit ae0f23e)
2013-08-01 00:20:33 +02:00
Juergen Hoeller 85c9ed005d Fixed misunderstanding with respect to excludeUnlistedClasses default in JPA 2.0
Issue: SPR-10767
(cherry picked from commit d0948f1)
2013-08-01 00:20:21 +02:00
Juergen Hoeller 5b4dcbfcb9 Updated to Hibernate 4.2.2 2013-07-31 18:08:10 +02:00
Juergen Hoeller 127b91fd4f PropertySourcesPlaceholderConfigurer's "ignoreUnresolvablePlaceholders" setting reliably applies to nested placeholders as well
Issue: SPR-10549
2013-07-31 17:50:44 +02:00
Rossen Stoyanchev 803779d160 Support List<Part> method arguments
Issue: SPR-10591
2013-07-30 22:01:17 -04:00
Juergen Hoeller 481aeeec98 Polishing
Issue: SPR-10609
2013-07-30 22:36:42 +02:00
Rossen Stoyanchev 3482c170e0 Fix documentation typo 2013-07-30 15:40:49 -04:00
Deline Neo 909577082d Add attributeDoesNotExist ModelResultMatcher
Issue: SPR-10509
2013-07-30 15:35:23 -04:00
Rossen Stoyanchev 4c991ba4d0 Make HTTP scheme parsing case-insensitive
Issue: SPR-10779
2013-07-30 12:30:21 -04:00
Rossen Stoyanchev 1e90d02973 Fix issue with parsing x-forwarded-host header
Issue: SPR-10701
2013-07-30 11:56:42 -04:00
Juergen Hoeller 676f7f9571 Updated Quartz version range in javadoc
Issue: SPR-10775
2013-07-30 17:33:49 +02:00
Juergen Hoeller f835188601 Remove the JobDetail from the job data map after discovering it
Issue: SPR-10775
2013-07-30 17:22:43 +02:00
Juergen Hoeller d504d69ae5 Added "requestsRecovery" bean property to JobDetailFactoryBean
Issue: SPR-10775
2013-07-30 17:21:18 +02:00
Juergen Hoeller ec527a4121 Relaxed expectation for JDK bug in cornerSpr8949 (for compatibility with OpenJDK 8 b100)
Issue: SPR-10558
2013-07-30 16:48:09 +02:00
Juergen Hoeller 5ccbc80522 Upgraded to AspectJ 1.8.0.M1
Issue: SPR-10558
2013-07-30 15:42:23 +02:00
Juergen Hoeller faf54f3966 Polishing
Issue: SPR-10657
2013-07-30 14:52:23 +02:00
Juergen Hoeller ed996ab4b3 Avoid re-retrieval of singleton bean instances
Issue: SPR-10663
2013-07-30 14:52:22 +02:00
Phillip Webb eb6dccd885 Merge pull request #324 from bijukunjummen/SPR-10714
# By Biju Kunjummen
* SPR-10714:
  Fix Jaxb2TypeScanner to scan for @XmlRegistry
2013-07-29 11:25:24 -07:00
Biju Kunjummen 4f871d4448 Fix Jaxb2TypeScanner to scan for @XmlRegistry
Update ClassPathJaxb2TypeScanner to scan for @XmlRegistry classes.

Prior to this commit explicitly configured @XmlRegistry annotated classes
were not registered with the JAXBContext when using the 'packagesToScan'
property of the Jaxb2Unmarshaller.

Issue: SPR-10714
2013-07-29 11:21:24 -07:00
Rossen Stoyanchev 5a0e42b76e Add MultiProtocolWebSocketHandler
It makes it possible to deploy multiple WebSocketHandler's to a URL,
each supporting a different sub-protocol.

Issue: SPR-10786
2013-07-27 15:17:45 -04:00
Rossen Stoyanchev 7bb9c63963 Fix issue in TomcatRequestUpgradeStrategy
The method WsServerContainer.getServerContainer() was removed from
JSR-356 but remained in Tomcat a little while longer. Instead the
ServerContainer is obtained through a ServletContext attribute.
Tomcat has now removed this method, hence the need for this fix.
2013-07-25 13:26:03 -04:00
Phillip Webb bc5246938d Fix ResourceHttpRequestHandler empty location log
Fix ResourceHttpRequestHandler to only log warning when locations
is empty.

Issue: SPR-10780
2013-07-24 16:52:01 -07:00
Phillip Webb 1678eaaed0 Turn down logging in DefaultSingletonBeanRegistry
Reduce INFO level destroy logging to DEBUG

Issue: SPR-10758
2013-07-24 13:49:07 -07:00
Andy Wilkinson 4390591b68 Make BeanFactoryMCDR BeanFactoryAware
SI's BeanFactoryChannelResolver was BeanFactoryAware. This commit
brings Spring's BeanFactoryMessageChannelDestinationResolver in line
with the old SI class.
2013-07-24 16:45:52 -04:00
Spring Buildmaster b8bfabdce6 Next development version 4.0.0.BUILD-SNAPSHOT 2013-07-24 11:31:26 -05:00
Spring Buildmaster eda6052937 Release version 4.0.0.M2 2013-07-24 08:56:11 -07:00
Rob Winch b255045541 Enable Jibx binding with TestGroup.CUSTOM_COMPILATION
Previously the Jibx binding was commented out which caused failures when
using the TestGroup.CUSTOM_COMPILATION

Now the Jibx bindings are enabled when the CUSTOM_COMPILATION is enabled.

Issue: SPR-10558
2013-07-24 10:17:09 -05:00
Rob Winch f7c0795c1a Add TestGroup.CUSTOM_COMPILATION
Previously building with JDK > 1.8 b88 caused test failures due to errors
with custom compilers like Jibx and Jasper reports.

This commit adds a new TestGroup named CUSTOM_COMPILATION that allows the
CI server to continue to run these tests but allow committers to ignore
these tests.
2013-07-24 09:29:17 -05:00
Arjen Poutsma 4da7e304b8 Additional docs about security vulnerabilities with XStream. 2013-07-24 10:24:13 -04:00
Juergen Hoeller b6c54c3637 Moved executor null check to AsyncExecutionInterceptor, allowing AbstractAsyncExecutionAspect to fall back to sync execution (as in 3.2.1)
Issue: SPR-10636
2013-07-24 15:30:18 +02:00
Juergen Hoeller 2e4eb9fc10 Resource-based PlatformTransactionManager implementations defensively catch Throwable in doBegin in order to reliably close resource in case of OutOfMemoryError
Issue: SPR-10755
2013-07-24 15:29:10 +02:00
twhitmorenz 504d5da71f Log view exception in DispatcherServlet
Issue: SPR-10340
2013-07-24 09:13:48 -04:00
Juergen Hoeller 01a71ef5ef Polishing 2013-07-24 13:40:15 +02:00
Juergen Hoeller bb95a63eda OpenJDK 8 build 99: Jibx compiler fails - ignoring Jibx tests for the time being 2013-07-24 13:39:24 +02:00
Juergen Hoeller b8f7a30790 OpenJDK 8 build 99: different toString() output from JSR-310 Instant 2013-07-24 13:37:52 +02:00
Juergen Hoeller 2d1b44202b OpenJDK 8 build 99: annotation discovery on bridge methods 2013-07-24 13:36:59 +02:00
Phillip Webb f7b7649d79 Merge pull request #320 from beamerblvd/SPR-10770
# By Nick Williams
* SPR-10770:
  Fix PathResourceTests on Windows
2013-07-23 14:49:06 -07:00
Nick Williams e59c821603 Fix PathResourceTests on Windows
Fix PathResourceTests so that paths are accessed in a platform
independent manor.

Issue: SPR-10770
2013-07-23 14:48:25 -07:00
Phillip Webb 9eb596a7e5 Make TypeDescriptor serializable
Issue: SPR-10631
2013-07-23 14:17:19 -07:00
Phillip Webb 9939c4809b Remove unnecessary spring-instrument dependencies
Remove unnecessary spring-core dependency from spring-instrument.

Issue: SPR-10732
2013-07-23 13:33:47 -07:00
Phillip Webb 50333ca68e Add Java 7 instrumentation manifest attributes
Update META-INF/MANIFEST.MF for spring-instrument to include
necessary attributes for running under Java 7:

    Can-Redefine-Classes : true
    Can-Retransform-Classes: true
    Can-Set-Native-Method-Prefix : false

(see http://docs.oracle.com/javase/7/docs/api/java/lang/instrument/
package-summary.html)

Prior to this commit `InstrumentationSavingAgent.getInstrumentation().
addTransformer(t, true);` would fail under Java 7.

Issue: SPR-10731
2013-07-23 13:32:18 -07:00
Phillip Webb 1204d2aef4 Fix case of rollbackForClassName in ref docs
Update @Transactional reference documentation to fix the case of the
rollbackForClassName and noRollbackForClassName attributes.

Issue: SPR-10754
2013-07-22 15:46:31 -07:00
Phillip Webb 4500bf7661 Fix malformed Javadoc 2013-07-22 13:30:38 -07:00
Phillip Webb 5b6ef120bc Merge pull request #318 from beamerblvd/SPR-10767
# By Nick Williams
* SPR-10767:
  Parse JPA <exclude-unlisted-classes> correctly
2013-07-22 12:37:17 -07:00
Nick Williams 7ad540d97b Parse JPA <exclude-unlisted-classes> correctly
Fix PersistenceUnitReader to correctly read <exclude-unlisted-classes>
in both JPA 1.0 and 2.0 persistence.xml files.

Prior to this commit PersistenceUnitReader would set the value of
excludeUnlistedClasses to true when a <exclude-unlisted-classes> element
was present, regardless of its value.

The following rules are now used when parsing:

- If the <exclude-unlisted-classes> element is missing the appropriate
  default value is set (based on the JPA version).

- If an empty <exclude-unlisted-classes/> element is found the
  excludeUnlistedClasses property is set to true.

- Otherwise the value of the <exclude-unlisted-classes> element is used
  to set the excludeUnlistedClasses property.

Issue: SPR-10767
2013-07-22 12:25:40 -07:00
Phillip Webb 66cfe9f0e6 Merge pull request #297 from beamerblvd/SPR-9678
# By Nicholas Williams
* SPR-9678:
  Add <spring:argument> subtag for message/theme
  Ensure ParamTag release resources
  Fix malformed UrlTag Javadoc
  Update TLD versions to 4.0
2013-07-22 10:52:49 -07:00
Nicholas Williams f9b17a708f Add <spring:argument> subtag for message/theme
Add a new <spring:argument> tag that cab be nested within
<spring:message> and <spring:theme>. The tag is based on the <fmt:param>
tag and uses conventions found throughout other Spring tags.

Issue: SPR-9678
2013-07-22 10:51:02 -07:00
Nicholas Williams 50bd70f13d Ensure ParamTag release resources
Update ParamTag to reset values when resources are released. This
prevents problems in containers that pool tags.

Issue: SPR-10769
2013-07-22 10:33:58 -07:00
Nicholas Williams 110db37f1c Fix malformed UrlTag Javadoc 2013-07-22 10:33:44 -07:00
Nicholas Williams 915e93cc81 Update TLD versions to 4.0 2013-07-22 10:32:59 -07:00
Phillip Webb 6580d6b15c Upgrade to latest propdeps plugin
Issue: SPR-10763
2013-07-21 17:54:18 -07:00
Phillip Webb d7e800abbc Upgrade to latest docbook gradle plugin
Issue: SPR-10597
2013-07-21 17:54:18 -07:00
Rossen Stoyanchev 02949fc4a7 Fix failing tests 2013-07-21 20:39:07 -04:00
Rossen Stoyanchev b3c7c18c1b Add MessageHandler destination prefix checks 2013-07-21 12:07:50 -04:00
Rossen Stoyanchev 2cdac267f7 Add MessageMethodArumentResolver 2013-07-21 12:07:50 -04:00
Phillip Webb 587877c6da Add MemorySafeUndeclaredThrowableStrategy
Port the latest unreleased UndeclaredThrowableStrategy implementation
from cglib to fix a memory-leak present in v3.

Issue: SPR-10709
2013-07-19 14:36:19 -07:00
Rossen Stoyanchev d0d670cd7d Make the JSON prefix used in converters configurable
Issue: SPR-10627
2013-07-19 17:22:58 -04:00
Rossen Stoyanchev a4c15d6678 Replace assert w/ warning in ResourceHttpRequestHandl.
Issue: SPR-9186
2013-07-19 17:22:58 -04:00
Rossen Stoyanchev da1fafa930 Fix issue in MappingJacksonJsonView
Issue: SPR-10752
2013-07-19 17:22:58 -04:00
Rossen Stoyanchev 90c4712d06 Revise UserSessionResolver to UserQueueSuffixResolver
The resolver for /user/{username} prefixed destinations is now
more explicitly designed to store queue suffixes rather than session
id's, which is what we happen to use as queue suffixes.

This allows something other than the sessionId to be used without
having to change many places. It also enables applications to
construct destinations with user-specific queue suffixes without
making assumptions about what's used for queue suffixes. For
example a controller may construct a map with subscription destinations
and send that down to the client.
2013-07-19 17:22:58 -04:00
Phillip Webb f86a3283be Add Java SE Javadoc links
Issue: SPR-10587
2013-07-19 14:11:32 -07:00
Phillip Webb ab0d760d0a Merge pull request #303 from olivergierke/SPR-10678
# By Oliver Gierke
* SPR-10678:
  Fixed potential NPE in SharedEntityManagerCreator
2013-07-19 13:44:55 -07:00
Oliver Gierke b552c6e1d8 Fixed potential NPE in SharedEntityManagerCreator
Fix SharedEntityManagerCreator.createSharedEntityManager to correctly
forward an empty array in case that EntityManagerFactoryInfo returns
null from getEntityManagerInterface().

Previously the var-args invocation had turned null into an array with
a null value which caused a NullPointerException in the call to
Proxy.newProxyInstance() further down the call stack.

Issue: SPR-10678
2013-07-19 13:44:39 -07:00
Phillip Webb b704d62aad Turn down logging in DefaultListableBeanFactory
Reduce INFO level startup logging to DEBUG

Issue: SPR-10758
2013-07-19 13:17:17 -07:00
Phillip Webb 1a8f0d6a9e Resolve ${} placeholders in @ImportResource
Update ConfigurationClassParser to resolve any ${} placeholders from
@ImportResource values.

Issue: SPR-10686
2013-07-19 13:10:16 -07:00
Arjen Poutsma 2c030d4dcf Added 'processExternalEntities' to JAXB2Marshaller
Added 'processExternalEntities' property to the JAXB2Marshaller, which
indicates whether external XML entities are processed when
unmarshalling.

Default is false, meaning that external entities are not resolved.
Processing of external entities will only be enabled/disabled when the
Source} passed to #unmarshal(Source) is a SAXSource or StreamSource. It
has no effect for DOMSource or StAXSource instances.
2013-07-19 11:02:20 -04:00
Rossen Stoyanchev 3272917cf2 Polish concurrency in UserSessionResolver impl 2013-07-19 10:57:23 -04:00
Rossen Stoyanchev 675ec4c3e2 Fix issue in ContentNeogitatingViewResolver
The following commit in 3.2.3 had a side effect on CNVR:
https://github.com/SpringSource/spring-framework/commit/aaded7e30b06cc70a354856a2288acd04045b673

It appears that CNVR doesn't treat a request for "*/*" differently
from a request that does not request content types. Both should be
interpreted as "any content type is acceptable". This fix ensures
that CNVR treats these two cases the same way.

Issue: SPR-10683
2013-07-18 21:53:39 -04:00
Rossen Stoyanchev 7bab879623 Fix issue with xpath assertions in Spring Test MVC
Issue: SPR-10704
2013-07-18 21:20:01 -04:00
Rossen Stoyanchev 82ec06ad34 Fix bug in SockJS JsonpTransportHandler
Issue: SPR-10621
2013-07-18 17:53:48 -04:00
Rossen Stoyanchev 2a15b5a895 Enable asyncSupported flag in Spring Test MVC
Also remove Servlet 3 bridge classes no longer needed since Spring
Framework 4 compiles with the Servlet 3 API. That means applications
may need to run tests with the Servlet 3 API jar although
technically they don't have to run with that in production.
2013-07-18 17:06:50 -04:00
Rossen Stoyanchev 9af1984b39 Cache constructor instance in WebAsyncUtils
Issue: SPR-10673
2013-07-18 12:13:02 -04:00
Rossen Stoyanchev 860e56ea84 Fix minor issue in WebSocketHttpRequestHandler
Issue: SPR-10721
2013-07-18 11:25:07 -04:00
Rossen Stoyanchev aa6f30482f Reverse change committed erroneously 2013-07-17 23:00:17 -04:00
Rossen Stoyanchev 3e53725896 Merge branch 'master' into websocket-stomp 2013-07-17 22:43:30 -04:00
Rossen Stoyanchev a109d6adc7 Set heartbeat to 0,0 on CONNECT to message broker 2013-07-17 22:40:44 -04:00
Rossen Stoyanchev 6eea4ad68b Upgrade websocket module to servlet api 3.1.0 2013-07-17 22:39:51 -04:00
Rossen Stoyanchev 7823c5d6ea Upgrade reactor to M1 2013-07-17 18:40:32 -04:00
Rossen Stoyanchev 8a8501a992 Polish 2013-07-17 18:23:27 -04:00
Rossen Stoyanchev 329fbf31bc Fix concurrency issue in DefaultSubscriptionRegistry 2013-07-17 18:16:39 -04:00
Rossen Stoyanchev d73c2e26a5 Polish handling of STOMP message headers 2013-07-17 13:58:45 -04:00
Rossen Stoyanchev ba7998d03b Add SimpMessageSendingOperations 2013-07-17 10:09:55 -04:00
Rossen Stoyanchev 078cfb3e78 Add @ReplyTo/@ReplyToUser, remove deps on spring-web 2013-07-16 22:07:46 -04:00
Rossen Stoyanchev 55dae74f15 Add ReplyTo annotation 2013-07-16 10:24:45 -04:00
Rossen Stoyanchev e0d393eed3 Fix issue in STOMP broker relay 2013-07-15 17:45:54 -04:00
Rossen Stoyanchev 5d20b75dc2 Add support for sending private messages
The new UserDestinationMessageHandler resolves messages with
destinations prefixed with "/user/{username}" and resolves them into a
destination to which the user is currently subscribed by appending the
user session id.

For example a destination such as "/user/john/queue/trade-confirmation"
would resolve "/trade-confirmation/i9oqdfzo" assuming "i9oqdfzo" is the
user's session id.
2013-07-14 21:10:15 -04:00
Rossen Stoyanchev 2a48ad88fb Refactor and polish spring-messaging
Remove base class for STOMP-related message handler classes
(AbstractSimpMessageHandler), polish subclasses and fix issues with
more significant updates to STOMP broker relay.

Introduce base class for SubscribableChannel implementations providing
consistent logging for all channel implementations.
2013-07-13 19:05:32 -04:00
Rossen Stoyanchev f5f3f66b13 Add user-name header to CONNECTED frame 2013-07-12 19:42:31 -04:00
Rossen Stoyanchev bd68fefc6f Fix issue with clearing subscriptions on disconnect 2013-07-12 15:30:12 -04:00
Rossen Stoyanchev 210be9cde4 Add PrincipalMessageArgumentResolver 2013-07-12 15:15:37 -04:00
Rossen Stoyanchev d3cecfc6cc Create spring-messaging module
Consolidates new, messaging-related classes from spring-context and
spring-websocket into one module.
2013-07-12 13:44:41 -04:00
Arjen Poutsma 14ab2c88cc Request streaming for Apache HttpClient
- Added org.springframework.http.StreamingHttpOutputMessage, which
  allows for a settable request body (as opposed to an output stream).

- Added http.client.HttpComponentsStreamingClientHttpRequest, which
  implements the above mentioned interface, mapping setBody() to a
  setEntity() call on the Apache HttpClient HttpEntityEnclosingRequest.

- Added a 'bufferRequestBody' property to the
  HttpComponentsClientHttpRequestFactory. When this property is set to
  false (default is true), we return a
  HttpComponentsStreamingClientHttpRequest instead of a (request
  buffering) HttpComponentsClientHttpRequest.

Issue: SPR-10728
2013-07-11 09:46:14 -04:00
Rossen Stoyanchev 6407caac8f Merge remote-tracking branch 'origin/master' 2013-07-11 09:20:16 -04:00
Sam Brannen a5c3c12627 Merge pull request #314 from bijukunjummen/master
* SPR-10650:
  Fix typo in ModelAndViewMethodReturnValueHandler
2013-07-11 01:33:42 +02:00
Biju Kunjummen 83ea0fb9e0 Fix typo in ModelAndViewMethodReturnValueHandler
This commit fixes a typo in the class-level Javadoc for
ModelAndViewMethodReturnValueHandler.

Issue: SPR-10650
2013-07-11 01:33:02 +02:00
Rossen Stoyanchev 2803845151 Update MessageConverter and reactor dependencies 2013-07-10 16:00:40 -04:00
Rossen Stoyanchev dbc904b647 Remove mavenLocal (was temporarily added) 2013-07-08 11:34:56 -04:00
Rossen Stoyanchev 3a2f5e71b7 Refactor SubscriptionRegistry
The SubscriptionRegistry and implementations are now in a package
together with SimpleBrokerWebMessageHandler and primarily support
with matching subscriptions to messages. Subscriptions can contain
patterns as supported by AntPathMatcher.

StopmWebSocketHandler no longer keeps track of subscriptions and simply
ignores messages without a subscription id, since it has no way of
knowing broker-specific destination semantics for patterns.
2013-07-07 14:18:58 -04:00
Sam Brannen 907e286e77 Fix typos in HandlerAdapter 2013-07-06 15:31:12 -04:00
Rossen Stoyanchev f25ccac1a1 Polish SessionSubscriptionRegistry types 2013-07-05 13:38:51 -04:00
Rossen Stoyanchev 96cb7c0616 Fix test failures 2013-07-05 12:21:45 -04:00
Rossen Stoyanchev 0c92b85c3d Rename ChannelResolver to DestinationResolver 2013-07-05 11:11:19 -04:00
Rossen Stoyanchev 9dd7f6e5fb Update MessagingOperations hieararchy 2013-07-05 10:59:04 -04:00
Rossen Stoyanchev ef823721e5 Split AbstractMessagingTemplate across send/receive 2013-07-04 11:38:21 -04:00
Rossen Stoyanchev 078c766b80 Add new MessagingOperations ifc and class hieararchy 2013-07-04 11:23:40 -04:00
Rossen Stoyanchev e1080a0763 Merge branch 'master' into websocket-stomp 2013-07-04 09:55:00 -04:00
Rossen Stoyanchev 2a559028ad Upgrade spring-websocket to Jetty 9.0.4 2013-07-04 09:51:53 -04:00
Rossen Stoyanchev 8560582c40 Add messaging.channel package 2013-07-03 20:59:17 -04:00
Phillip Webb 52d378d41f Add PublishSubscribeChannel
Add a PublishSubscribeChannel implementation of SubscribableChannel.
2013-07-03 20:44:53 -04:00
Phillip Webb 7a85827c48 Polish messaging code
Minor formatting and Javadoc changes.
2013-07-03 20:44:53 -04:00
Rossen Stoyanchev 0a68c9930f Add "simple" broker and SessionSubscriptionRegistry
SimpleBrokerWebMessageHandler can be used as an alternative to the
StompRelayWebMessageHandler.
2013-07-03 20:40:56 -04:00
Phillip Webb c0e1225591 Merge branch 'SPR-10694'
* SPR-10694:
  ConversionService JSR-356 Encoder/Decoder adapters
  Add ConversionService support for ByteBuffers
2013-07-01 13:13:41 -07:00
Phillip Webb 8d6fd1ed63 ConversionService JSR-356 Encoder/Decoder adapters
Develop support class allowing JSR-356 Encoder and Decoder interfaces
to delegate to Spring's ConversionService.

Issue: SPR-10694
2013-07-01 13:12:52 -07:00
Phillip Webb 9dba73dfc9 Add ConversionService support for ByteBuffers
Add ByteBufferConverter that is registered by default with the
DefaultConversionService. Allows conversion from/to a ByteBuffer and
byte[] or to any type that can be converted via a byte[].

Issue: SPR-10712
2013-07-01 13:12:52 -07:00
Andy Wilkinson e694cc16c7 Consider original headers in pattern-based removal
When headers are being removed based on pattern matching, both the
new header names and the original header names need to be matched
against the pattern. Previously, only new headers were being
considered resulting in any matching original headers not being
removed.
2013-07-01 12:13:17 -04:00
Andy Wilkinson 98d7073370 Verify types when setting header
When a header is being set, verify that the type that's provided is
legal for the header that's been set. For example, the error channel's
type must be a MessageChannel or a String.

The method that performs type verification is protected so that it
can be overriden by sub-classes. It is expected that an overriding
method will call the super method.
2013-07-01 12:11:12 -04:00
Phillip Webb 638ba3fa97 Revert inadvertent change to DefaultDocumentLoader
Revert changes to DefaultDocumentLoader accidentally committed in
60532cbd1e.
2013-07-01 07:08:17 -07:00
Rossen Stoyanchev 8ab5f23643 Remove PubSubMessageBuilder 2013-06-29 12:54:31 -04:00
Phillip Webb 3157b68e4a Polish MethodReference
Polish MethodReference code formatting and remove duplicate code.
2013-06-28 16:24:14 -07:00
Phillip Webb bf4563e204 Include target types in MethodReference cache
Update the cached MethodExecutor in MethodReference to include the
target type. Prevents the incorrect use of the cache when the
SpEL expression refers to a different target object.

Issue: SPR-10657
2013-06-28 15:14:57 -07:00
Rossen Stoyanchev 3e27467420 Merge remote-tracking branch 'wilkinsona/message-header-accessor' into websocket-stomp 2013-06-28 10:41:04 -04:00
Rossen Stoyanchev ea7622ed9a Fix import 2013-06-28 10:38:25 -04:00
Andy Wilkinson 465fc7638f Fix typo in MessageHeaderAccessor's class name
Remove the extra 's' from the class name
2013-06-28 13:01:52 +01:00
Andy Wilkinson e24b71e700 Shutdown Reactor env when relay handler is stopped
The Reactor Environment (that's used by the TcpClient) manages a
number of threads. To ensure that these threads are cleaned up
Environment.shutdown() must be called when the Environment is no
longer needed.
2013-06-28 11:49:28 +01:00
Rossen Stoyanchev d650e909b2 Merge branch 'master' into websocket-stomp 2013-06-27 15:58:12 -04:00
Rossen Stoyanchev 9bdc825ded Add PayloadReturnValueHandler 2013-06-27 15:47:46 -04:00
Phillip Webb 60532cbd1e Polish spring-websocket code
Minor polish to formatting and assertion messages.
2013-06-27 09:58:58 -07:00
Rossen Stoyanchev e7d9c26a7c Make STOMP message broker host and port configurable 2013-06-27 12:43:56 -04:00
Phillip Webb 2d018e5019 Polish @RequestMapping Javadoc
Issue: SPR-10587
2013-06-26 11:15:54 -07:00
Phillip Webb 38c2f253ed 'Rename' HttpHeaders.getIfNotModifiedSince()
Effectively rename HttpHeaders.getIfNotModifiedSince() to
getIfModifiedSince() by adding a new method and deprecating the
old one.

Issue: SPR-10600
2013-06-26 10:44:35 -07:00
Rossen Stoyanchev ee9c46ad2e Remove PubSubChannelRegistry 2013-06-26 11:09:37 -04:00
Phillip Webb 6a3a361376 Include specific SQL statements in batch exception
Refine the SQL statements contained in exceptions thrown from batch
updates based on BatchUpdateException.getUpdateCounts().

Issue: SPR-10677
2013-06-25 23:14:49 -07:00
Phillip Webb 5ee6bb9b9b Fix SQL syntax error in jdbcTemplate update docs
Update the reference guide jdbcTemplate update example to include the
column name.

Issue: SPR-10625
2013-06-25 22:20:41 -07:00
Phillip Webb 2abec6fd90 Include all SQL statements in batch fail exception
Ensure any exception from calls to batchUpdate, on databases that
support batch operations, contains all the SQL statements. Prior to this
commit only the last SQL statement would be returned with the exception.

Issue: SPR-10677
2013-06-25 14:50:24 -07:00
Rossen Stoyanchev 486b4101ec Introduce MessageHeader accessor types
A new type MessageHeaderAccesssor provides read/write access to
MessageHeaders along with typed getter/setter methods along the lines
of the existing MessageBuilder methods (internally MessageBuilder
merely delegates to MessageHeaderAccessor). This class is extensible
with sub-classes expected to provide typed getter/setter methods for
specific categories of message headers.

NativeMessageHeaderAccessor is one specific sub-class that further
provides read/write access to headers from some external message
source (e.g. STOMP headers). Native headers are stored in a separate
MultiValueMap and kept under a specific key.
2013-06-25 16:31:52 -04:00
Phillip Webb 84249740b8 Merge pull request #305 from beamerblvd/SPR-10644
# By Nick Williams
* SPR-10644:
  Improving method validation support for BV 1.1
2013-06-24 13:22:35 -07:00
Nick Williams 7b2c74b05c Improving method validation support for BV 1.1
Update MethodValidationPostProcessor.setValidator(...) to use
LocalValidatorFactoryBean.getValidator() when possible.

This is required because LocalValidatorFactoryBean does not directly
implement the forExecutables() method introduced in bean validation v1.1.

Issue: SPR-10644
2013-06-24 13:21:03 -07:00
Phillip Webb f9b12b8362 Include argument types in MethodReference cache
Update the cached MethodExecutor in MethodReference to include the
method argument types. Prevents the incorrect use of the cache when the
SpEL expression refers to a class that has overloaded methods.

Issue: SPR-10657
2013-06-24 12:28:59 -07:00
Phillip Webb e83bdda7d5 Polish SpEL code 2013-06-24 11:22:19 -07:00
Rossen Stoyanchev ac23832e4d Fix issue in MessageReturnValueHandler 2013-06-24 11:47:59 -04:00
Rossen Stoyanchev 32cb2ca2e7 Remove generic params from Message/MessageChannel 2013-06-24 11:14:48 -04:00
Rossen Stoyanchev f7f66f2e5c Fix minor issue in ReactorMessageChannel 2013-06-24 09:59:27 -04:00
Phillip Webb 4830ea6065 Package RmiInvocationWrapperRTD.xml in jar
Ensure RmiInvocationWrapperRTD.xml is packaged inside spring-context.jar

Issue: SPR-10649
2013-06-23 23:49:05 -07:00
Phillip Webb eea230f2a8 Allow @CachePut 'key' SpEL to refer to #result
Allow the @CachePut 'key' SpEL to refer to the result of the method call
via a '#result' variable.

This change is particularly useful when working with JPA entities that
have generated @Id values since the ID will often not be available
until the entity has been saved.

Issue: SPR-10664
2013-06-23 09:07:16 -07:00
Phillip Webb f75d4e13a2 Polish cache abstraction code
Polish cache abstraction code and refactor CacheAspectSupport.
2013-06-23 09:07:16 -07:00
Sam Brannen b122ca688b Add missing @since tag to SimpleKey 2013-06-22 23:57:17 +02:00
Phillip Webb f1a18d29ba SimpleKeyGenerator to replace DefaultKeyGenerator
Introduce new SimpleKeyGenerator class to supersede DefaultKeyGenerator.
Unlike DefaultKeyGenerator, no collisions will occur with the keys
generated by SimpleKeyGenerator as the full parameter values are
considered within the SimpleKey.equals(...) method.

The SimpleKeyGenerator is now the default class used when no explicit
generator is configured.

Issue: SPR-10237
2013-06-21 12:21:29 -07:00
Phillip Webb c720d82596 Use 'Integer' not 'int' in queryForObject docs
Update queryForObject calls in the JDBC reference documentation to
use 'Integer.class' rather than the unsupported 'int.class'.

Issue: SPR-10651
2013-06-20 23:51:52 -07:00
Phillip Webb 8ed8ee2dfe Skip abstract beans in getBeansWithAnnotation()
Update BeanFactory.getBeansWithAnnotation() to skip any abstract
bean definitions.

Issue: SPR-10663
2013-06-20 22:48:30 -07:00
Phillip Webb a403e8f8b8 Inject @Configuration BeanFactory before autowire
Add EnhancedConfigurationBeanPostProcessor to inject the BeanFactory
into EnhancedConfiguration classes before the
AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues method
is called.

Prior to this commit it was possible for @Autowire in a @Configuration
class to invoke an enhanced configuration class method before the
BeanFactory was injected. This is due to the fact that the
AutowiredAnnotationBeanPostProcessor was called before
AbstractAutowireCapableBeanFactory.invokeAwareMethods().

Issue: SPR-10668
2013-06-20 20:21:18 -07:00
Rossen Stoyanchev 62e23363cb Fix getters to match setters in RMHA
Issue: SPR-10519
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev c6ecaacc03 Add getResult/hasResult methods to DeferredResult
Issue: SPR-10603
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev 9bc4663ead Add accept(String) method to mock request builder
Issue: SPR-10390
2013-06-20 20:57:24 -04:00
Rossen Stoyanchev 4b22558a06 Add HTTP method to RequestDataValueProcessor method
Issue: SPR-10041, SPR-10652
2013-06-20 20:57:24 -04:00
Phillip Webb 26fb880622 Add mvc: prefix to mapping samples in ref docs
Add 'mvc:' namespace prefix to 'mapping' and 'exclude-mapping' elements
in the reference documentation.

Issue: SPR-10670
2013-06-20 16:17:00 -07:00
Rossen Stoyanchev 2d8315fba0 Reverse SPR-10402 change that caused 3.2.3 regression
SPR-10402 in Spring Framework 3.2.3 treated empty request parameter
values as missing values, if the empty value was turned into a null
by a PropertyEditor or Converter. This caused the regression.

Issue: SPR-10578, SPR-10402, SPR-10584
2013-06-20 16:20:01 -04:00
Rossen Stoyanchev 55a212d4a0 Add @MessageExceptionHandler
Similar to @ExceptionHandler but for message processing. Such a method
can send messages to both the message broker channel and the client
channel provided the client is subscribed to the target destination.
2013-06-19 22:17:59 -04:00
Rossen Stoyanchev 01c4e458c7 Add support for "system" STOMP session
The "system" STOMP session is established at startup and can be used
to send messages without a client session, e.g. to support broadcasting
from a REST/HTTP handler method.
2013-06-19 18:54:51 -04:00
Rossen Stoyanchev 44db0f815a Add MessageHolder
MessageHolder holds the currently processed message in a ThreadLocal,
which allows PubSubMessageBuilder to automatically add a session id
to messages to be sent.
2013-06-19 15:30:23 -04:00
Rossen Stoyanchev 5cfc59d76d Refactor PubSubHeaders, StompHeaders, MessageBuilder
Rename to PubSubHeaderAccessor and StompHeaderAccessor
Move the renamed classes to support packages

Remove fromPayloadAndHeaders from MessageBuilder, just use
withPayload(..).copyHeaders(..) instead.
2013-06-19 11:41:43 -04:00
Rossen Stoyanchev 5feac07738 Add getLastHandler to WebSocketHandlerDecorator 2013-06-19 09:46:21 -04:00
Rossen Stoyanchev 811bb1b0c9 Improve synchronization checks in STOMP relay session 2013-06-19 08:28:58 -04:00
Andy Wilkinson 28174744a7 Fix race when flushing messages
The use of an AtomicBoolean and no lock meant that it was possible
for a message to be queued and then never be flushed and sent to the
broker:

1. On t1, a message is received and isConnected is false. The message
   will be queued.
2. On t2, CONNECTED is received from the broker. isConnected is set
   to true, the queue is drained and the queued messages are forwarded
3. On t1, the message is added to the queue

To fix this, checking that isConnected is false (step 1 above) and the
queueing of a message (step 3 above) need to be performed as a unit
so that the flushing of the queued messages can't be interleaved. This
is achieved by synchronizing on a monitor and performing steps 1
and 3 and synchronizing on the same monitor while performing step 2.

The monitor is held while the messages are actually being forwarded
to the broker. An alternative would be to drain the queue into
a local variable, release the monitor, and then forward the messages.
The main advantage of this alternative is that the monitor is held for
less time. It also reduces the theoretical risk of deadlock by not
holding the monitor while making an alien call. The downside of the
alternative is that it may lead to messages being forwarded out of
order. For this reason the alternative approach was rejected.
2013-06-19 11:02:10 +01:00
Rossen Stoyanchev d20dabf1fb Fix issue with obtaining WebSocketContainer 2013-06-18 20:57:33 -04:00
Rossen Stoyanchev 3c6c56fe0d Fix issue with obtaining WebSocketContainer 2013-06-18 20:55:22 -04:00
Rossen Stoyanchev 3f9da6f480 Add generic parameters to MessageHandler impls 2013-06-18 20:35:15 -04:00
Andy Wilkinson f6398e14d0 Received message's destination is default for resp
When an annotated handler returns a Message from a @SubscribeEvent
or @MessageMapping method and it contains no destination in its
headers, use the received message's destination as the response
message's destination.
2013-06-17 21:04:23 -04:00
Andy Wilkinson 7bb3b824c3 Genericize PubSubChannelRegistry
Without generics, extending AbstractPubSubChannelRegistry and using
a custom Message type requires some unpleasant casting and suppression
of warnings. By genericizing PubSubChannelRegistry and
AbstractPubSubChannelRegistry these problems can be avoided.
2013-06-17 21:03:24 -04:00
Rossen Stoyanchev 426875b4f6 Refactor StompRelayPubSubMessageHandler 2013-06-17 16:29:31 -04:00
Sam Brannen d5a5a4894f Add header name to ex. msg in HeaderResultMatchers
Prior to this commit, the longValue() in HeaderResultMatchers added the
expected response header name to generated assertion failure messages;
however, both string() methods did not. This made it more difficult to
analyze the cause of failed tests.

Furthermore, while investigating a solution for this issue it became
apparent that longValue() throws a NullPointerException if the response
does not contain the specified header.

This commit addresses these issues as follows:

 - All methods in HeaderResultMatchers now include the response header
   name in generated assertion failure messages.

 - HeaderResultMatchers.longValue() now avoids NullPointerExceptions by
   explicitly asserting that the response contains the specified header.

 - The unit tests in HeaderAssertionTests have been expanded to test
   most foreseeable use cases.

Issue: SPR-10659
2013-06-17 17:59:24 +02:00
Rossen Stoyanchev 3dabe21563 Remove PubSubChannelRegistryBuilder 2013-06-17 10:22:58 -04:00
Sam Brannen 8ad36ef812 Delete remaining JUnit 3.8 tests in spring-test
This commit deletes the remaining JUnit 3.8 tests in the spring-test
module that were still subclassing deprecated class hierarchies.

Issue: SPR-10499
2013-06-16 20:03:21 +02:00
Sam Brannen d25611dd40 Move MockMultHtServReqTests to correct package
This commit relocates MockMultipartHttpServletRequestTests to the
appropriate package.
2013-06-16 19:55:35 +02:00
Sam Brannen c06157acd3 @Ignore empty test methods in RootWacEarTests hierarchy 2013-06-16 19:47:18 +02:00
Sam Brannen 432f899b29 Reduce complexity in ContextLoaderUtilsTests
This commit refactors ContextLoaderUtilsTests into
AbstractContextLoaderUtilsTests and several specialized subclasses in
order to reduce to the growing complexity of ContextLoaderUtilsTests.
2013-06-16 17:54:55 +02:00
Sam Brannen d126620216 Remove superfluous not-null check in ContextLoaderUtils 2013-06-16 00:38:56 +02:00
Sam Brannen 4542f362eb Merge from sbrannen/SPR-10338
* SPR-10338:
  Introduce ActiveProfilesResolver in the TCF
2013-06-16 00:04:17 +02:00
Sam Brannen 044f51283b Introduce ActiveProfilesResolver in the TCF
Prior to this commit, the active bean definition profiles to use when
loading an ApplicationContext for tests could only be configured
declaratively (i.e., via hard-coded values supplied to the 'value' or
'profiles' attribute of @ActiveProfiles).

This commit makes it possible to programmatically configure active bean
definition profiles in tests via a new ActiveProfileResolver interface.
Custom resolvers can be registered via a new 'resolver' attribute
introduced in @ActiveProfiles.

Overview of changes:

 - Introduced a new ActiveProfilesResolver API.
 - Added a 'resolver' attribute to @ActiveProfiles.
 - Updated ContextLoaderUtils.resolveActiveProfiles() to support
   ActiveProfilesResolvers.
 - Documented these new features in the reference manual.
 - Added new content to the reference manual regarding the
   'inheritProfiles' attribute of @ActiveProfiles
 - Removed the use of <lineannotation> Docbook markup in the testing
   chapter of the reference manual for Java code examples in order to
   allow comments to have proper syntax highlighting in the generated
   HTML and PDF.

Issue: SPR-10338
2013-06-16 00:01:34 +02:00
Sam Brannen d4dcf4e4ec Merge from sbrannen/SPR-8032
* SPR-8032:
  Introduce TCP & UDP server port scanning utility
2013-06-15 13:51:27 +02:00
Sam Brannen f311bf3daf Introduce TCP & UDP server port scanning utility
Prior to this commit the Spring Framework did not provide a public means
for scanning for available server ports. However, the Spring Framework
internally used a FreePortScanner in integration tests within its own
test suite. Furthermore, Spring Integration 2.2 provides similar support
in a SocketUtils class in the spring-integration-test module.

This commit introduces SocketUtils in spring-core to replace the
FreePortScanner which was previously only used internally within
Spring's test suite. This new implementation is inspired by both Spring
Framework's FreePortScanner and Spring Integration's SocketUtils and
consequently attempts to merge the best of both previous
implementations.

Issue: SPR-8032
2013-06-15 13:46:32 +02:00
Rossen Stoyanchev 6f4cc4f170 Polish PubSubChannelRegistryBuilder 2013-06-14 22:24:03 -04:00
Rossen Stoyanchev 4f7d77f631 Add PubSubChannelRegistry and associated builder 2013-06-14 22:07:47 -04:00
Rossen Stoyanchev c5b1f02c3a Add MessageBuilder 2013-06-14 16:30:02 -04:00
Sam Brannen e12311e364 Polish Javadoc 2013-06-14 16:06:57 +02:00
Andy Wilkinson 3022f5e34f Make Message type pluggable
To improve compatibility between Spring's messaging classes and
Spring Integration, the type of Message that is created has been made
pluggable through the introduction of a factory abstraction;
MessageFactory.

By default a MessageFactory is provided that will create
org.springframework.messaging.GenericMessage instances, however this
can be replaced with an alternative implementation. For example,
Spring Integration can provide an implementation that creates
org.springframework.integration.message.GenericMessage instances.

This control over the type of Message that's created allows messages
to flow from Spring messaging code into Spring Integration code without
any need for conversion. In further support of this goal,
MessageChannel, MessageHandler, and SubscribableChannel have been
genericized to make the Message type that they deal with more
flexible.
2013-06-14 12:34:12 +01:00
Rossen Stoyanchev 641aaf4b6a Use tcp-reactor in StompRelayMessageHandler 2013-06-13 21:48:51 -04:00
Rossen Stoyanchev 78d1063e37 Replace use of PubSub header name literals 2013-06-13 15:24:49 -04:00
Rossen Stoyanchev d136d06eda Add method to create MessageHeaders in Message 2013-06-13 13:51:21 -04:00
Rossen Stoyanchev bfba9115a6 Merge pull request #1 from wilkinsona/assert-import
Correct the Assert imports
2013-06-13 09:15:29 -07:00
Andy Wilkinson 8cea9ca962 Correct the Assert imports
Import org.springframework.util.Assert rather than reactor.util.Assert
2013-06-13 15:44:01 +01:00
Rossen Stoyanchev 3712f73f38 Remove EventBus 2013-06-13 01:36:55 -04:00
Rossen Stoyanchev 3e0aac08dc Add SubscribableChannel and ReactorMessageChannel 2013-06-13 01:13:37 -04:00
Rossen Stoyanchev a1cfa3832e Polish 2013-06-13 01:13:04 -04:00
Phillip Webb b78dcc59fe Make ConfClassPostPro Ordered.HIGHEST_PRECEDENCE
Make ConfigurationClassPostProcessor Ordered.HIGHEST_PRECEDENCE in
case several BeanDefinitionRegistryPostProcessors are registered.

Issue: SPR-10645
2013-06-12 11:46:48 -07:00
Phillip Webb 2e2e9b8dd0 Improve support for @Conditional on @Configuration
Introduce new ConfigurationCondition interface allowing more
fine-grained control for @Conditional when used with @Configuration
beans.

Primarily added so that the evaluation of conditions that inspect bean
definitions can be deferred until all @Configuration classes have been
parsed.

Issue: SPR-10534
2013-06-12 11:45:20 -07:00
Rossen Stoyanchev c420f37137 Fix setting of message-id STOMP header 2013-06-12 13:39:35 -04:00
Rossen Stoyanchev 82dfd781d0 Consolidate STOMP WebSocketHandler class hierarchy 2013-06-12 09:43:40 -04:00
Rossen Stoyanchev ad41f095a1 Refactor STOMP and PubSub header message support 2013-06-11 17:07:48 -04:00
Rossen Stoyanchev e7dde941b7 Update STOMP MESSAGE frames with messageId 2013-06-11 10:49:31 -04:00
Rossen Stoyanchev d26b9d60e5 Refactor approach to working with STOMP headers 2013-06-11 01:52:32 -04:00
Rossen Stoyanchev 547167e8b4 Remove remaining Reactor event wrapping 2013-06-10 13:59:19 -04:00
Phillip Webb e10e16cd6b Support fall-back to ASM parsing @Configuration
Update ConfigurationClassParser to fall-back to ASM parsing if standard
annotation processing fails. This change allows @Conditional annotations
that refer to missing classes to work.

This commit also introduces a new inner SourceClass object that
encapsulates the conditional logic required when reading the source
classes.

Issue: SPR-10646
2013-06-10 09:25:34 -07:00
Rossen Stoyanchev 84c55f90db Make MessageHeaders non-final 2013-06-10 10:09:24 -04:00
Rossen Stoyanchev de899820c9 Add Message, MessageChannel and refactor stomp support 2013-06-09 19:36:46 -04:00
Sam Brannen 51d828816d Throw ISEs in MockHttpSession for invalid session
The Javadoc for several methods in HttpSession specifies that an
IllegalStateException must be thrown if the method is called on an
invalidated session; however, Spring's MockHttpSession did not implement
this behavior consistently prior to this commit.

This commit therefore ensures that the following methods in
MockHttpSession properly throw an IllegalStateException as defined in
the Servlet specification.

 - long getCreationTime()
 - long getLastAccessedTime()
 - Object getAttribute(String)
 - Object getValue(String)
 - Enumeration<String> getAttributeNames()
 - String[] getValueNames()
 - void setAttribute(String, Object)
 - void putValue(String , Object)
 - void removeAttribute(String)
 - void removeValue(String)
 - void invalidate()
 - boolean isNew()

Issue: SPR-7659
2013-06-09 16:38:04 +02:00
Sam Brannen ec5d81e78e Ensure method & requestURI are non-null in MHSR
Prior to this commit it was possible for the method and requestURI
fields in MockHttpServletRequest to be set to null.

This commit ensures that the method and requestURI fields are internally
stored as empty strings if the user sets them to a null value.

Issue: SPR-10643
2013-06-09 12:42:00 +02:00
Sam Brannen 86591e5e5a Support implicit ports in MHSR.getRequestURL()
Prior to this commit, MockHttpServletRequest.getRequestURL() always
included the server port number in the reconstructed request URL, even
for implicit ports (i.e., 80 and 443) and negative ports.

MockHttpServletRequest.getRequestURL() now omits the port number when
reconstructing a URL that has an implicit or negative port.

Issue: SPR-9726
2013-06-09 11:55:24 +02:00
Sam Brannen 97d152547d Reformatted GenericTypeResolverTests 2013-06-09 00:24:37 +02:00
Sam Brannen b305f0005b Add test to assess claims in SPR-10411
This commit verifies that the return type of a parameterized instance
factory method is properly resolved.

Issue: SPR-10411
2013-06-09 00:21:58 +02:00
Sam Brannen b3a693e356 Add test to assess claim in SPR-10330
This commit verifies that JdbcTestUtils.readScript() properly handles
SQL comments prefixed by tab characters.

Issue: SPR-10330
2013-06-08 21:45:29 +02:00
Sam Brannen bc9e4ab106 Polish method names in JdbcTestUtilsTests 2013-06-08 21:05:16 +02:00
Sam Brannen 34e8ee94c4 Add deleteFromTableWhere() to base classes in TCF
This commit introduces a deleteFromTableWhere() convenience method in
AbstractTransactionalJUnit4SpringContextTests and
AbstractTransactionalTestNGSpringContextTests that delegates to the
recently introduced method of the same name in JdbcTestUtils.

Issue: SPR-10639
2013-06-08 21:03:45 +02:00
Sam Brannen 96da406057 Upgrade to TestNG 6.8.5
Issue: SPR-10638
2013-06-08 20:21:06 +02:00
Sam Brannen 96e1fbc3bb Polish @Conditional Javadoc and tests 2013-06-08 17:49:54 +02:00
Phillip Webb 239ce1466c Update @Conditional processing logic
Defer @Conditional processing on @Configuration classes until the bean
definitions are loaded, rather than when the @Configuration class is
parsed. This provides better support for @Conditional implementations
that inspect bean definitions.

This commit also fixes some minor problems with original implementation
and replaces the ConditionalAnnotationHelper class with
ConditionEvaluator.

Issue: SPR-10534
2013-06-04 10:27:51 -07:00
Phillip Webb 2ecc51f066 Do not consider all @Components as configuration
Update ConfigurationClassUtils to only consider beans with @Bean
methods as 'lite' configuration candidates.

Prior to this commit all @Component beans were considered 'lite'
configuration candidates which could result in a large number of
ConfigurationClass instance being created that would ultimately be
ignored.

Issue: SPR-10609
2013-06-04 10:26:31 -07:00
Phillip Webb a8fd832818 Support meta @Component with non-string value
Update AnnotationBeanNameGenerator to only use the value attribute of
a @Component meta-annotated annotation when it is a String.

Issue: SPR-10580
2013-06-04 10:23:23 -07:00
Phillip Webb 5377fae7f5 Remove duplicate Javadoc line from PathResource
Remove duplicate Javadoc comment from PathResource that was
accidentally introduced during the merge.

Issue: SPR-10608
2013-06-03 22:10:57 -07:00
Rossen Stoyanchev 8913283ce0 Add AnnotationStompService 2013-06-03 19:35:40 -04:00
Phillip Webb 5006dcd0ec Merge pull request #295 from marschall/SPR-10608
# By Philippe Marschall
* SPR-10608-rebase:
  Introduce java.nio.file.Path based Resource
2013-06-03 16:25:56 -07:00
Philippe Marschall 2313c9a007 Introduce java.nio.file.Path based Resource
Develop new org.springframework.core.io.Resource implementation
backed by java.nio.file.Path. Primarily developed to allow custom
file system implementations to be used with Spring.

Since the minimum requirement for Spring is still Java 6 the
existing FileSystemResource can't be retrofitted (and no #getPath
method can be added to the Resource interface).

Unlike FileSystemResource, PathResource delegates to the underlying
file system instead of StringUtils. It has therefore slightly
different semantics. First, when building relative resources via
createRelative the relative path will apply to this path (like URL or
Unix). Second, equality is delegated to the underlying file system
provider so it's case-insensitive on Windows.

Issue: SPR-10608
2013-06-03 16:25:45 -07:00
Phillip Webb 1f5467a29d Merge pull request #286 from sslavic/SPR-10571
# By Stevo Slavic
* SPR-10571:
  Replace MaxPermSize use in build scripts
2013-06-03 14:10:33 -07:00
Stevo Slavic ecf8464d2f Replace MaxPermSize use in build scripts
Since JDK 8 is required to build Spring framework 4, and permanent
generation is gone from Java 8, to eliminate warnings about no longer
available MaxPermSize switch, it should be removed or replaced with new
MaxMetaspaceSize switch.

This fix replaces old with new switch to limit the amount of native
memory used for class metadata.

Issue: SPR-10571
2013-06-03 14:09:33 -07:00
Phillip Webb 4d3383242e Support EnvironmentAware ImportSelector/Registrar
Add support for the EnvironmentAware interface with ImportSelector
and ImportBeanDefinitionRegistrar implementations.

Issue: SPR-10602
2013-06-03 12:19:47 -07:00
Phillip Webb d7ec20a286 Test for property placeholder with defaults
Test property placeholder with multiple locations and default values.

Issue: SPR-10619
2013-06-03 09:37:43 -07:00
Carson McDonald ae74a2158a Fix typo {explictly => explicitly}
- cherry-pick of pull request #257, which originally applied to 3.2.x
2013-05-31 08:22:36 +02:00
Rossen Stoyanchev b194d4d6a0 Add AbstractStompService 2013-05-30 15:29:46 -04:00
Rossen Stoyanchev 4de40fad8e Refactor STOMP package and class names 2013-05-30 15:29:20 -04:00
Rossen Stoyanchev 2b5acbda99 Add handling for remaining STOMP server commands 2013-05-30 15:28:42 -04:00
Rossen Stoyanchev 69ef364ef9 Introduce messaging package
org.springframework.web.stomp is now
org.springframework.web.messaging.stomp

Also classes in the ~.stomp.server and ~.stomp.adapter packages have
been renamed.
2013-05-30 15:28:42 -04:00
Rossen Stoyanchev c67b694339 Add STOMP service that relays messages to STOMP broker 2013-05-30 15:28:42 -04:00
Rossen Stoyanchev 3eac62925b Add basic stomp error handling 2013-05-30 15:28:42 -04:00
Rossen Stoyanchev 730d456e84 Add early STOMP/reactor support 2013-05-30 15:28:42 -04:00
Rossen Stoyanchev 827e20e37f Upgrade javax.websocket and tyrus dependencies to 1.0 2013-05-30 15:25:01 -04:00
Phillip Webb e63ee1ee5a Fixed typo in docbook id
Issue: SPR-10394
2013-05-28 14:25:57 -07:00
Chris Beams ba45f70342 Merge pull request #291 from dsyer/10579
# By Chris Beams (1) and Dave Syer (1)
* SPR-10579:
  Polish pull request #291 per committer guidelines
  Make CommandLinePropertySource enumerable
2013-05-28 13:52:01 +02:00
Chris Beams 46d47fef9a Polish pull request #291 per committer guidelines
- Update Apache license headers
 - Remove trailing whitespace
 - Edit original commit comment to use 'Issue:' syntax
 - Revert use of diamond operator (<>) in main sources

See committer guidelines at
https://github.com/SpringSource/spring-framework/blob/master/CONTRIBUTING.md

Issue: SPR-10579
2013-05-28 13:51:35 +02:00
Dave Syer 7860af8624 Make CommandLinePropertySource enumerable
JOpt 4.4 has enumerable options, so this change can be made
if we upgrade. The only awkward thing is that JOpt allows
aliases for options, so we have to pick one to avoid double
counting. This implementation picks the last one in the list
which is the alphebtically last of the long options, if there
are any (e.g. "o1", "option1" returns "option1"). Most of the
time there will only be one or two aliases for each option so
it won't matter.

Issue: SPR-10579
2013-05-28 12:57:01 +02:00
Chris Beams 3c73a8fc4f Instruct contributors to branch from master 2013-05-28 13:54:14 +03:00
Sam Brannen 00fea1f715 Fix minor typo in README.md 2013-05-26 14:28:37 +02:00
Rob Winch 07b7553355 Fix MergePlugin
The submitted pull requests for SPR-10572 did not build.

This commit fixes the MergePlugin to create from configurations rather
than the project. It also removes unnecessarily added code that was
commented out.

Issue: SPR-10572
2013-05-22 14:57:22 -05:00
Stevo Slavic bf205bfe79 Eliminate Gradle 1.6 deprecation warnings
Recently Spring framework build has been updated to use Gradle 1.6.
With the new version some of the Gradle APIs have been deprecated.
These deprecated APIs have been used by Spring build specific Gradle
plugins, which resulted in deprecation warnings in build output.

This patch changes Spring build specific Gradle plugins to use new
Gradle APIs instead of deprecated ones.

Even after this change build still produces warnings about Gradle
deprecated APIs being used. These come from Spring shared Gradle
plugins and other 3rd party Gradle plugins in use, like Gradle
Artifactory Plugin (GAP), which are still not updated to Gradle 1.6.
Related tickets for updating of these plugins to Gradle 1.6 are
GRADLE-53 and GAP-144, and once they get resolved Spring framework
build should further be updated.

Issue: SPR-10572
2013-05-22 14:57:21 -05:00
Chris Beams 3865a8706c Revise note on avoiding "lambda" JDK 2013-05-22 10:06:13 +02:00
Chris Beams eae0f8b53a Merge pull request #288 from dsyer/patch-1
Update README adding explicit JDK instructions
2013-05-22 00:58:23 -07:00
Chris Beams 08f255d746 Mention JDK 8 in IDE import instructions 2013-05-22 09:55:18 +02:00
Chris Beams d97f6cf5b8 Clarify instructions for building from source
Re-order subsections to make it clear that running a full
`./gradlew build` is not necessary just to import projects
into your IDE or to build and install jars to your .m2 cache.
2013-05-22 09:48:14 +02:00
Dave Syer c3a5b415cf Update README adding explicit JDK instructions 2013-05-22 09:37:29 +02:00
Spring Buildmaster f9b5b1df53 Increment version to 4.0.0.BUILD-SNAPSHOT 2013-05-17 09:55:02 -07:00
Spring Buildmaster 9ee292aaf7 Release version 4.0.0.M1 2013-05-16 21:43:41 -07:00
Phillip Webb 6fe50b502f Enforce JDK version on CI server
Add a test to ensure that the CI server does not accidentally build
with the wrong JDK version.

Issue: SPR-10569
2013-05-16 17:06:30 -07:00
Rossen Stoyanchev 87a9602f65 Fix bug in WebSocketClient implementations 2013-05-16 19:12:27 -04:00
Rossen Stoyanchev fb4e34fce4 Add partial WebSocketMessage support 2013-05-16 12:17:40 -04:00
Juergen Hoeller 814d24e64f Consistent detection of Order annotation in superclasses and interfaces
Issue: SPR-10514
2013-05-16 18:05:56 +02:00
Juergen Hoeller 16548d23e9 Consistent use of Class<?> in Assert 2013-05-16 16:10:36 +02:00
Juergen Hoeller a19c976f7f Avoid NPE in ContextLoader when dealing with an untyped ApplicationContextInitializer
Issue: SPR-10449
2013-05-16 16:09:54 +02:00
Juergen Hoeller c8b071c89e Fixed BeanPropertyRowMapper to only prefix actual upper-case letters with underscores
Issue: SPR-10547
2013-05-16 14:33:15 +02:00
Juergen Hoeller cd3d0c35c3 Replaced Map synchronization with ConcurrentHashMap to avoid session access deadlocks
Issue: SPR-10436
2013-05-16 14:33:14 +02:00
Rossen Stoyanchev 81bce424cb Fix bug with deriving SockJS path 2013-05-15 21:31:51 -04:00
Juergen Hoeller 28164b4b23 Introduced "jsonPrefix" bean property
This change involves a modification of the "writeContent" template method to include the "jsonPrefix" String instead of the "prefixJson" boolean flag. Since said template method has only been introduced in 3.2.2, this change should hopefully not be a problem.

Issue: SPR-10567
2013-05-15 23:54:51 +02:00
Juergen Hoeller 7e01578515 Avoid unnecessary creation of default StandardEnvironment instances
Issue: SPR-10568
2013-05-15 23:41:32 +02:00
Juergen Hoeller 7cddeb6db9 Polishing 2013-05-15 17:19:57 +02:00
Juergen Hoeller 070103b17e Fixed type detection to avoid reuse of parent bean's targetType on child definition merge
Issue: SPR-10374
2013-05-15 16:41:32 +02:00
Juergen Hoeller 3f7007f73a Properly handle knownSuperclasses in case of an overridden ConfigurationClass
Issue: SPR-10546
(cherry picked from commit 6e4317e)
2013-05-15 14:30:32 +02:00
Rob Winch d1859c8c86 Ensure Parent ConfigurationClass loaded on overrides
Previously ConfigurationClassParser could override a nested
@Configuration without consideration of @Bean's defined in parent
classes.

This commit ensures that if the original ConfigurationClass contains
additional bean definitions it is processed again.

Issue: SPR-10546
(cherry picked from commit 940011e)
2013-05-15 14:24:25 +02:00
Rossen Stoyanchev a86283eb28 Make removal of jsessionid case insensitive
Issue: SPR-10398
2013-05-14 22:06:59 -04:00
Rossen Stoyanchev d23de282a6 Reinstate removal of semicolon content
Commit 5b1165 was an attempt to leave semicolon content in the URL path
while ignoring it for request mapping purposes. However, it becomes
quite difficult to manage and semicolon content should not always be
ignored (sometimes a semicolon is used as a separator of multiple items
in a path segment, rather than for matrix variables).

This change effectively reverts back to the original approach in 3.2
where a flag on AbstractHandlerMapping can be used to have semicolon
content removed or kept. If kept, path segments with matrix variables
must be represented with a path segment.

The main difference is that by default it is removed everywhere
including the MVC namespace and Java config.

Issue: SPR-10427, SPR-10234
2013-05-14 21:32:09 -04:00
Rossen Stoyanchev db596d23de Fix deadlock issue in DeferredResult
Previously DeferredResult locked around the setting of the result
including handling up to the part of submitting a dispatch. This
can cause a deadlock if a timeout occurs at the same time since
the Tomcat timeout thread has its own locking that permits only
one thread to do timeout or dispatch processing.

The fix reduces the locking to cover only the attempt to set the
DeferredResult but not the dispatching.

Issue: SPR-10485
2013-05-14 17:01:46 -04:00
Rossen Stoyanchev 6825aaf41f Add Javadoc 2013-05-14 16:41:47 -04:00
Juergen Hoeller 59ef34d769 Polishing 2013-05-14 21:20:24 +02:00
Juergen Hoeller 5dbbd8fe72 Clarified that CronTrigger never schedules overlapping executions
Issue: SPR-10556
2013-05-14 21:16:04 +02:00
Rossen Stoyanchev 278a5924cb Remove isLast flag from WebSocketMessage 2013-05-14 14:32:25 -04:00
Rossen Stoyanchev 9ca03cf772 Upgrade spring-websocket to Jetty 9.0.3 2013-05-14 14:30:55 -04:00
Rossen Stoyanchev 05084d504b Add spring-websocket module tests 2013-05-14 13:59:15 -04:00
Rob Winch 6a5acb9372 Update to Gradle 1.6 2013-05-14 12:24:00 -05:00
Juergen Hoeller 14617447a6 Consistent use of Class<?> in core container method signatures 2013-05-14 17:44:06 +02:00
Juergen Hoeller bc3e5851b3 Detect a FactoryBean type match even if predictBeanType returned a non-FactoryBean type
This change should be the final piece in the puzzle to let SmartInstantiationAwareBeanPostProcessor's predictBeanType predict a FactoryBean-produced type, effectively as a semantic alternative to its postProcessBeforeInstantiation-related role.

Issue: SPR-10517
2013-05-14 17:43:13 +02:00
Juergen Hoeller 25e29b851d GenericTypeResolver defensively calls Class.getGenericSuperclass() and consistently uses Class<?>
Issue: SPR-10559
2013-05-14 16:02:52 +02:00
Rob Winch 23737a4516 Update the README to use JDK1.8 b88 2013-05-14 08:54:25 -05:00
Rob Winch 9468548116 Add @Override to remaining source files
Issue: SPR-10130
2013-05-13 17:04:56 -05:00
Rossen Stoyanchev 30db112d37 Close InputStream in ResourceHttpMessageConverter
Spring 3.2.2 introduced a change to avoid closing the response stream
in HttpMessageConverters (SPR-10095). However, the InputStream of
resources being written, for example as part of a multi-part request
should be closed. This change ensures that.

Issue: SPR-10460
2013-05-10 17:31:11 -04:00
Sam Brannen 6fa493908b Hoellereasymock --> Hoeller 2013-05-10 22:13:23 +02:00
Juergen Hoeller 1f0f46fb06 ServletContextResourcePatternResolver uses encoded jar file location for UrlResource
Adding overloaded constructors for URI specification to UrlResource, as a convenience.

Issue: SPR-10471
2013-05-10 22:11:40 +02:00
Rossen Stoyanchev 0634555424 Delay check if pattern ends with slash
This is a minor fix with no actual impact.

Issue: SPR-10504
2013-05-10 12:47:44 -04:00
Rossen Stoyanchev e39fe1822d Allow treating empty @RequestParam as missing value
If type conversion turns an empty request parameter value (i.e. "") to
null, we should treat it as a missing value. By default the
ConversionService doesn't change empty strings and therefore one must
explicitly convert them to null for example by registering a
StringTrimmerEditor with emptyAsNull=true.

Issue: SPR-10402
2013-05-10 12:31:00 -04:00
Rossen Stoyanchev c0cacfcd68 Add servletRelativeAction form tag attribute
A recent change in FormTag to prepend the context and servlet paths if
not present, causes issues when used in portlet applications.
This change introduces a servletRelativeAction form tag attribute that
must be used for the context and servlet paths to be prepended.

Issue: SPR-10382
2013-05-10 11:56:50 -04:00
Rossen Stoyanchev aaded7e30b Improve default content type selection
Previously ContentNegotiationManager continued with the next
ContentNegotiationStrategy only if the current one returned an empty
list. Now it also does that if the current ContentNegotiationStrategy
returns "*/*". Since the absence of an Accept header and "*/*" have
the same meaning, this allows a default content type to be used in
either case.

Issue: SPR-10513
2013-05-10 11:10:15 -04:00
Rossen Stoyanchev 78fcd28389 Invoke global, then local @InitBinder/@ModelAttribute
@InitBinder and @ModelAttribute methods in @ControllerAdvice classes
are now invoked first, allowing any such methods in the @Controller
class to override them.

Issue: SPR-10419
2013-05-10 10:42:42 -04:00
Juergen Hoeller 640555194b Introduced assertions for bean accessor delegation in AbstractApplicationContext
Issue: SPR-10307
2013-05-10 01:32:00 +02:00
Phillip Webb 30b21a987e Make @Configuration classes thread-safe
Refactor ConfigurationClassEnhancer so that BeanFactory instances are
not held against CGLIB Callback objects. Enhanced @Configuration classes
now use the BeanFactoryAware interface in order to obtain a BeanFactory.

This change has the additional benefit that a static final field can
now be used to hold all Callback instances.

Issue: SPR-10307
2013-05-09 15:05:40 -07:00
Phillip Webb 8b904102ff Update ...DirtiesContextTests to get beans early
Change ContextHierarchyDirtiesContextTests to obtain beans whilst the
ApplicationContext is still open, rather than trying to obtain them
after the context has been closed.
2013-05-09 14:57:16 -07:00
Phillip Webb 3126a4cf46 Merge branch 'SPR-10534'
* SPR-10534:
  Add support for DeferredImportSelector
  Support for @Conditional configuration
  Extend AnnotationMetadata and MethodMetadata
2013-05-08 19:56:43 -07:00
Phillip Webb 7c7fdb0736 Add support for DeferredImportSelector
Add DeferredImportSelector interface that can be used to select imports
after all @Configuration beans have been processed.
2013-05-08 19:41:20 -07:00
Phillip Webb b257253a2b Support for @Conditional configuration
Introduce new @Conditional annotation that can be used to filter
which @Configuration classes or methods are loaded. @Conditional
can be used directly or as a meta-annotation. Condition implementations
are provided via the 'Condition' interface and are free to filter based
on any criteria available at the time that they run. The
ConditionalContext provides access to the BeanDefinitionRegistry,
Environment and ConfigurableListableBeanFactory along with a
ResourceLoader and ClassLoader.

The existing @Profile annotation has been refactored as a @Conditional
with the added benefit that it can now be used as a method level
annotation.
2013-05-08 19:41:20 -07:00
Phillip Webb 8e445f3a21 Extend AnnotationMetadata and MethodMetadata
Update AnnotationMetadata and MethodMetadata to extend from a new
AnnotatedTypeMetadata base interface containing the methods that are
common to both. Also introduce new getAllAnnotationAttributes methods
providing MultiValueMap access to both annotation and meta-annotation
attributes.

Existing classreading and standard implementations have been
refactored to support the new interface.
2013-05-08 19:41:20 -07:00
Phillip Webb eb1776e79d Allow access to applied property sources
Add PropertySourcesPlaceholderConfigurer.getAppliedPropertySources() to
allow access to the PropertySources that were actually applied.

Issue: SPR-10545
2013-05-08 19:40:57 -07:00
Phillip Webb 0652febe34 Make Make ClassPathContextResource protected
Allow ClassPathContextResource to be accessed by subclasses of
DefaultResourceLoader.

Issue: SPR-10544
2013-05-08 15:16:43 -07:00
Phillip Webb 13e460827e Fix external Javadoc references. 2013-05-08 15:16:18 -07:00
Phillip Webb e9a2e688cb Allow late binding ServletContextAwareProcessor
Update ServletContextAwareProcessor to allow subclasses to support late
binding of the ServletConfig and/or ServletContext. Allows for the
post-processor to be registered before the servlet environment has been
initialized.

Issue: SPR-10381
2013-05-08 15:15:08 -07:00
Phillip Webb 19187fd365 Allow FrameworkServlet to be used as a bean
Change FrameworkServlet so that it can also be used as a bean within an
existing ApplicationContext. Primarily added to support use with
embedded servlet containers where Spring bootstraps the servlet
container, rather than the servlet container bootstrapping Spring.

Issue: SPR-10381
2013-05-08 15:14:58 -07:00
Chris Beams eaf8115d59 Update README.md
- Remove references to python and .net variants
 - Update prereqs for building from source to JDK 1.8
2013-05-08 10:27:13 +03:00
Juergen Hoeller cd1c584243 Reordered spring-websocket module descriptor 2013-05-08 00:02:14 +02:00
Juergen Hoeller ad886503f1 Revised ReflectiveMethodResolver to properly handle any kind of List returned from a MethodFilter
Issue: SPR-10392
2013-05-07 21:56:17 +02:00
Juergen Hoeller 35847ad003 Fixed MockMvc example code
Issue: SPR-10389
2013-05-07 21:38:45 +02:00
Juergen Hoeller 2a44228b98 Consistent use of <pre class="code">
Issue: SPR-8108
2013-05-07 21:31:26 +02:00
Juergen Hoeller 1ca943c681 Fixed javadoc warnings
Issue: SPR-10373
2013-05-07 21:26:01 +02:00
Juergen Hoeller fcb0cf27d7 MappingJackson(2)HttpMessageConverter alignment 2013-05-07 18:11:55 +02:00
Juergen Hoeller a0c377b91b MappingJackson(2)MessageConverter needs to use bean ClassLoader 2013-05-07 18:11:54 +02:00
Juergen Hoeller 527776cde4 Removed JDK 8 workaround (not necessary anymore with build 88) 2013-05-07 18:11:53 +02:00
Juergen Hoeller 2c3a8a5309 Removed parsing support for the 'singleton' attribute in an XML bean definition
Following the introduction of spring-beans-4.0.xsd and the corresponding removal of the pre-2.0 spring-beans.dtd.

Issue: SPR-10437
2013-05-07 18:11:52 +02:00
Juergen Hoeller 0fc5a5d912 Introduced 4.0 versions of all XML configuration schemas
Removed spring-beans.dtd (the 1.x variant) and spring-oxm-1.5.xsd (pre-Spring-Framework variant), in order to raise the backwards compatibility limit a little bit at least. We'll keep supporting the 2.0 and 2.5 xsd versions for the time being, as well as spring-beans-2.0.dtd.

Removed the ref 'local' attribute in spring-beans-4.0.xsd since 'local' lost its differentiating role to a regular bean ref back in the 3.1 days when we started allowing for the same bean id to reappear in a different beans section of the same configuration file (with a different profile).

Issue: SPR-10437
2013-05-07 18:11:51 +02:00
Phillip Webb e1c25ff1a3 Workaround jasper report test fail on OSX
Add temporary Assume.canLoadNativeDirFonts() method allowing failing
jasper report tests to be bypassed on OSX.

This should be revisited when JDK 8 is released.

Issue: SPR-10537
2013-05-07 08:23:46 -07:00
Rossen Stoyanchev 043aafed86 Fix build version 2013-05-07 08:19:03 -04:00
Phillip Webb 71f6da673a Consider @Import classes as lite @Configuration
Allow classes that are annotated with @Import to be considered as 'lite'
@Configuration candidates. Allows the AnnotationConfigApplicationContext
to directly register @Import beans even if they are not @Components.

Issue: SPR-10533
2013-05-06 16:00:59 -07:00
Phillip Webb d91ffb6a59 Filter source @Configuration with @ComponentScan
Exclude self @Component when parsing @ComponentScan annotations.

Issue: SPR-10531
2013-05-06 15:53:20 -07:00
Phillip Webb db0d780d43 Support *Aware ImportSelectors
Implementations of Spring's ImportSelector interface may
now implement any of the following *Aware interfaces and have their
respective methods called prior to #registerBeanDefinitions:

 - BeanFactoryAware
 - BeanClassLoaderAware
 - ResourceLoaderAware

Issue: SPR-10530
2013-05-06 15:43:52 -07:00
Phillip Webb f05d0885ef Add AnnotationConfigApplicationContext constructor
Add AnnotationConfigApplicationContext constructor allow use of a
custom DefaultListableBeanFactory.

Issue: SPR-10529
2013-05-06 15:36:32 -07:00
Phillip Webb 2c887248f0 Make SpringFactoriesLoader.loadFactoryNames public
Update the SpringFactoriesLoader static loadFactoryNames method from
private to public.

Issue: SPR-10528
2013-05-06 15:32:52 -07:00
Phillip Webb a22bb43c0c Include cglib repack in core 2013-05-06 15:29:36 -07:00
Phillip Webb 84e4244793 Use source 1.7 until eclipse supports JDK 8
Specifically set the source level in generated eclipse projects to 1.7
rather than 1.8. Allows the current eclipse milestone (4.3 M6) in
combination with JDK 8.0 to be used for Spring 4.0 development.
2013-05-06 15:21:24 -07:00
Rossen Stoyanchev 59e6298c82 Merge remote-tracking branch 'upstream/master' 2013-05-06 16:44:35 -04:00
Rossen Stoyanchev 37c6a94905 Update deps for spring-websocket 2013-05-06 16:42:42 -04:00
Sam Brannen d01d95118b Stop suppressing warnings for deleted deprecations
This commit removes the use of @SuppressWarnings("deprecation") for
code in the spring-test module that no longer references deprecated code.

Issue: SPR-10499
2013-05-06 21:29:49 +02:00
Rossen Stoyanchev e7f38e5b17 Merge branch 'websocket' 2013-05-06 14:46:29 -04:00
Rossen Stoyanchev d89b18613f Polish (minor) 2013-05-06 14:33:00 -04:00
Rossen Stoyanchev 7845ebc428 Add SockJS path detection 2013-05-05 20:51:37 -04:00
Sam Brannen 72d5a32104 Added schema version to test XML config file
This commit adds an explicit version to the updated XML configuration
file in order to avoid build errors in IntelliJ IDEA 12.
2013-05-05 21:50:34 +02:00
Sam Brannen 95c1255452 Updated JdkVersion regarding Java 9 support
- JdkVersion#JAVA_19 is now properly set to 6 instead of 5.
 - Javadoc for getMajorJavaVersion() now references currently supported
   Java versions.
2013-05-05 16:19:11 +02:00
Juergen Hoeller b9ca0fb947 Compatibility of JDK 8 compiled reflection API usage with JDK <8 runtimes
Specifically, we need to avoid "... ? this.method : this.constructor" expressions since those potentially select java.lang.reflect.Executable (which is only available on JDK 8) as common type and hardcode this into the generated bytecode (which therefore becomes JDK 8 dependent).
2013-05-03 17:28:58 +02:00
Juergen Hoeller 255eab5bed Jaxb2Marshaller doesn't need to depend on ResourceLoaderAware
Issue: SPR-10512
2013-05-03 17:23:24 +02:00
Juergen Hoeller 2a53a2de0e Raised Hibernate Validator support dependency to 4.3+
This allows for restoring a static MessageSourceResourceBundleLocator implementation, just implementing the interface at the new spi location introduced in HV 4.3 and preserved in 5.0.

Issue: SPR-8199
2013-05-03 15:37:02 +02:00
Juergen Hoeller cac76192e2 Added "postProcessConfiguration" template method to LocalValidatorFactoryBean 2013-05-03 15:04:18 +02:00
Juergen Hoeller ddbcf62edd Replaced shared editor usage with PropertyEditorRegistrar 2013-05-03 13:56:57 +02:00
Juergen Hoeller 532de1a259 Polishing 2013-05-03 13:45:56 +02:00
Juergen Hoeller c3b624df29 Polished UriComponents implementation 2013-05-03 13:22:11 +02:00
Juergen Hoeller f4b97c26df Removed UriTemplate's unused encodeUri template method 2013-05-03 13:02:19 +02:00
Juergen Hoeller 61c3f3d9fd Removed support for deprecated registerSharedEditor mechanism 2013-05-03 11:49:53 +02:00
Rossen Stoyanchev 97d225ba75 Refactor packages
org.springframework.websocket  -> org.springframework.web.socket
org.springframework.sockjs     -> org.springframework.web.socket.sockjs

Flatten .sockjs and .sockjs.server
2013-05-02 20:39:54 -04:00
Rossen Stoyanchev 4faf0d265f Rename classes 2013-05-02 20:25:09 -04:00
Rossen Stoyanchev 2a7935a913 Add WebSocketSession attributes + initialization
In addition to adding the attributes, there is now mechanism for
initializing WebSocketSession instances from attributes of the
handshake request.
2013-05-02 13:47:18 -04:00
Juergen Hoeller 0a8f5b2919 Removed deprecated helper classes and methods (that have been deprecated since 3.0 or before) 2013-05-02 17:25:10 +02:00
Juergen Hoeller 17610c2523 Added note on non-thread-safety of Jackson's DateFormat support 2013-05-02 16:09:30 +02:00
Juergen Hoeller 767bd3f3f8 Upgraded to Jackson 1.9 (raising minimum to 1.8+) and 2.2 2013-05-02 15:51:59 +02:00
Juergen Hoeller 9f9b972f00 Prepared for JDK 1.9
Aiming for the JdkVersion class to support one generation ahead now, in order for the test suite to properly detect 1.7/1.8+ JVMs even when running against a JDK 1.9 preview at some point.
2013-05-02 11:40:16 +02:00
Juergen Hoeller 47103ed1b3 Link to JIRA change log instead of local changelog.txt file 2013-05-02 11:37:26 +02:00
Rossen Stoyanchev 166ca7a5a3 Update exception handling
Allow WebSocketHandler methods to raise an exception.

By default we install ExceptionWebSocketHandlerDecorator, which logs
unhandled exceptions and closes the session. That decorator can be
extended or replaced.

Any exceptions that remain unhandled still (i.e. no exception handling
decorator), are caught in the lowest level before propagating to the
WebSocket engine or a SockJS transport handler and handled the same
way. That means default behavior is guaranteed but also fully
customizable.
2013-05-01 16:04:58 -04:00
Rossen Stoyanchev 9ca4672300 Fix handshake handling issue 2013-05-01 14:18:25 -04:00
Rossen Stoyanchev 46bcffcf30 Add JettyWebSocketClient
Also split out JSR-356 related configuration and load it conditionally.
2013-04-30 17:35:20 -04:00
Juergen Hoeller 5ff2653d92 Added "getName()" accessor to MethodReference
Issue: SPR-10422
2013-04-30 22:37:34 +02:00
Juergen Hoeller f374b7ae2b Fixed typo in code example
Issue: SPR-10394
2013-04-30 22:10:26 +02:00
Juergen Hoeller 6be954e4cd Removed references to deprecated queryForInt method from documentation
Issue: SPR-10257
2013-04-30 22:09:50 +02:00
Juergen Hoeller 657bd80bf9 Removed unnecessary CGLIB 2.2 dependency from spring-test-mvc module 2013-04-30 22:09:17 +02:00
Juergen Hoeller 0ea17c8382 Allow for reuse of key visitor classes in tooling
Based on https://github.com/SpringSource/spring-framework/pull/263
2013-04-30 21:31:22 +02:00
Juergen Hoeller 06fdfb0b0d Fixed annotation attribute processing for enum arrays
Based on https://github.com/SpringSource/spring-framework/pull/263
2013-04-30 21:30:27 +02:00
Juergen Hoeller 161530da21 Temporarily deactivated DetectSplitPackagesPlugin due to failure on JDK 8 on CI server 2013-04-30 17:07:01 +02:00
Juergen Hoeller 89de99e871 Fixed javadoc build on JDK 8 (deactivating the super-strict doclint checks) 2013-04-30 15:56:40 +02:00
Juergen Hoeller 1295c6f340 Upgraded to Hessian 4.0.7; deprecated Burlap support 2013-04-30 15:13:23 +02:00
Rossen Stoyanchev f45ef75f95 Add WebSocketHandlerDecorator 2013-04-29 22:36:20 -04:00
Rossen Stoyanchev ba87743087 Polish (minor) 2013-04-29 10:17:57 -04:00
Sam Brannen bee3263322 Initial changelog entries for 4.0 M1 2013-04-28 19:24:52 +02:00
Sam Brannen 88e514bd56 Delete deprecated code in the TestContext framework
This commit deletes the deprecated SimpleJdbcTestUtils class as well as
remaining usage of SimpleJdbcTemplate within the TestContext framework
and its test suite.

Issue: SPR-10499
2013-04-28 19:10:53 +02:00
Sam Brannen 2685818e91 Delete deprecated code in the TestContext framework
This commit deletes the deprecated @ExpectedException and
@NotTransactional annotations, supporting code, and related Javadoc and
reference documentation.

Issue: SPR-10499
2013-04-28 17:31:54 +02:00
Sam Brannen eb65b2b083 Delete deprecated code in the TestContext framework
This commit deletes the deprecated JUnit 3.8 support in the TestContext
Framework.

Issue: SPR-10499
2013-04-28 16:05:49 +02:00
Sam Brannen 4525068f56 Remove JUnit 3.8 based test class hierarchy
This commit picks up where 74021b9 left off.
2013-04-28 13:00:09 +02:00
Sam Brannen cb2ffb79e4 Set Ant build.compiler to javac1.7 2013-04-28 12:39:27 +02:00
Rossen Stoyanchev f347988428 Remove parameterized type from WebSocketHandler 2013-04-27 05:56:46 -04:00
Rossen Stoyanchev 0c1b329949 Remove HandlerProvider 2013-04-26 21:59:04 -04:00
Rossen Stoyanchev 861ab900ae Switch to single message method for WebSocketHandler 2013-04-26 12:04:45 -04:00
Rossen Stoyanchev 5f22cf0532 Add WebSocketHandlerInvoker class 2013-04-25 23:12:21 -04:00
Phillip Webb db2c2480db Javadocs and general formatting polish 2013-04-25 16:47:25 -07:00
Rossen Stoyanchev 9da2c21edb Consolidate WebSocketHandler interface and sub-interfaces 2013-04-25 19:01:49 -04:00
Rossen Stoyanchev 8200601ace Tighten up exception handling strategy
WebSocketHandler implementations:
- methods must deal with exceptions locally
- uncaught runtime exceptions are handled by ending the session
- transport errors (websocket engine) are passed into handleError

WebSocketSession methods may raise IOException

SockJS implementation of WebSocketHandler:
- delegate SockJS transport errors into handleError
- stop runtime exceptions from user WebSocketHandler and end session

SockJsServce and TransportHandlers:
- raise IOException or TransportErrorException

HandshakeHandler:
- raise IOException
2013-04-25 18:31:07 -04:00
Rossen Stoyanchev 34c95034d8 Fix minor issue and polish 2013-04-24 13:29:08 -04:00
Rossen Stoyanchev 36148b7cb1 Switch DefaultSockJsService to constructor DI
DefaultSockJsService now relies on constructors and requires a
TaskScheduler at a minimum. It no longer needs lifecycle methods.
2013-04-23 21:35:24 -04:00
Rossen Stoyanchev c28ce0e2bd Ensure WebSocketHandlerEndpoint can connect only once
WebSocketHandlerEndpoint and SockJsWebSocketHandler are stateful
wrappers that are not intended to be used with one client connection.
2013-04-23 17:44:53 -04:00
Phillip Webb db4de526d2 Minor polish and FIXMEs 2013-04-23 13:47:52 -07:00
Phillip Webb ff2e9aa5bc Minor tweaks to WebSocketMessage
- payload is now required
- byte data is obtained and stored only once (allowing multiple calls)
- minor formatting polish
2013-04-23 13:47:52 -07:00
Phillip Webb a14161f0ca JettyRequestUpgradeStrategy 2013-04-23 13:47:43 -07:00
Rossen Stoyanchev 3cd4909ba3 Minor fix 2013-04-23 11:56:57 -04:00
Rossen Stoyanchev 84089bf396 Add HandlerProvider interface
HandlerProvider is now an interface that can be used to plug in
WebSocket handlers with per-connection scope semantics. There are two
implementations, of the interface, one simple and a second that creates
handler instances through AutowireCapableBeanFactory.

HandlerProvider also provides a destroy method that is used to
apply a destroy callback whenever a client connection closes.
2013-04-23 11:48:10 -04:00
Juergen Hoeller f91be88f8c Temporary workaround for JDK 8 test compilation/execution problem
Issue: SPR-9639
2013-04-23 14:03:03 +02:00
Juergen Hoeller 8ab16607d3 Support for JDK 8's "common" ForkJoinPool
Issue: SPR-9644
2013-04-23 14:01:51 +02:00
Juergen Hoeller 506f6a7c57 Adapter for JDK 8's standard parameter name reflection facilities
Issue: SPR-9643
2013-04-23 14:00:24 +02:00
Juergen Hoeller 1733237579 Initial support for JDK 8 Date-Time (JSR-310)
This is largely derived from our existing Joda-Time support, with corresponding classes wherever possible.

Issue: SPR-9641
2013-04-23 13:59:19 +02:00
Juergen Hoeller cd996ba18f Upgrading to JDK 1.8 bytecode along with ASM 4.1 patch
ASM has been patched to accept 1.8 bytecode simply through removing an assertion. As a consequence, we have an embedded copy of the ASM sources now instead of jarjar'ing the original ASM jar. The sources originate from ASM 4.1; for CGLIB 3.0 compatibility, a further assertion has been removed.

Issue: SPR-9639
2013-04-23 13:57:26 +02:00
Juergen Hoeller 19f783bdd7 Fixed general test suite problems found during OpenJDK 8 upgrade
Issue: SPR-9639
2013-04-23 13:54:19 +02:00
Juergen Hoeller 9c09a0a037 Consistent Map/Set ordering
Use LinkedHashMaps/Sets wherever exposed to users, and code tests defensively in terms of expected Map/Set ordering. Otherwise, there'll be runtime order differences between JDK 7 and JDK 8 due to internal HashMap/Set implementation differences.

Issue: SPR-9639
2013-04-23 13:53:09 +02:00
Juergen Hoeller b5d44e1d15 Revised Joda-Time support (as a side effect of JSR-310 support in Spring 4.0)
Issue: SPR-9641
2013-04-23 13:50:25 +02:00
Juergen Hoeller d3a4068768 Minimized ASM usage
In particular, avoid accidental usage of ASM for core JDK types - which will fail in case of a new bytecode version in the JDK, even if the application itself has been compiled with an earlier bytecode target.

Issue: SPR-10292
2013-04-23 13:49:25 +02:00
Rossen Stoyanchev f9078c947f Add WebSocketMessage and WebSocketHandler sub-interfcs
There is now a WebSocketMessage type with TextMessage and BinaryMessage
sub-types. WebSocketHandler is also sub-divided into TextMessageHandler
and BinaryMessageHandler, so that applications can choose to handle
text, binary, or both.

Also in this commit, the SockJsHandler and SockJsSession interfaces
have been removed. SockJsService now accepts WebSocketHandler.
2013-04-22 17:59:19 -04:00
Rossen Stoyanchev 2046629945 Add WebSocketClient and WebSocketConnectionManager
This change adds a WebSocketClient abstraction and enables the use of
WebSocketHandler on the client side.
2013-04-21 10:04:44 -04:00
Rossen Stoyanchev ab5d60d343 Improve APIs for WebSocket and SockJS messages 2013-04-18 22:04:18 -04:00
Rossen Stoyanchev 20a9df772a Update README-WEBSOCKET.md 2013-04-17 16:40:45 -04:00
Rossen Stoyanchev c810d95316 Update README-WEBSOCKET.md 2013-04-17 16:39:44 -04:00
Rossen Stoyanchev 967eae0efb Add README-WEBSOCKET.md 2013-04-17 16:36:51 -04:00
Rossen Stoyanchev d475e16604 Modify build version for branch CI snapshots 2013-04-17 14:34:33 -04:00
Rossen Stoyanchev 6273fc41f1 Rename SockJS session type to include "SockJs" 2013-04-17 11:26:20 -04:00
Rossen Stoyanchev 2794224b28 Add onClosed to SockJsSessionSupport sub-classes
As opposed to close(), which actively closes the session, the
onClosed method is called when the underlying connection has been
closed or disconnected.
2013-04-17 11:19:28 -04:00
Rossen Stoyanchev f056f7e2ad Init and destroy internally created SockJS schedulers 2013-04-15 15:28:06 -04:00
Rossen Stoyanchev 177e082172 Refactor SockJS and WebSocket layer configuration
Add HandlerProvider<T> class
Modify HandshakeHandler to accept + adapt WebSocketHandler at runtime
Modify SockJsService to accept + adapt SockJsHandler at runtime
2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 71e82069ce Add SockJsSessionFactory 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 3a2c15b0fd Add flush method to ServerHttpResponse
This is useful to make sure response headers are written to the
underlying response. It is also useful in conjunction with long
running, async requests and HTTP streaming, to ensure the Servlet
response buffer is sent to the client without additional delay and
also causes an IOException to be raised if the client has gone away.
2013-04-15 11:03:24 -04:00
Rossen Stoyanchev db6f8f2d4b Add package-info, javadoc, and update package names 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 592da431a8 Add Glassfish request upgrade strategy 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 6bd6311214 Refactor SockJS code
- configure SockJS handler by type (as well as by instance)
- add method to obtain SockJS handler instance via SockJsConfiguration
- detect presense of jsr-356 and use it if available
2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 4ad6091510 Debug and test SockJS server support 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 41153efd03 Polish in EndpointRegistration 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 6cf17449fa Add endpoint connection manager 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 914e969ac3 Add support for @ServerEndpoint annotated classes 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 88447e503b Add first cut of SockJS server support 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 30ab5953f9 Add EndpointRequestUpgradeStrategy
Now there is just one EndpointHandshakeRequestHandler that works on
different runtimes.
2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 741927664c Update package structure 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 715018fe75 Add handshake request handler abstraction 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev cdd7d7bd88 Add javax.websocket.Endpoint configuration support 2013-04-15 11:03:24 -04:00
Rossen Stoyanchev 4e67f809fb Add spring-websocket module 2013-04-15 11:03:23 -04:00
Phillip Webb 34bcdcfe85 Merge pull request #269 from sslavic/SPR-10438
# By Stevo Slavic
* SPR-10438:
  Fix JasperReport tests to ignore missing fonts
2013-04-13 13:01:45 -07:00
Stevo Slavic d80ea16291 Fix JasperReport tests to ignore missing fonts
Add 'jasperreports.properties' to ignore missing fonts in order that
tests pass on Linux.

The upgraded JasperReports 5.0.4 throws a JRFontNotFoundException when
a report font is not found. This caused Spring MVC tests to fail since
the example reports used the 'Arial' font which is not shipped with most
Linux distributions.

An alternative fix would have been to package fonts with the reports
using JasperReports font extension support.

Issue: SPR-10438
2013-04-13 12:47:54 -07:00
Phillip Webb 761bd9fd56 Merge branch '3.2.x'
* 3.2.x:
  Update javadoc external links
  JdbcTemplate etc
  Removed unnecessary default value of LifecycleGroup.lifecycleBeans
  Introduced public ArgumentPreparedStatementSetter and ArgumentTypePreparedStatementSetter classes
  Defensively uses JDBC 3.0 getParameterType call for Oracle driver compatibility
  Preparations for 3.2.3
  Fixed ReflectiveMethodResolver to avoid potential UnsupportedOperationException on sort
  Fixed Jaxb2Marshaller's partial unmarshalling feature to consistently apply to all sources
  Update copyright year in reference documentation

Conflicts:
	build.gradle
	gradle.properties
	spring-context/src/main/java/org/springframework/context/support/DefaultLifecycleProcessor.java
	spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentPreparedStatementSetter.java
	spring-jdbc/src/main/java/org/springframework/jdbc/core/ArgumentTypePreparedStatementSetter.java
2013-04-13 09:39:09 -07:00
Sam Brannen cf687fcc72 Fix typos in ServiceLocatorFactoryBean 2013-04-12 14:21:24 +02:00
Phillip Webb db3bbb5f8c Update javadoc external links
Fix broken external javadoc links for URLs that have been recently
moved.
2013-03-29 19:48:42 -07:00
Juergen Hoeller 942cab4d87 OpenJpaDialect javadoc makes no reference to TopLink anymore 2013-03-30 01:39:10 +01:00
Juergen Hoeller 6e6446cc7c EclipseLinkJpaDialect uses JPA 2.0's EntityManager unwrap method now for retrieving the underlying UnitOfWork/Connection 2013-03-30 01:36:29 +01:00
Juergen Hoeller 184455d630 Upgraded to Hibernate 4.2.0
HibernateJpaDialect's HibernateConnectionHandle does not call close() for Hibernate 4.x anymore, since on 4.2, the exposed Connection handle isn't a "borrowed connection" wrapper but rather the actual underlying Connection - with a close() call immediately returning the Connection to the pool and making the local handle invalid for further use within the transaction.

Also using JPA 2.0's EntityManager unwrap method now for retrieving the underlying Hibernate Session.

Issue: SPR-10395
2013-03-30 01:34:18 +01:00
Juergen Hoeller 6d710563cc Upgraded to Commons FileUpload 1.3 and JSF 2.1, removing deprecated JSF 1.1 VariableResolvers 2013-03-29 22:51:42 +01:00
Phillip Webb 39d043d773 Update javadoc external links
Fix broken external javadoc links for URLs that have been recently
moved.
2013-03-29 11:46:06 -07:00
Juergen Hoeller 15441da969 Removed Apache Commons HttpClient support (superseded by Apache HttpComponents) 2013-03-29 15:03:55 +01:00
Juergen Hoeller 8fab14dfeb Upgraded to JasperReports 5.0 (preserving compatibility with all previous releases) and POI 3.9 (preserving compatibility with POI 3.5+) 2013-03-29 14:52:30 +01:00
Juergen Hoeller 9caa514c69 Removed deprecated JpaTemplate and JpaInterceptor classes; dropped unused EntityManager(Factory)Plus mechanism 2013-03-29 13:18:33 +01:00
Juergen Hoeller 7ceb02257e Removed deprecated JdoTemplate and JdoInterceptor classes; formally requiring JDO 3.0+ now 2013-03-29 13:17:13 +01:00
Juergen Hoeller cc0ea4a824 Removed deprecated saveOrUpdateAll method from HibernateOperations 2013-03-29 00:19:43 +01:00
Juergen Hoeller 541f3edd9e Fully upgraded orm.hibernate3 package to require Hibernate 3.6+ now 2013-03-29 00:19:02 +01:00
Juergen Hoeller e11cf5f061 Upgraded JdkVersion and CollectionFactory to JDK 1.6+, also removing deprecated methods from CollectionFactory 2013-03-28 23:27:17 +01:00
Juergen Hoeller cf93d38c56 Added "destroyBean(Object)" method to AutowireCapableBeanFactory
Driven by the need for implementing Bean Validation 1.1's "releaseInstance" method in SpringConstraintValidatorFactory, as a direct counterpart to the use of AutowireCapableBeanFactory's "createBean(Class)" in "getInstance".

Issue: SPR-8199
2013-03-28 22:22:42 +01:00
Juergen Hoeller 853826a774 Use JDK 1.6's Collections.newSetFromMap instead of manually accessing Maps with dummy Boolean values 2013-03-28 22:14:26 +01:00
Juergen Hoeller e0c56a124a Consistently refer to most recent version of javax.el, in order to be compatible with Hibernate Validator 5.0 when doing integration tests
Issue: SPR-8199
2013-03-28 21:55:47 +01:00
Juergen Hoeller 0d0122239d Initial support for Bean Validation 1.1 and Hibernate Validator 5.0
MethodValidationInterceptor autodetects Bean Validation 1.1's ExecutableValidator API now and uses it in favor of Hibernate Validator 4.2's native variant.
SpringConstraintValidatorFactory implements Bean Validation 1.1 "releaseInstance" method against new "destroyBean(Object)" method in AutowireCapableBeanFactory.
LocalValidatorFactoryBean adapts Spring-provided ParameterNameDiscoverer onto Bean Validation 1.1's ParameterNameProvider mechanism.
LocalValidatorFactoryBean reflectively adapts between the different ResourceBundleLocator SPI location in Hibernate Validator 4.2 versus 5.0.
LocalValidatorFactoryBean implements Bean Validation 1.1 "close" method.

Note: We still compile against Bean Validation 1.0 in order to not have to implement "forExecutables()" and "getParameterNameDiscoverer()" in LocalValidatorFactoryBean, SpringValidatorAdapter and CustomValidatorBean. Implementing those methods would imply references to Bean Validation 1.1 interfaces that break runtime compatibility with Bean Validation 1.0. Unfortunately, this means that all Bean Validation 1.1 API access has to be done via reflection.

Issue: SPR-8199
2013-03-28 21:54:25 +01:00
Juergen Hoeller 23bf5f563b Added "destroyBean(Object)" method to AutowireCapableBeanFactory
Driven by the need for implementing Bean Validation 1.1's "releaseInstance" method in SpringConstraintValidatorFactory, as a direct counterpart to the use of AutowireCapableBeanFactory's "createBean(Class)" in "getInstance".

Issue: SPR-8199
2013-03-28 21:44:07 +01:00
Juergen Hoeller 9f9dc34b53 No @Override annotations for JPA 2.1 methods since we're building against JPA 2.0
Issue: SPR-8194
2013-03-28 00:05:37 +01:00
Juergen Hoeller 4004e53d97 JSR-236 support, in particular adapting to JSR-236 Triggers and exposing additional metadata through ManagedTasks
This is built into ConcurrentTaskExecutor and ConcurrentTaskScheduler now, automatically detecting the JSR-236 ExecutorService variants and adapting to them.

Issue: SPR-8195
2013-03-27 22:52:36 +01:00
Juergen Hoeller 52fd84bb57 JTA 1.2 support, in particular for the javax.transaction.Transactional annotation
Issue: SPR-9139
2013-03-27 22:33:17 +01:00
Juergen Hoeller ff160f9aeb JPA 2.1 support, in particular for SynchronizationType.UNSYNCHRONIZED
In the course of this effort, our joinTransaction() support has been overhauled to work for shared EntityManagers as well, since an unsynchronized shared EntityManager will nevertheless be scoped for the current transaction but not automatically join it (as per the JPA 2.1 spec). In the JTA case, we'll simply create an unsynchronized target EntityManager and will upgrade it to a synchronized one (later in the same transaction, if necessary) through an implicit joinTransaction() call. In the JpaTransactionManager case, we'll unbind the primary target EntityManager and will expose an unsynchronized EntityManager instead, upgrading it the same way as with JTA, with the primary EntityManager in that case just serving as a vehicle for transaction begin/commit/rollback calls.

For extended EntityManagers, we've just added further combinations to the existing variants: application-managed EntityManagers which may nevertheless auto-join transactions (EntityManagerFactory.createEntityManager with SynchronizationType.SYNCHRONIZED), and container-managed EntityManagers which might opt for not auto-joining transactions (@PersistenceContext with synchronizationType=UNSYNCHRONIZED).

Issue: SPR-8194
2013-03-27 14:46:23 +01:00
Juergen Hoeller a3d7dc09ef First pass completed, with support for the standard JMS 2.0 API in our CachingConnectionFactory and support for a delivery delay setting in JmsTemplate. Note that none of this has been tested against an actual JMS 2.0 provider yet, due to no such provider being available yet.
Known limitations:
* Spring's SingleConnectionFactory and CachingConnectionFactory do not support createContext calls for JMSContext creation at this point. Note that the JMSContext model bypasses the point of a Connection/Session pool anyway; this will only really work with a native JMS 2.0 ConnectionFactory and provider-specific pooling such as in an EE environment.
* JmsTemplate has no out-of-the-box support for send calls with an async completion listener. Note that a CompletionListener can be specified in a custom ProducerCallback implementation if really necessary.

There is no special support for the simplified JMSContext API, and likely never will be: JMSContext can be used from a native ConnectionFactory directly. @Inject JMSContext isn't supported due to rather involved rules for defining and scoping the injected context which are quite at odds with the Spring way of doing these things. We strongly recommend JmsTemplate instead, or @Resource ConnectionFactory with a createContext call within a Java 7 try-with-resources clause (as shown in the specification). After all, JMSContext has primarily been designed with EE's one-session-per-connection model and JTA transactions in mind, not with Spring-style use of a native JMS provider and native JMS transactions.

Issue: SPR-8197
2013-03-27 14:46:22 +01:00
Sam Brannen 41737e827c Remove warning suppression in mocks
This commit removes the suppression of warnings in Servlet and Portlet
mocks since such suppression is no longer necessary with the upgrade to
version 3.0 of the Servlet specification.
2013-03-26 15:15:37 +01:00
Juergen Hoeller b78fa2715a Assigned cache manager name in order to avoid EhCache assertion failure in case of multiple tests executed on the same VM 2013-03-21 11:12:30 +01:00
Juergen Hoeller 0d23a9d4a6 Upgraded integration test dependencies to Servlet 3.0 as well 2013-03-20 17:39:15 +01:00
Juergen Hoeller deba32cad9 Upgraded all Servlet API mocks to Servlet 3.0 (with a little bit of Servlet 3.1 support in MockHttpServletResponse) 2013-03-20 17:19:34 +01:00
Juergen Hoeller d03de21d62 Removed explicit JAXB 2.1 dependency (included in JDK 1.7 anyway) 2013-03-20 12:26:07 +01:00
Juergen Hoeller bb14c16938 Revised WebServiceFeature handling: requiring JAX-WS 2.1+, including support for JAX-WS 2.2 service-level features now 2013-03-20 12:20:46 +01:00
Juergen Hoeller bea990196d Fixed job scheduling data test for Quartz 1.8 2013-03-20 10:07:20 +01:00
Juergen Hoeller af3c3ef15c Only call EhCacheManagerFactoryBean's destroy() method when actually initialized 2013-03-20 10:05:56 +01:00
Juergen Hoeller 5472e975f6 Removed deprecated core.enums package 2013-03-19 23:31:50 +01:00
Juergen Hoeller 28aa34f7ff Removed build reference to spring-struts module 2013-03-19 23:16:22 +01:00
Juergen Hoeller ebb3d32ea8 Removed deprecated core.enums package 2013-03-19 23:14:55 +01:00
Juergen Hoeller f2b79c80b0 Spring's EhCache setup builds on EhCache 2.1+ now
Specifically, EhCacheFactoryBean extends CacheConfiguration now and therefore inherits all configuration properties of the underlying EhCache version. This reduces the need for catching up with new EhCache properties on our side.

Issue: SPR-8258
2013-03-19 23:08:05 +01:00
Juergen Hoeller e3fe9b1171 Upgraded to Quartz 1.8 and Velocity 1.7 2013-03-19 23:02:57 +01:00
Juergen Hoeller a272fd790a Clarified support for JRuby 1.5+ and Groovy 1.7+ 2013-03-19 22:40:14 +01:00
Juergen Hoeller 8832d59b7b Removed unintended backport-concurrency dependency 2013-03-19 19:25:49 +01:00
Juergen Hoeller f0ffb1edc6 Removed spring-struts module (Struts 1.x support) 2013-03-19 18:38:16 +01:00
Juergen Hoeller ceb9a05ecb General JPA 2.0+ requirement; upgraded build and tests to EclipseLink 2.4, OpenJPA 2.2, Hibernate 3.6 2013-03-19 18:34:04 +01:00
Juergen Hoeller 90f79f3f4f Require JRuby 1.6+ (avoiding the use of deprecated API) 2013-03-19 16:46:14 +01:00
Juergen Hoeller 7ef5c5cc84 Added missing section end tag 2013-03-19 16:45:31 +01:00
Juergen Hoeller 20fb418785 Removed Spring’s own JSP expression support (in favor of JSP 2.0+) 2013-03-19 16:30:46 +01:00
Juergen Hoeller f19f55a59b Removed Spring MVC command/form controller class hierarchy 2013-03-19 16:06:37 +01:00
Juergen Hoeller 74021b9e4a Removed JUnit 3.8 based test class hierarchy 2013-03-19 15:10:59 +01:00
Juergen Hoeller 55901e677f Removed EJB 2.x implementation class hierarchy (ejb.support package) 2013-03-19 15:07:51 +01:00
Juergen Hoeller 30a9dad5fe Removed iBATIS SQL Maps support 2013-03-19 15:03:38 +01:00
Juergen Hoeller 3f35bdc79a Removed scheduling.timer and scheduling.backportconcurrent packages 2013-03-19 15:01:11 +01:00
Juergen Hoeller f1258a6a02 Removed JAX-RPC support 2013-03-19 15:00:17 +01:00
Juergen Hoeller 9c52ae9558 Removed OC4J support (including documentation references) 2013-03-19 14:53:26 +01:00
Juergen Hoeller a03d125b4e Removed Servlet 2.4 forward attribute support in InternalResourceView and TilesView 2013-03-19 14:33:21 +01:00
Juergen Hoeller 0f0c93a559 Removed JMS 1.0.2 support 2013-03-19 13:39:45 +01:00
Juergen Hoeller 36942f6018 JtaTransactionManager relies on presence of JTA 1.1 API 2013-03-19 13:27:00 +01:00
Juergen Hoeller 27693bbc83 CustomizableTraceInterceptor relies on JDK 1.5+ Matcher.quoteReplacement method now 2013-03-19 13:15:45 +01:00
Juergen Hoeller 7f0a780925 StaxUtils relies on JAXP 1.4 (as included in JDK 1.6+) 2013-03-19 13:15:05 +01:00
Juergen Hoeller 87e5f19c3f JDK 1.6+ API baseline across the codebase 2013-03-19 13:10:25 +01:00
Juergen Hoeller 7331937511 Raised source and target compatibility to JDK 1.6 2013-03-19 12:28:28 +01:00
Juergen Hoeller a18935dfa1 JdbcTemplate etc 2013-03-19 11:31:09 +01:00
Juergen Hoeller 2629208d5b Removed unnecessary default value of LifecycleGroup.lifecycleBeans
Issue: SPR-10388
2013-03-19 11:30:46 +01:00
Juergen Hoeller cc4f1328ee Introduced public ArgumentPreparedStatementSetter and ArgumentTypePreparedStatementSetter classes
Issue: SPR-10375
2013-03-19 11:28:25 +01:00
Juergen Hoeller 6b4c29cd24 Defensively uses JDBC 3.0 getParameterType call for Oracle driver compatibility
Issue: SPR-10385
2013-03-19 11:14:33 +01:00
Juergen Hoeller ff6d7a858e Preparations for 3.2.3 2013-03-19 10:58:36 +01:00
Juergen Hoeller aeef000c46 Fixed ReflectiveMethodResolver to avoid potential UnsupportedOperationException on sort
Issue: SPR-10392
2013-03-19 10:57:23 +01:00
Juergen Hoeller 283b3ee44b Fixed Jaxb2Marshaller's partial unmarshalling feature to consistently apply to all sources
Issue: SPR-10282
2013-03-19 10:51:30 +01:00
Phillip Webb dc9fee0b5c Update copyright year in reference documentation 2013-03-14 11:53:09 -07:00
Spring Buildmaster f911dd1f0f Increment version to 3.2.3.BUILD-SNAPSHOT 2013-03-13 14:45:47 -07:00
Spring Buildmaster 8b293e1be4 Release version 3.2.2.RELEASE 2013-03-13 14:14:02 -07:00
Phillip Webb 4e1cab28df Merge branch '3.2.x'
* 3.2.x: (28 commits)
  Hide 'doc' changes from jdiff reports
  Document @Bean 'lite' mode vs @Configuration
  Final preparations for 3.2.2
  Remove Tiles 3 configuration method
  Polishing
  Extracted buildRequestAttributes template method from FrameworkServlet
  Added "beforeExistingAdvisors" flag to AbstractAdvisingBeanPostProcessor
  Minor refinements along the way of researching static CGLIB callbacks
  Compare Kind references before checking log levels
  Polish Javadoc in RequestAttributes
  Fix copy-n-paste errors in NativeWebRequest
  Fix issue with restoring included attributes
  Add additional test for daylight savings glitch
  Document context hierarchy support in the TCF
  Fix test for daylight savings glitch
  Make the methodParameter field of HandlerMethod final
  Disable AsyncTests in spring-test-mvc
  Reformat the testing chapter
  Document context hierarchy support in the TCF
  Document context hierarchy support in the TCF
  ...
2013-03-13 14:01:46 -07:00
Phillip Webb f62f697550 Hide 'doc' changes from jdiff reports 2013-03-13 11:13:01 -07:00
Phillip Webb 5730b8d316 Document @Bean 'lite' mode vs @Configuration
Rework the reference documentation to better distinguish the differences
between @Bean methods used in @Comonent vs @Configuration classes. The
'Using the @Bean annotation' section now only covers concepts applicable
when using @Bean methods in @Configuration _or_ @Component classes.
Information only applicable to @Configuration classes has been moved to
a new  'Using the @Configuration annotation' section.

An additional sidebar section attempts to explain the differences
between the two approaches.

Issue: SPR-9425
2013-03-13 09:44:35 -07:00
Juergen Hoeller 457ee07352 Final preparations for 3.2.2 2013-03-13 17:37:30 +01:00
Rossen Stoyanchev d9540ff342 Remove Tiles 3 configuration method
Issue: SPR-10361
2013-03-13 12:29:52 -04:00
Juergen Hoeller c75eba79b3 Polishing 2013-03-13 16:58:51 +01:00
Juergen Hoeller 1f55b4f2a8 Extracted buildRequestAttributes template method from FrameworkServlet
Also, RequestBindingInterceptor now obtains HttpServletRequest from locally passed-in request handle and delegates to buildRequestAttributes as well now.

Issue: SPR-10342
2013-03-13 16:58:29 +01:00
Juergen Hoeller 43c1cec79b Added "beforeExistingAdvisors" flag to AbstractAdvisingBeanPostProcessor
Just AsyncAnnotationBeanPostProcessor switches "beforeExistingAdvisors" to "true" by default. So effectively, MethodValidation/PersistenceExceptionTranslationPostProcessor apply after existing advisors by default again, fixing the 3.1->3.2 regression.

Issue: SPR-10309
2013-03-13 16:58:00 +01:00
Juergen Hoeller fffeaee647 Minor refinements along the way of researching static CGLIB callbacks
Specifically, our CallbackFilter doesn't hold an implicit reference to the containing ConfigurationClassEnhancer class anymore.

Issue: SPR-10307
2013-03-13 16:57:59 +01:00
Phillip Webb b00f90f346 Merge pull request #252 from dharkness/patch-1
# By David Harkness
* patch-1:
  Compare Kind references before checking log levels
2013-03-13 08:52:49 -07:00
David Harkness 801f196de0 Compare Kind references before checking log levels
Assuming reference comparisons are much quicker than checking
likely-nested logger levels, perform the former first.

Also, since the reference can match only one of the instances,
use "else if" to short-circuit the search.
2013-03-13 08:52:21 -07:00
Sam Brannen 12db873002 Polish Javadoc in RequestAttributes 2013-03-13 14:11:08 +01:00
Sam Brannen bf6ee1631c Fix copy-n-paste errors in NativeWebRequest 2013-03-13 13:00:57 +01:00
Rossen Stoyanchev 0fb4b747c2 Fix issue with restoring included attributes
Before this change the DispatcherServlet restored modified and also
removed added attributes but did not restore removed attributes.

Issue: SPR-10360
2013-03-11 10:34:05 -04:00
Sam Brannen e9f74450ad Merge pull request #251 from dsyer/feature/crontest
# By Dave Syer
* dsyer-feature/crontest:
  Add additional test for daylight savings glitch
2013-03-11 02:40:08 +01:00
Dave Syer 6914aff825 Add additional test for daylight savings glitch
The problem was that clocks go forward *at* 2am, so
2am doesn't exist once a year. Users might be surprised
that their cron trigger doesn't go off one night, but that
is arguably correct (and what happens now). The test can be
modified if we decide to change the trigger behaviour.
2013-03-11 02:36:41 +01:00
Sam Brannen 4171646491 Document context hierarchy support in the TCF
This commit updates the reference manual regarding the new support for
@ContextHierarchy and hierarchy modes in @DirtiesContext.

Issue: SPR-10357
2013-03-11 02:26:33 +01:00
Chris Beams 88b9bea049 Merge pull request #250 from dsyer/feature/crontest
Fix test for daylight savings glitch
2013-03-10 10:09:54 -07:00
Dave Syer 5b6f149bf8 Fix test for daylight savings glitch 2013-03-10 10:03:15 -07:00
Rossen Stoyanchev 8ab8e4f7c2 Make the methodParameter field of HandlerMethod final
Previously the methodParameter array field was initialized lazily since
it requires reflection. However, in practice the field is always used
and there is not much benefit from the lazy initialization.

In Spring Framework 3.2, the methodParameter field was copied when a
new HandlerMethod instance (with the resolved bean) is created for
performance reasons. That introduced a synchronization issue since
the lazy initialization was not synchronized.

Issue: SPR-10365
2013-03-10 12:54:03 -04:00
Rossen Stoyanchev 3654a620fb Disable AsyncTests in spring-test-mvc 2013-03-10 10:00:01 -04:00
Sam Brannen 2b24e99d44 Reformat the testing chapter
This commit reformats the testing chapter (and adds minor polishing
changes) in order to avoid massive merge diffs in upcoming commits.

Issue: SPR-10357
2013-03-10 14:49:10 +01:00
Sam Brannen ccdb48210a Document context hierarchy support in the TCF
This commit polishes the Javadoc for @ContextHierarchy and
@ContextConfiguration.

Issue: SPR-10357
2013-03-10 14:26:19 +01:00
Sam Brannen 4e7098dc63 Document context hierarchy support in the TCF
This commit adds examples to the Javadoc for @ContextHierarchy and
updates the Javadoc for @ContextConfiguration accordingly.

Issue: SPR-10357
2013-03-10 01:39:14 +01:00
Oliver Gierke 3eb3610660 UriComponentsBuilder parse of empty fragments
Check for an empty fragment in UriComponentsBuilder.fromUriString(...)
to prevent the invocation of fragment(...).

Previously, UriComponentsBuilder.fromUriString(...) threw an exception
in the case of an empty fragment being provided (e.g. /example#).

Issue: SPR-10363
2013-03-08 22:15:26 -08:00
Rossen Stoyanchev 8e4e0f3531 Use null in MockServletContext for unknown mime types
MockServletContext.getMimeTypes now returns null if the Java Activation
Framework returns "application/octet-stream", which is the default
media type it returns if the mime type is unknown. This enforces the
contract for ServletContext.getMimeTypes (return null for uknown mime
types) but does mean "application/octet-stream" cannot be returned.

Issue: SPR-10334
2013-03-07 12:33:44 -05:00
Rossen Stoyanchev eefd1c4ca6 Add context hierarchy tests to Spring MVC Test
Issue: SPR-5613
2013-03-07 11:20:19 -05:00
Sam Brannen 4c5d771764 Merge pull request #247 from sbrannen/SPR-5613
* SPR-5613:
  Provide support for context hierarchies in the TCF
2013-03-07 02:12:33 +01:00
Sam Brannen 98074e7762 Provide support for context hierarchies in the TCF
Prior to this commit the Spring TestContext Framework supported creating
only flat, non-hierarchical contexts. There was no easy way to create
contexts with parent-child relationships.

This commit addresses this issue by introducing a new @ContextHierarchy
annotation that can be used in conjunction with @ContextConfiguration
for declaring hierarchies of application contexts, either within a
single test class or within a test class hierarchy. In addition,
@DirtiesContext now supports a new 'hierarchyMode' attribute for
controlling context cache clearing for context hierarchies.

- Introduced a new @ContextHierarchy annotation.
- Introduced 'name' attribute in @ContextConfiguration.
- Introduced 'name' property in ContextConfigurationAttributes.
- TestContext is now aware of @ContextHierarchy in addition to
  @ContextConfiguration.
- Introduced findAnnotationDeclaringClassForTypes() in AnnotationUtils.
- Introduced resolveContextHierarchyAttributes() in ContextLoaderUtils.
- Introduced buildContextHierarchyMap() in ContextLoaderUtils.
- @ContextConfiguration and @ContextHierarchy may not be used as
  top-level, class-level annotations simultaneously.
- Introduced reference to the parent configuration in
  MergedContextConfiguration and WebMergedContextConfiguration.
- Introduced overloaded buildMergedContextConfiguration() methods in
  ContextLoaderUtils in order to handle context hierarchies separately
  from conventional, non-hierarchical contexts.
- Introduced hashCode() and equals() in ContextConfigurationAttributes.
- ContextLoaderUtils ensures uniqueness of @ContextConfiguration
  elements within a single @ContextHierarchy declaration.
- Introduced CacheAwareContextLoaderDelegate that can be used for
  loading contexts with transparent support for interacting with the
  context cache -- for example, for retrieving the parent application
  context in a context hierarchy.
- TestContext now delegates to CacheAwareContextLoaderDelegate for
  loading contexts.
- Introduced getParentApplicationContext() in MergedContextConfiguration
- The loadContext(MergedContextConfiguration) methods in
  AbstractGenericContextLoader and AbstractGenericWebContextLoader now
  set the parent context as appropriate.
- Introduced 'hierarchyMode' attribute in @DirtiesContext with a
  corresponding HierarchyMode enum that defines EXHAUSTIVE and
  CURRENT_LEVEL cache removal modes.
- ContextCache now internally tracks the relationships between contexts
  that make up a context hierarchy. Furthermore, when a context is
  removed, if it is part of a context hierarchy all corresponding
  contexts will be removed from the cache according to the supplied
  HierarchyMode.
- AbstractGenericWebContextLoader will set a loaded context as the
  ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE in the MockServletContext when
  context hierarchies are used if the context has no parent or if the
  context has a parent that is not a WAC.
- Where appropriate, updated Javadoc to refer to the
  ServletTestExecutionListener, which was introduced in 3.2.0.
- Updated Javadoc to avoid and/or suppress warnings in spring-test.
- Suppressed remaining warnings in code in spring-test.

Issue: SPR-5613, SPR-9863
2013-03-07 02:11:11 +01:00
Phillip Webb 7bc5353e07 Do not sort the mvc:resources location attribute
Update ResourcesBeanDefinitionParser to use ensure that location
attribute values remain in the order that they are specified. The
order was inadvertently changed in commit 3838d159f3 due to the use
of StringUtils.commaDelimitedListToSet which sorts items.

Issue: SPR-10355
2013-03-06 11:18:49 -08:00
Phillip Webb 85f8d6f695 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Replace EasyMock with Mockito
2013-03-06 11:08:17 -08:00
Phillip Webb 05765d7520 Replace EasyMock with Mockito
Issue: SPR-10126
2013-03-06 11:06:15 -08:00
Juergen Hoeller 2302b9b48b Added locale-independent "commonMessages" property to AbstractMessageSource
Issue: SPR-10291
2013-03-06 09:53:12 +01:00
Phillip Webb a399b13354 Merge branch '3.2.x' into cleanup-3.2.x
* 3.2.x: (111 commits)
  Fix FreeMarker form checbox macro generated names
  Fix DefaultMockMvcBuilder fluent API generic type
  Catch IAE when parsing content type
  Update @RequestParam javadoc
  Fix AntPathMatcher rule for combining with extensions
  DefaultLobHandler etc
  Minor javadoc updates
  Deprecated OracleLobHandler in favor of DefaultLobHandler for the Oracle 10g driver and higher
  Added "createTemporaryLob" flag to DefaultLobHandler, using JDBC 4.0's createBlob/Clob mechanism
  Add Castor XSD information to reference docs
  Do not use Servlet 3.0 API in doOptions()
  Cache target type per bean definition and allow for specifying it in advance
  Mentioning JDBC 4's unwrap method for obtaining the native connection now
  LazyConnectionDataSourceProxy catches setReadOnly exception analogous to DataSourceUtils
  Refined predictBeanType's typesToMatch check for FactoryBeans
  Fix minor javadoc typos
  Fix incorrect closing <web-app> tag in MVC docs
  Fixed minor typo
  Suppress warnings for resource leaks
  Update spring-test re: deprecated queryForInt()
  ...
2013-03-04 11:01:14 -08:00
Chris Beams ce4be3b46b Merge branch '3.2.x' into master
Conflicts:
	gradle.properties
	spring-beans/src/main/java/org/springframework/beans/factory/support/StaticListableBeanFactory.java
	spring-context-support/src/main/java/org/springframework/cache/ehcache/EhCacheManagerFactoryBean.java
	spring-core/src/main/java/org/springframework/core/convert/support/StringToEnumConverterFactory.java
	spring-core/src/main/java/org/springframework/core/env/ReadOnlySystemAttributesMap.java
	spring-jdbc/src/main/java/org/springframework/jdbc/datasource/LazyConnectionDataSourceProxy.java
	spring-jdbc/src/main/java/org/springframework/jdbc/support/lob/AbstractLobHandler.java
	spring-web/src/main/java/org/springframework/http/client/BufferingClientHttpRequestWrapper.java
	spring-web/src/main/java/org/springframework/http/client/SimpleBufferingClientHttpRequest.java
	spring-web/src/main/java/org/springframework/http/converter/BufferedImageHttpMessageConverter.java
	spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java
2013-03-04 15:41:15 +01:00
Juergen Hoeller db823ba1e4 DefaultListableBeanFactory clears by-type matching cache on runtime register/destroySingleton calls
Issue: SPR-10326
2013-03-04 12:29:26 +01:00
Stevo Slavic ba03d5b0c7 Fix FreeMarker form checbox macro generated names
In Spring 3.2 a fix was implemented for all Spring Freemarker form
macros so that generated form input fields have valid bracketless IDs.
In the fix a regression was introduced manifesting in formCheckbox
macro no longer generating appropriate names for checkbox and hidden
input field.

This change fixes mentioned regression issue.

Issue: SPR-8732
2013-03-01 16:30:02 -05:00
Wesley Hall fbac428e23 Fix DefaultMockMvcBuilder fluent API generic type
Changed upper bound of generic parameter for DefaultMockMvcBuilder from
MockMvcBuilder to DefaultMockMvcBuilder to allow for ongoing method
chaining in the fluent API style.

Issue: SPR-10277
2013-03-01 16:30:02 -05:00
Rossen Stoyanchev c611083415 Catch IAE when parsing content type
Issue: SPR-10308
2013-03-01 16:30:02 -05:00
Rossen Stoyanchev 3abe05c65e Update @RequestParam javadoc
Issue: SPR-10180
2013-03-01 16:30:02 -05:00
Rossen Stoyanchev 33e723b4a8 Fix AntPathMatcher rule for combining with extensions
Before this fix AntPathMatcher had a special rule for combining
patterns with wildcards and extensions as follows:

"/*.*"  + "/*.html" => "/*.html"

This change ensures this rule never applies if the first pattern
contains URI variables.

Issue: SPR-10062
2013-03-01 16:30:02 -05:00
Juergen Hoeller 4cc30fe541 DefaultLobHandler etc 2013-03-01 21:55:01 +01:00
Juergen Hoeller d3c0dd1c7e Minor javadoc updates 2013-03-01 21:55:01 +01:00
Juergen Hoeller 99c7f25b05 Deprecated OracleLobHandler in favor of DefaultLobHandler for the Oracle 10g driver and higher
Issue: SPR-10339
2013-03-01 21:55:00 +01:00
Juergen Hoeller 2bd584ca75 Added "createTemporaryLob" flag to DefaultLobHandler, using JDBC 4.0's createBlob/Clob mechanism
Issue: SPR-10339
2013-03-01 21:54:59 +01:00
Phillip Webb 7ce0406fbc Merge pull request #243 from jmnarloch/SPR-8509
# By Jakub Narloch
* SPR-8509:
  Add Castor XSD information to reference docs
2013-03-01 11:41:07 -08:00
Jakub Narloch 5d727b2d8e Add Castor XSD information to reference docs
Update the Spring OXM reference documentation to include changes
introduced in CastorMarshaller, specifically around CastorMarshaller
XSD configuration.

Issue: SPR-8509
2013-03-01 11:40:32 -08:00
Phillip Webb b27fc0ef30 Do not use Servlet 3.0 API in doOptions()
Refactor FrameworkServlet.doOptions() to capture the "Allow" header
by using a HttpServletResponseWrapper.

Prior to this commit the HttpServletResponse.getHeader() method was
used which is only available in Servlet 3.0 environments.

Issue: SPR-10341
2013-03-01 10:31:08 -08:00
Juergen Hoeller c986a1efc1 Cache target type per bean definition and allow for specifying it in advance
Issue: SPR-10335
2013-03-01 16:43:24 +01:00
Juergen Hoeller 6a043e3ea1 Mentioning JDBC 4's unwrap method for obtaining the native connection now 2013-03-01 16:05:27 +01:00
Juergen Hoeller 1716c171d8 LazyConnectionDataSourceProxy catches setReadOnly exception analogous to DataSourceUtils
Also mentioning JDBC 4's unwrap method for obtaining the native connection now.

Issue: SPR-10312
2013-03-01 16:04:10 +01:00
Juergen Hoeller e0c7571a41 Refined predictBeanType's typesToMatch check for FactoryBeans
GroovyScriptFactoryTests passes again now.

Issue: SPR-10304
2013-03-01 15:52:24 +01:00
Phillip Webb 9929182e30 Merge pull request #242 from carsonmcdonald/fix-typos-3
# By Carson McDonald
* fix-typos-3:
  Fix minor javadoc typos
2013-02-28 16:02:45 -08:00
Carson McDonald 39c236baa8 Fix minor javadoc typos 2013-02-28 15:56:58 -08:00
Phillip Webb d9e6f2ad09 Merge pull request #241 from nurkiewicz/patch-1
# By Tomasz Nurkiewicz
* patch-1:
  Fix incorrect closing <web-app> tag in MVC docs
2013-02-28 15:50:53 -08:00
Tomasz Nurkiewicz c4ba8ce124 Fix incorrect closing <web-app> tag in MVC docs 2013-02-28 15:49:44 -08:00
Phillip Webb 18df9fed92 Fixed minor typo
Issue: SPR-10210
2013-02-28 15:37:10 -08:00
Sam Brannen 381f7fe6df Suppress warnings for resource leaks 2013-02-28 13:48:15 +01:00
Sam Brannen 4bdf382714 Update spring-test re: deprecated queryForInt()
Now invoking JdbcTemplate's queryForObject() method instead
of the deprecated queryForInt() method within the test suite.

Issue: SPR-10257
2013-02-28 13:46:56 +01:00
Chris Beams 2a78b97598 Polish whitespace in JpaExceptionTranslatorAspect.aj
Issue: SPR-10208
2013-02-28 09:14:46 +01:00
Sam Brannen 013c894c25 Update JdbcTestUtils re: deprecated queryForInt()
JdbcTestUtils now invokes JdbcTemplate's queryForObject() method instead
of the deprecated queryForInt() method.

Issue: SPR-10257
2013-02-28 01:56:13 +01:00
Sam Brannen c0e4387cbc Fix JIRA issue number in @Ignore comments
Issue: SPR-10333
2013-02-28 01:42:04 +01:00
Sam Brannen 9b72bf4691 Update @since tag for StreamUtils 2013-02-28 01:39:15 +01:00
Sam Brannen 301628811f Update JdbcTestUtils re: deprecated queryForInt()
JdbcTestUtils now invokes JdbcTemplate's queryForObject() method instead
of the deprecated queryForInt() method.

Issue: SPR-10257
2013-02-28 01:36:03 +01:00
Phillip Webb 0f2e94f0fc Fix reference docs section on inner beans
Inner beans are not prototype beans as, in contrast to what is
documented in the section for prototype beans, the inner bean does
get destruction callbacks applied.

Issue: SPR-10311
2013-02-27 13:44:33 -08:00
Rob Winch 21a49ef4c5 Polish whitespace in *.aj
Previously we had restored the whitespace for *.aj files in 6888a6f28
to avoid a but in aspectj.

We have updated to the latest version of apsectj and restored the
changes in commit 6888a6f28 which included a significant cleanup of
whitespace.

Issue: SPR-10208
2013-02-27 15:06:11 -06:00
Juergen Hoeller 1bae80a241 Polishing 2013-02-27 00:31:05 +01:00
Juergen Hoeller de069d06d8 Made "getJaxbContext()" method public
Issue: SPR-10282
2013-02-27 00:26:27 +01:00
Juergen Hoeller 3b60f64d51 Fixed invalid EhCacheFactoryBean test for EhCache 2.4+ compatibility 2013-02-27 00:24:21 +01:00
Juergen Hoeller b979d8d548 Polishing along with SPR-10301 2013-02-27 00:22:53 +01:00
Juergen Hoeller 096972d2b1 HibernateTransactionManager for Hibernate 4 supports "entityInterceptor(BeanName)" property
Issue: SPR-10301
2013-02-27 00:22:18 +01:00
Juergen Hoeller 0d69a630ad DefaultJdoDialect supports the JDO 2.2+ isolation level feature out of the box
Issue: SPR-10323
2013-02-26 22:30:48 +01:00
Phillip Webb 01a6a110c9 Upgrade docbook-reference-plugin to 0.2.6 2013-02-26 09:46:23 -08:00
Chris Beams 4f99e4cf3a Merge branch 'SPR-8089' into 3.2.x 2013-02-26 16:53:33 +01:00
Chris Beams 9a48c10dcb Segregate tests that depend on the jmxmp: protocol
This commit introduces TestGroup#JMXMP and adds assumptions to related
tests accordingly. These tests require the jmxoptional_remote jar on the
classpath, and are run nightly in the SPR-PERF build.

Issue: SPR-8089
2013-02-26 16:52:29 +01:00
Chris Beams 10648942c3 Update AbstractMBeanServerTests hierarchy to JUnit 4
This commit lays the groundwork for introducing TestGroup#JMXMP and
related assumptions in select JMX-related tests in a subsequent commit;
JUnit assumptions require JUnit 4+ to function properly, so the entire
AbstractMBeanServerTests hierarchy must be moved over to JUnit 4+ style.

Issue: SPR-8089
2013-02-26 16:48:55 +01:00
Chris Beams 55caf7bdb0 Improve diagnostics for invalid testGroup values 2013-02-26 16:46:13 +01:00
Chris Beams cbe03093ba Revert "Revert "Re-enable ignored JMX tests""
This reverts commit cc814519c8.

Issue: SPR-8089
Conflicts:
	spring-context/src/test/java/org/springframework/jmx/access/RemoteMBeanClientInterceptorTestsIgnore.java
	spring-context/src/test/java/org/springframework/jmx/support/ConnectorServerFactoryBeanTestsIgnore.java
2013-02-26 16:46:13 +01:00
Chris Beams 1bdd081a14 Merge branch 'SPR-10074' into 3.2.x 2013-02-26 14:28:18 +01:00
Chris Beams 9c2b5b2406 Update @Ignore'd JPA+AspectJ tests
Issue: SPR-10074, SPR-10333
2013-02-26 14:26:55 +01:00
Chris Beams 0e8c950f7d Re-enable JaxWsSupportTests
These tests still fail under Eclipse for unknown reasons, but do work
under Gradle, so are thus re-enabled by removing the @Ignore.

Issue: SPR-10074
2013-02-26 14:26:32 +01:00
Chris Beams 58ab8b691c Re-enable ignored SecurityManager-related test
Prior to this change, CallbacksSecurityTests#testContainerPrivileges was
@Ignored because it caused the build to fail under Gradle. After some
analysis, the root cause was determined to be the fact that (a) a
restrictive SecurityManager is active during the running of this test,
and (b), Gradle intercepts System.out and routes it through its internal
LogBack-based logging system. LogBack requires a call to
Class#getClassLoader when handling logging statements, and the
SecurityManager disallows this call, thus raising the error that fails
the build.

This commit solves the problem by eliminating the System.out.println
call in question and removing the @Ignore annotation from the test. The
console output was diagnostic in nature anyway, and not required for the
successful execution of the test's assertions.

Issue: SPR-10074
2013-02-26 14:25:57 +01:00
Chris Beams 3a192a0701 Update Eclipse import organization rules
The following changes have been made to the JDT UI prefs to conform to
existing conventions throughout the codebase:

 - always favor .* syntax for static imports
 - always list static imports last

Re-run `gradle eclipse` and refresh projects within Eclipse to make
this change take effect.
2013-02-26 14:21:01 +01:00
Chris Beams 3100d89d07 Clean up console output for spring-beans tests 2013-02-26 14:21:01 +01:00
Phillip Webb da034eb020 Replace references to SimpleJdbcTemplate in docs
Rework JDBC section of the manual to remove references to the now
deprecated SimpleJdbcTemplate class.

Issue: SPR-10317
2013-02-25 16:33:15 -08:00
Phillip Webb 009d2a5efd Remove unnecessary null check in SysEnvPropSource
Remove unnecessary null check and dead code from
SystemEnvironmentPropertySource.

Issue: SPR-10318
2013-02-25 15:35:13 -08:00
Phillip Webb 29f4374bcf MergePlugin uses project source not jar source
Update gradle MergePlugin to use the 'project.sourceSets.main.output'
for jar content rather than 'project.jar.source'. This prevents
superfluous MANIFEST.MF files from appearing in the merged jar.

Issue: SPR-10324
2013-02-25 15:25:02 -08:00
Phillip Webb 82bd06f255 Protect against missing SpEL selection expression
Update InternalSpelExpressionParser to ensure that SPeL selections
('$[...]', '^[...]', '?[...]') always include a nested expression.

Issue: SPR-10328
2013-02-25 14:28:18 -08:00
Phillip Webb 9a6c6b9ee6 StringToEnumConverterFactory class from enum value
Update StringToEnumConverterFactory to search superclasses until
Class.isEnum() returns true. This allows conversion when the
enum class is obtained from the enum value:

    public static enum SubFoo {
        BAR { String s() { return "x"; } };
        abstract String s();
    }

    conversionService.convert("BAR", SubFoo.BAR.getClass())

This fix is particularly important when converting collections of
enums.

Issue: SPR-10329
2013-02-25 13:25:44 -08:00
Phillip Webb e2e4cbe6b3 Deprecate HttpStatus.MOVED_TEMPORARILY
Deprecate HttpStatus.MOVED_TEMPORARILY in favor of HttpStatus.FOUND
since HttpStatus.valueOf(302) will always return FOUND.

The name of the 302 status code was changed between HTTP 1.0 and
HTTP 1.1 but the underlying meaning remains the same.

Issue: SPR-10300
2013-02-25 11:56:57 -08:00
Phillip Webb 720714b434 Add JdbcTestUtils.deleteRowsInTableWhere method
Issue: SPR-10302
2013-02-25 11:26:59 -08:00
Phillip Webb 576be97285 Merge pull request #237 from carsonmcdonald/fix-typos-2
# By Carson McDonald
* fix-typos-2:
  Minor changes to fix typos
2013-02-21 10:38:08 -08:00
Carson McDonald 6a45d5bfb0 Minor changes to fix typos 2013-02-21 10:37:51 -08:00
Phillip Webb 5b7969e726 Fix UriComponents.equals() method
Fix HierarchicalUriComponents and OpaqueUriComponents .equals() methods.

Issue: SPR-10313
2013-02-19 13:19:42 -08:00
Phillip Webb 7e2022b9a7 Fix @RequestMapping regex reference doc example
Issue: SPR-10244
2013-02-19 11:48:55 -08:00
Phillip Webb 5008005df0 Protect against 'has not been resolved to a Class'
Update AbstractAutowireCapableBeanFactory.getTypeForFactoryBean to
check AbstractBeanDefinition.hasBeanClass() before calling
getBeanClass(). The protects against a 'Bean class name [<name>] has
not been resolved into an actual Class' IllegalStateException.

Issue: SPR-10304
2013-02-19 09:20:09 -08:00
Phillip Webb 608dab28bf Protect against ArrayIndexOutOfBoundsException
Update logic in AbstractAutowireCapableBeanFactory.predictBeanType to
protect against a ArrayIndexOutOfBoundsException.

Issue: SPR-10304
2013-02-19 09:18:15 -08:00
Phillip Webb 893574be0e Protect against ArrayIndexOutOfBoundsException
Update logic in AbstractAutowireCapableBeanFactory.predictBeanType to
protect against a ArrayIndexOutOfBoundsException.

Issue: SPR-10304
2013-02-15 12:31:47 -08:00
Juergen Hoeller 7d20c7a62f Module POMs, etc 2013-02-15 18:31:49 +01:00
Juergen Hoeller 5e64723e02 Catch ASM ClassReader's IllegalArgumentException and turn it into a more expressive exception, hinting at the class file version
Issue: SPR-10292
2013-02-15 18:31:22 +01:00
Juergen Hoeller add6a7faa0 Updated note on Bean Validation 1.1 2013-02-15 18:24:11 +01:00
Juergen Hoeller acffcdaa01 Polished *JdbcCall/Insert classes 2013-02-15 18:23:10 +01:00
Juergen Hoeller 06c6cbb6b9 AbstractCachingViewResolver does not use global lock for accessing existing View instances anymore
Issue: SPR-3145
2013-02-15 18:17:00 +01:00
Rossen Stoyanchev 5b1165b102 Ignore path parameters in request mappings
Before this change the presence of path params (e.g. "/foo;q=1/bar")
expected the request mapping to contain a URI variable in the place of
semicolon content (e.g. either "/{foo}/bar" or "/{foo};{fooParams}").

The change ensures path params are ignored in @RequestMapping patterns
so that "/foo/bar" matches to "/foo;q=1/bar" as well as
"/foo;q=1;p=2/bar".

Along with this change, the RequestMappingHandlerMapping no longer
defaults to having semicolon content removed from the URL, which means
@MatrixVariable is supported by default without the need for any
further configuration.

Issue: SPR-10234
2013-02-15 11:31:32 -05:00
Rossen Stoyanchev eda53ec1d8 Allow merge of MockMultipart- w/ Mock- request builder
Issue: SPR-10280
2013-02-15 09:43:08 -05:00
Rossen Stoyanchev b47d97c23a Improve error message for JSON path expressions
Issue: SPR-SPR-10275
2013-02-15 09:43:08 -05:00
Arnaud Cogoluègnes ccca82be1b Make StandaloneMockMvcBuilder interface consistent
The exception resolvers can now be set using a setter that expects
varargs, just like other infrastructure beans.

Issue: SPR-10279
2013-02-15 09:43:08 -05:00
Juergen Hoeller f0787bdb86 Fixed @Configurable documentation with respect to logging when the aspect hasn't been configured
Issue: SPR-10295
2013-02-15 13:32:46 +01:00
Juergen Hoeller 81a929aed3 Removed outdated EJB reference from auto-proxying documentation.
Issue: SPR-10299
2013-02-15 13:32:45 +01:00
Juergen Hoeller 8987ceea93 Fixed @Configurable documentation with respect to the use of a prototype-scoped bean definition.
Issue: SPR-10298
2013-02-15 13:32:45 +01:00
Juergen Hoeller ff15534211 Log4jWebConfigurer supports resolving placeholders against ServletContext init-parameters as well
Introducing a ServletContextPropertyUtils helper (analogous to SystemPropertyUtils) along the way.

Issue: SPR-10284
2013-02-15 13:32:44 +01:00
Rossen Stoyanchev 221562dbeb Use default value for empty values in @RequestParam
Issue: SPR-10180
2013-02-15 07:25:26 -05:00
Rossen Stoyanchev f5c9fe69a4 Update JavaScriptUtils
Add escaping for <, >, and PS/LS line terminators

Issue: SPR-9983
2013-02-15 06:38:40 -05:00
Phillip Webb 6e5cb7fbcd Protect against '//' in UriComponentsBuilder
Refactor UriComponentsBuilder to ensure that paths do not contain empty
segments.

For example, prior to this commit:

    fromUriString("http://example.com/abc/").path("/x/y/z")

would build the URL "http://example.com/abc//x/y/z" where as it will
now build "http://example.com/abc/x/y/z".

Issue: SPR-10270
2013-02-14 21:10:23 -08:00
Phillip Webb 953b2b60ad Javadoc polish 2013-02-13 11:58:21 -08:00
Phillip Webb 92ad66bf10 Add setOutputStreaming option for HTTP factory
Add setOutputStreaming on SimpleClientHttpRequestFactory to allow the
disabling of 'output streaming' mode on the underlying connection so
that authentication and redirection can be handled automatically.

Issue: SPR-9617
2013-02-13 11:52:23 -08:00
Phillip Webb 030c61f294 Merge pull request #230 from avbentem/patch-1
# By Arjan van Bentem
* patch-1:
  Add HttpPutFormContentFilter note to documentation
2013-02-13 11:50:34 -08:00
Arjan van Bentem 24ed325c0c Add HttpPutFormContentFilter note to documentation
Update reference guide to include a note about the use of
HttpPutFormContentFilter in combination with @RequestBody
MultiValueMap and HttpEntity.

Issue: SPR-8415
2013-02-13 11:50:34 -08:00
Juergen Hoeller 5334ac59f6 "packagesToScan" feature for Hibernate 3 and Hibernate 4 detects annotated packages as well
Issue: SPR-7748
Issue: SPR-10288
2013-02-13 17:44:10 +01:00
Phillip Webb 39c6341cea Fix type in "what's new in 3.2" section
Issue: SPR-10283
2013-02-12 22:43:40 -08:00
Phillip Webb e551f0408d Protect against NPE in Tiles 3 Views
Change the org.apache.tiles.request.servlet.ServletRequest created
in TileView.checkResource to include the HttpServletRequest. This
is required when using a TilesConfigurer with useMutableTilesContainer
set to true. Without a HttpServletRequest the getRequestScope() method
will always return null causing exceptions in the CachingTilesContainer
class.

Unfortunately the checkResource method does not provide access to the
HttpServletRequest so it must be obtained via the RequestContextHolder
thread-local.

Issue: SPR-10223
2013-02-12 15:32:46 -08:00
Phillip Webb 66ae626f91 Only register Date converters with global format
Change JodaTimeFormatterRegistrar and DateFormatterRegistrar to only
register converters for the Date and Calendar types when a global format
has been defined. This means that the ObjectToObject converter will
handle String->Date conversion using the deprecated Date(String)
constructor (as was the case with Spring 3.1).

Issue: SPR-10105
2013-02-12 11:09:32 -08:00
Phillip Webb dbe3c234d6 Polish 2013-02-12 10:33:01 -08:00
Phillip Webb de692521df Merge pull request #231 from carsonmcdonald/3.2.x
# By Carson McDonald
# Via Carson McDonald
* carson:
  Fix a few typos
2013-02-12 09:26:09 -08:00
Carson McDonald 6f0b4395e5 Fix a few typos
Minor changes to fix typos. Small adjustment to add a couple commas.
2013-02-12 09:04:28 -05:00
Phillip Webb 9320bf1316 Fix @RequestMapping regex reference doc example
Issue: SPR-10244
2013-02-11 20:56:59 -08:00
Phillip Webb 6661788748 Ensure HTTP classes don't close streams
Prior to this commit several HTTP classes made use of FileCopyUtils
when reading from or writing to streams. This has the unfortunate
side effect of closing streams that should really be left open.

The problem is particularly noticeable when dealing with a
FormHttpMessageConverter that is writing a multi-part response.

Relevant HTTP classes have now been refactored to make use of a new
StreamUtils class that works in a similar way FileCopyUtils but does
not close streams.

The NonClosingOutputStream class from SimpleStreamingClientHttpRequest
has also been refactored to a StreamUtils method.

Issue: SPR-10095
2013-02-11 19:04:53 -08:00
Juergen Hoeller 08e1cbc02b Jaxb2Marshaller etc 2013-02-11 21:52:05 +01:00
Juergen Hoeller 93e6238f92 Polishing 2013-02-11 21:52:04 +01:00
Juergen Hoeller 23925edc95 Added "mappedClass" property to Jaxb2Marshaller, introducing support for partial unmarshalling
Issue: SPR-10282
2013-02-11 21:52:03 +01:00
Phillip Webb 2ca75386f1 Align UriComponents.toUri() with toUriString()
Update HierarchicalUriComponents.toUri() to only prepend a missing '/'
when the scheme, user info, host or port are specified. This makes
the toUri() method behave in the same way as .toUriString() and allows
relative URIs to be created.

Issue: SPR-10231
2013-02-11 12:14:06 -08:00
Phillip Webb 203b22b246 UriComponentsBuilder supports query without value
Fix UriComponentsBuilder to support query parameters that do not
include a value without losing '='. The following styles are now
supported:

    http://example.com/foo?bar=baz
    http://example.com/foo?bar=
    http://example.com/foo?bar

Issue: SPR-10215
2013-02-11 12:13:54 -08:00
Phillip Webb f32ce3a613 Make HierarchicalUriComponents Serializable
(fix apache header copyright dates)

Issue: SPR-10266
2013-02-11 09:25:30 -08:00
Phillip Webb 536325bc75 Make HierarchicalUriComponents Serializable
Issue: SPR-10266
2013-02-11 09:18:57 -08:00
Juergen Hoeller 6fc0790c5f Added note on EhCache 2.1+ as recommended version 2013-02-11 13:09:05 +01:00
Juergen Hoeller cef97819c5 Fixed regression in SpringValidatorAdapter's retrieval of invalid values
Issue: SPR-10243
2013-02-11 12:21:46 +01:00
Phillip Webb 19eecb151b Add @Ignored Test case to reproduce SPR-10243
Issue: SPR-10243
2013-02-10 18:54:28 -08:00
Phillip Webb 0b6101478e Use bridge methods in ReflectiveMethodResolver
Fix failing test

Issue: SPR-10210
2013-02-10 17:17:23 -08:00
Phillip Webb 634284e1fd Use bridge methods in ReflectiveMethodResolver
Update ReflectiveMethodResolver to consider bridge methods.

Issue: SPR-10210
2013-02-10 16:27:28 -08:00
Juergen Hoeller d442c40e0c Added section on GemFire as a cache provider choice (SPR-9468) 2013-02-10 23:53:19 +01:00
Juergen Hoeller c4194ee175 Added paragraph on BeanPostProcessor side effects when autowiring dependencies into it (SPR-9577) 2013-02-10 23:53:18 +01:00
Phillip Webb 36b2e1f192 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Replace EasyMock with Mockito in spring-jms
  Add testMany test to TestGroup.PERFORMANCE
  Polish @Test annotation position
2013-02-10 12:21:33 -08:00
Phillip Webb 2642cf2e05 Replace EasyMock with Mockito in spring-jms
Issue: SPR-10126
2013-02-10 12:19:39 -08:00
Juergen Hoeller 00a3420c6f CastorMarshaller etc 2013-02-10 21:11:13 +01:00
Juergen Hoeller e9db785799 Polishing 2013-02-10 21:10:58 +01:00
Juergen Hoeller aa576e70be Fixed test class name 2013-02-10 21:10:51 +01:00
Juergen Hoeller 9e9cdf5f13 Removed unused XStreamUtils class; direct access to the xstream field in XStreamMarshaller 2013-02-10 21:10:00 +01:00
Juergen Hoeller 6a2ace739f Added "entityResolver", "classDescriptorResolver", "doctypes" and further properties to CastorMarshaller
Also deprecated CastorMarshaller's "object" property in favor of "rootObject".

Issue: SPR-8470
2013-02-10 21:09:00 +01:00
Juergen Hoeller 1af28efe39 @Transactional in AspectJ mode works with CallbackPreferringPlatformTransactionManager (WebSphere) as well
Effectively, AbstractTransactionAspect got refactored into around advice, reusing former TransactionInterceptor code which now lives in slightly generalized form in TransactionAspectSupport, and using a workaround for rethrowing checked exceptions.

Issue: SPR-9268
2013-02-10 18:06:50 +01:00
Juergen Hoeller 01c44c8bf6 Further enhancements for 3.2.2 2013-02-10 00:02:45 +01:00
Juergen Hoeller a86a77ad81 ConfigurationClassPostProcessor detects covariant return type mismatch, avoiding infinite recursion
Issue: SPR-10261
2013-02-09 23:21:35 +01:00
Juergen Hoeller c1c27e7142 Deprecated JdbcTemplate's queryForInt/Long operations in favor of queryForObject (following NamedParameterJdbcTemplate)
Issue: SPR-10257
2013-02-09 17:06:30 +01:00
Juergen Hoeller 3fa6723748 Added useful query variants without parameters to NamedParameterJdbcTemplate, for convenience in DAOs
Also deprecated NamedParameterJdbcTemplate's queryForInt/Long operations in favor of queryForObject.

Issue: SPR-10256
Issue: SPR-10257
2013-02-09 16:59:38 +01:00
Juergen Hoeller 9881517f61 Further enhancements for 3.2.2 2013-02-08 22:26:03 +01:00
Juergen Hoeller f57bc1aaaa MappingJackson(2)JsonView allows subclasses to access the ObjectMapper and to override content writing
Issue: SPR-7619
2013-02-08 22:25:26 +01:00
Juergen Hoeller af8e6255e2 Refined CronSequenceGenerator's rounding up of seconds to address second-specific cron expressions
Issue: SPR-9459
2013-02-08 21:13:04 +01:00
Juergen Hoeller 89c3d03083 @Async's qualifier works for target class annotations behind a JDK proxy as well
Also optimized AsyncExecutionAspectSupport's Executor-per-Method caching to use a ConcurrentHashMap.

Issue: SPR-10274
2013-02-08 16:08:05 +01:00
Phillip Webb c4f79bb997 Merge branch '3.2.x' into cleanup-3.2.x
* 3.2.x:
  Promote use of @PostConstruct and @PreDestroy
  @Scheduled provides String variants of fixedDelay, fixedRate, initialDelay for placeholder support
  Further preparations for 3.2.2
  @Scheduled provides String variants of fixedDelay, fixedRate, initialDelay for placeholder support
  Folded a FactoryBean-specific check into predictBeanType now
  Fix Assert.instanceOf exception message
  Allow for ordering of mixed AspectJ before/after advices
  Minor javadoc and source layout polishing
  Fixed documentation for "depends-on" attribute
  "depends-on" attribute on lang namespace element actually respected at runtime now
  Allow for ordering of mixed AspectJ before/after advices
2013-02-07 17:37:13 -08:00
Phillip Webb 584e79c677 Promote use of @PostConstruct and @PreDestroy
Update reference documentation to promote the use of the JSR-250
@PostConstruct and @PreDestroy annotations.

Issue: SPR-8493
2013-02-07 17:25:16 -08:00
Juergen Hoeller 0058503cf0 @Scheduled provides String variants of fixedDelay, fixedRate, initialDelay for placeholder support
Issue: SPR-8067
2013-02-08 01:13:08 +01:00
Juergen Hoeller f9bac48d84 Further preparations for 3.2.2 2013-02-08 00:59:45 +01:00
Juergen Hoeller 9255d3038f @Scheduled provides String variants of fixedDelay, fixedRate, initialDelay for placeholder support
Issue: SPR-8067
2013-02-08 00:58:39 +01:00
Juergen Hoeller b3c9a11bd1 Folded a FactoryBean-specific check into predictBeanType now
This change means that we effectively revert SPR-8954's code change in favor of the isFactoryBean implementation simply relying on predictBeanType to sort it out, filtering a post-processed predictedType for FactoryBean applicability.

Issue: SPR-9177
Issue: SPR-9143
2013-02-07 23:23:25 +01:00
Phillip Webb 7bbb4ec7af Fix Assert.instanceOf exception message
Update the exception message used when Assert.instanceOf fails such
that it expects the provided message to end with '.'. This reverts
commit 5874383ef0 which caused the
implementation to be at odds with the JavaDoc and the previous
release.

The updated code also has the benefit of protecting against a null
message.

Issue: SPR-10269
2013-02-07 13:35:31 -08:00
Juergen Hoeller 2aaa66f86b Allow for ordering of mixed AspectJ before/after advices
Issue: SPR-9438
2013-02-07 22:02:40 +01:00
Juergen Hoeller e3c83bb769 Minor javadoc and source layout polishing 2013-02-07 15:36:19 +01:00
Juergen Hoeller 9ffbee332c Fixed documentation for "depends-on" attribute 2013-02-07 15:28:25 +01:00
Juergen Hoeller 0d66df26da "depends-on" attribute on lang namespace element actually respected at runtime now
Issue: SPR-8625
2013-02-07 15:27:43 +01:00
Juergen Hoeller d3969de101 Allow for ordering of mixed AspectJ before/after advices
Issue: SPR-9438
2013-02-07 14:11:24 +01:00
Phillip Webb fd831bc19e Add testMany test to TestGroup.PERFORMANCE 2013-02-06 14:29:06 -08:00
Phillip Webb b21063ec05 Polish @Test annotation position 2013-02-06 14:25:28 -08:00
Phillip Webb 5edd2ffa10 Merge branch '3.2.x' into cleanup-3.2.x
* 3.2.x:
  Preparations for 3.2.2
  Marked spring-web module as 'distributable' in order for session replication to work on Tomcat
  SQLErrorCodeSQLExceptionTranslator tries to find SQLException with actual error code, looping through the causes.
  Fixed setFavorPathExtension delegation code
  Added ContentNegotiationManager(Collection<ContentNegotiationStrategy>) constructor
  ConfigurationClassPostProcessor allows for overriding of scoped-proxy bean definitions
  Limit auto grow collection size when using SpEL
  Improve presentation of code blocks in Javadoc
  Polish @Configuration javadoc
  Update Quartz documentation to use FactoryBeans
  Support 'unless' expression for cache veto
2013-02-06 14:25:14 -08:00
Juergen Hoeller 1ed26d6389 Preparations for 3.2.2 2013-02-06 21:48:28 +01:00
Juergen Hoeller c6cf911931 Marked spring-web module as 'distributable' in order for session replication to work on Tomcat
Issue: SPR-10219
2013-02-06 21:44:34 +01:00
Juergen Hoeller 8a4ce142c4 SQLErrorCodeSQLExceptionTranslator tries to find SQLException with actual error code, looping through the causes.
Issue: SPR-10260
2013-02-06 21:32:42 +01:00
Juergen Hoeller 188a11bdb9 Fixed setFavorPathExtension delegation code 2013-02-06 21:01:51 +01:00
Juergen Hoeller ab3aa6c8c2 Added ContentNegotiationManager(Collection<ContentNegotiationStrategy>) constructor 2013-02-06 21:01:50 +01:00
Juergen Hoeller 6b82d293d5 ConfigurationClassPostProcessor allows for overriding of scoped-proxy bean definitions
Issue: SPR-10265
2013-02-06 21:01:49 +01:00
Phillip Webb 1cc58e0a99 Limit auto grow collection size when using SpEL
Provide an additional constructor on SpelParserConfiguration that can
be used to limit the maximum size that a collection will auto grow when
being accessed via a SpEL expression.

This constraint is particularly useful when SpEL is used with data
binding as it prevents a malicious user from crafting a request that
causes OutOfMemory exceptions.

Issue: SPR-10229
2013-02-06 10:42:46 -08:00
Phillip Webb 1c724069c3 Improve presentation of code blocks in Javadoc
Include custom javadoc css that formats <pre class="code"> blocks.

Issue: SPR-10155
2013-02-04 15:05:08 -08:00
Phillip Webb 501ce65055 Polish @Configuration javadoc 2013-02-04 15:00:45 -08:00
Phillip Webb a6b70722fa Update Quartz documentation to use FactoryBeans
Update examples for Quartz scheduling to use SimpleTriggerFactoryBean
and CronTriggerFactoryBean instead of SimpleTriggerBean and
CronTriggerBean.

Issue: SPR-10209
2013-02-04 13:57:48 -08:00
Phillip Webb 8c2ace33cb Support 'unless' expression for cache veto
Allow @Cachable, @CachePut and equivalent XML configuration to provide
a SpEL expression that can be used to veto putting an item into the
cache. Unlike 'condition' the 'unless' parameter is evaluated after
the method has been called and can therefore reference the #result.

For example:

    @Cacheable(value="book",
        condition="#name.length < 32",
        unless="#result.hardback")

This commit also allows #result to be referenced from @CacheEvict
expressions as long as 'beforeInvocation' is false.

Issue: SPR-8871
2013-02-04 11:59:15 -08:00
Phillip Webb 3252cb5a0f Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Polish formatting
2013-02-04 10:37:11 -08:00
Phillip Webb f464a45ba4 Polish formatting
Minor formatting polish across that codebase. Primarily fixing
whitespace issues.
2013-02-04 10:35:25 -08:00
Phillip Webb 0a6da1e42d Merge branch '3.2.x' into cleanup-3.2.x
* 3.2.x:
  Polish documentation in Hibernate support classes
  Improve 3.2 migration guide re: JUnit & Hamcrest
2013-02-04 10:29:05 -08:00
Sam Brannen 220d2311c7 Polish documentation in Hibernate support classes
This commit fixes some minor typos in Hibernate support classes.
2013-02-01 23:51:07 +01:00
Sam Brannen ae0c34baaf Improve 3.2 migration guide re: JUnit & Hamcrest
This commit improves the "Spring Test Dependencies" section of the 3.2
migration guide by correctly explaining that Hamcrest Core is now a
required transitive dependency of JUnit.

Issue: SPR-10251
2013-02-01 15:40:01 +01:00
Phillip Webb 4849205c6a Merge branch '3.2.x' into cleanup-3.2.x 2013-01-31 13:54:28 -08:00
Phillip Webb aac6b913d6 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Fix unnecessary @SupressWarnings annotations
  Fix Javadoc warnings
  Fix unused local variable warnings
  Fix unused type compiler warnings
  Fix 'is already an instance of type' warnings
2013-01-31 12:52:51 -08:00
Juergen Hoeller a694db2933 Removed logging from GenericTypeResolver's resolveReturnTypeForGenericMethod
GenericTypeResolver is very low-level and quite a hotspot, so let's not do any logging there and rather use the debugger instead.
2013-01-31 18:01:01 +01:00
Juergen Hoeller 7d798acd35 Added getOriginalValue() accessor to (Real)Literal
Issue: SPR-10248
2013-01-31 17:50:37 +01:00
Juergen Hoeller bd72fcd469 Initial preparations for 3.2.2 2013-01-31 16:53:58 +01:00
Juergen Hoeller b3af29b8f6 DefaultMessageListenerContainer invokes specified ExceptionListener for recovery exceptions as well
Also, DefaultMessageListenerContainer logs recovery failures at error level and exposes an "isRecovering()" method now.

Issue: SPR-10230
2013-01-31 16:53:04 +01:00
Juergen Hoeller 6d77f1cf3b ConfigurationClassPostProcessor consistently uses ClassLoader, not loading core JDK annotations via ASM
Issue: SPR-10249
2013-01-31 16:51:56 +01:00
Juergen Hoeller 58f59d6851 MediaType throws dedicated InvalidMediaTypeException instead of generic IllegalArgumentException
Issue: SPR-10226
2013-01-30 14:58:36 +01:00
Juergen Hoeller 6a98b40e1c Consistent use of LinkedHashMaps and independent getAttributeNames Enumeration in Servlet/Portlet mocks
Issue: SPR-10224
2013-01-30 14:57:36 +01:00
Phillip Webb 94a88069ac Update example years to 2013 in CONTRIBUTING.md 2013-01-29 15:39:37 -08:00
Phillip Webb d89e30b864 Fix unnecessary @SupressWarnings annotations 2013-01-29 15:37:25 -08:00
Sam Brannen 321004143b Improve Javadoc for ContextLoaderUtils
- class-level Javadoc now mentions application context initializers.
- avoided and suppressed warnings in method-level Javadoc.

Issue: SPR-10232
2013-01-29 17:48:14 +01:00
Rob Winch ac88106676 Sort maven dependencies in generated pom files
Previously the maven dependencies were specified in an arbitrary order
which made comparing the poms against other versions difficult.

This commit sorts the dependencies by scope, group id, and then
artifact id.
2013-01-28 13:25:21 -06:00
Sam Brannen 8d927dffb3 Merge pull request #221 from kdombeck/fix-typo
# By Ken Dombeck
* fix-typo:
  Fix typo in new-in-3.2.xml document
2013-01-26 15:13:07 +01:00
Ken Dombeck b8e7314c43 Fix typo in new-in-3.2.xml document
This commit fixes a typo in the "New Features and Enhancements in Spring
Framework 3.2" chapter of the reference manual. Specifically,
ContentNegotiationStrategy is now spelled correctly.
2013-01-26 15:12:12 +01:00
Phillip Webb 2b0d860923 Fix Javadoc warnings 2013-01-25 17:31:33 -08:00
Phillip Webb bc80d25b49 Restore compile dependencies in generated POMs
Ensure that merge projects do not downgrade the compile time
dependencies of the projects that they are merged into.

This commit restores the scope of the following dependencies which
were inadvertently changed between Spring 3.2.0 and 3.2.1:

    spring-orm
    -> spring-tx
    -> spring-jdbc

    spring-webmvc
    -> spring-context
    -> spring-web

    spring-test
    -> spring-webmvc

Issue: SPR-10218
2013-01-25 16:45:30 -08:00
Phillip Webb 065b1c0e46 Fix unused local variable warnings 2013-01-25 14:35:19 -08:00
Phillip Webb 6a1e841952 Fix unused type compiler warnings 2013-01-25 14:35:07 -08:00
Phillip Webb 88f5dd6ce1 Fix 'is already an instance of type' warnings 2013-01-25 11:29:54 -08:00
Phillip Webb 36b5ba1871 Merge remote-tracking branch 'springsource/3.2.x' into cleanup-3.2.x
* springsource/3.2.x: (143 commits)
  Remove eclipse project specific Javadoc settings
  Increment version to 3.2.2.BUILD-SNAPSHOT
  Release version 3.2.1.RELEASE
  Tweak gradle generated eclipse meta-data
  Completed changelog entries for 3.2.1
  Avoid UnsupportedOperationEx. with active SecurityManager
  Made EncodedResource based variant public; consistently detect XML properties across all variants
  Added note on thread safety to TypeConverter and SimpleTypeConverter javadoc
  Change merge.into project dependencies to provided
  Final preparations for 3.2.1
  Polishing
  Removed pre-JDK-1.5 checks
  ResourcePropertyResource accepts EncodedResource for properties files with a specific encoding
  Updated resolvePath javadoc to reflect Environment-based placeholder resolution
  DisposableBeanAdapter detects "shutdown" as a destroy method as well (for EHCache CacheManager setup)
  Added further MySQL error code for DataIntegrityViolationException
  ThreadPoolExecutorFactoryBean exposes "createExecutor" method for custom ThreadPoolExecutor subclasses
  MBeanInfoAssembler impls expose actual method parameter names if possible
  Suppress serialization warning
  Allow nulls with multiple embedded value resolvers
  ...
2013-01-25 11:06:58 -08:00
Phillip Webb 1065d82f08 Remove eclipse project specific Javadoc settings
Remove Javadoc settings from generated eclipse meta-data. Unfortunately
eclipse provides too many false warnings due to the fact that @Link and
@See tags in Spring often refer modules to which they cannot directly
depend.
2013-01-25 10:58:24 -08:00
Spring Buildmaster 08ba5a0d4a Increment version to 3.2.2.BUILD-SNAPSHOT 2013-01-24 20:49:04 +01:00
Spring Buildmaster 234cb84e83 Release version 3.2.1.RELEASE 2013-01-24 10:44:42 -08:00
Phillip Webb a99a4ed9b5 Tweak gradle generated eclipse meta-data
- Change output folders to /bin/main and /bin/test. This prevents
   'gradle clean' from breaking eclipse.

 - Update copyright header for new files to '2002-2013'
2013-01-24 09:44:25 -08:00
Juergen Hoeller 8625504711 Completed changelog entries for 3.2.1 2013-01-24 16:45:06 +01:00
Chris Beams 0a6727cb16 Merge branch 'SPR-9970' into 3.2.x
* SPR-9970:
  Avoid UnsupportedOperationEx. with active SecurityManager
2013-01-24 15:08:17 +01:00
Chris Beams 39c00c489e Avoid UnsupportedOperationEx. with active SecurityManager
Issue: SPR-9970
2013-01-24 15:08:07 +01:00
Juergen Hoeller 078a1c5db8 Made EncodedResource based variant public; consistently detect XML properties across all variants
Issue: SPR-9078
2013-01-24 14:56:45 +01:00
Juergen Hoeller d46a82bbb0 Added note on thread safety to TypeConverter and SimpleTypeConverter javadoc
Issue: SPR-8659
2013-01-24 11:19:06 +01:00
Phillip Webb 7f928e83ff 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.
2013-01-23 15:19:33 -08:00
Juergen Hoeller 919aeb5df9 Final preparations for 3.2.1 2013-01-23 23:34:21 +01:00
Juergen Hoeller 575926932d Polishing 2013-01-23 22:17:48 +01:00
Juergen Hoeller e5d9378482 Removed pre-JDK-1.5 checks 2013-01-23 22:17:38 +01:00
Juergen Hoeller 049169d19f ResourcePropertyResource accepts EncodedResource for properties files with a specific encoding
Also added constructor with Charset argument to EncodedResource.

Issue: SPR-10096
2013-01-23 22:16:35 +01:00
Juergen Hoeller ede9d535ea Updated resolvePath javadoc to reflect Environment-based placeholder resolution
Issue: SPR-9455
2013-01-23 22:00:35 +01:00
Juergen Hoeller 4c823a3f9b DisposableBeanAdapter detects "shutdown" as a destroy method as well (for EHCache CacheManager setup)
Issue: SPR-9713
2013-01-23 22:00:34 +01:00
Juergen Hoeller 0dcc0f2227 Added further MySQL error code for DataIntegrityViolationException
Issue: SPR-9237
2013-01-23 22:00:33 +01:00
Juergen Hoeller a425d717b7 ThreadPoolExecutorFactoryBean exposes "createExecutor" method for custom ThreadPoolExecutor subclasses
Issue: SPR-9435
2013-01-23 22:00:32 +01:00
Juergen Hoeller 4dde7c4c16 MBeanInfoAssembler impls expose actual method parameter names if possible
Issue: SPR-9985
2013-01-23 22:00:31 +01:00
Rossen Stoyanchev 2ee70d683d Suppress serialization warning 2013-01-23 15:00:14 -05:00
Phillip Webb f3ff98d862 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
2013-01-23 11:08:14 -08:00
Rossen Stoyanchev 9982b4c01a Add BS and VT char escape sequences to JavaScriptUtils
Issue: SPR-9983
2013-01-23 13:37:17 -05:00
Sam Brannen e4f1f682e2 Update distribution README regarding paths
- Corrected path to 'docs/spring-framework-reference'
- Minor formatting changes
2013-01-23 17:09:45 +01:00
Sam Brannen 3b8aba9ccd Fix typo in ContextLifecycleScheduledTaskRegistrar 2013-01-23 16:48:08 +01:00
Sam Brannen a1aba23aa9 Polish Javadoc in TypeDescriptor
- fix @since version in array()
- format method-level Javadoc
- unescape HTML-escaped angle brackets with {@code} blocks
2013-01-23 16:47:23 +01:00
Phillip Webb 7e74fd2b7f 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
2013-01-22 23:30:34 -08:00
Juergen Hoeller 5fb75304eb Final preparations for 3.2.1 2013-01-23 01:32:29 +01:00
Juergen Hoeller d5af9dc0a5 Polishing 2013-01-23 01:32:28 +01:00
Juergen Hoeller 89db04ec75 Added "awaitTerminationSeconds" property to ThreadPoolTaskExecutor/ThreadPoolTaskScheduler
Issue: SPR-5387
2013-01-23 01:32:27 +01:00
Phillip Webb 9c032d52d4 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
2013-01-22 15:35:43 -08:00
Rossen Stoyanchev 3c09b07652 Raise exception on missing request parameters
Issue: SPR-10193
2013-01-22 18:11:49 -05:00
Phillip Webb 4d01d43c19 Test String to char[] conversion
Issue: SPR-9793
2013-01-22 14:36:38 -08:00
Phillip Webb 05ba366edc Polish AbstractContextLoader Javadoc
Fix unnecessary HTML escaping from {@code} Javadoc.
2013-01-22 14:36:38 -08:00
Phillip Webb 3eec27a723 Filter build folder resources in eclipse
Apply eclipse project 'filter' to hide generated build artifacts from
the workspace.
2013-01-22 14:36:38 -08:00
Juergen Hoeller ece727bf57 Introduced NoUniqueBeanDefinitionException as a dedicated subclass of NoSuchBeanDefinitionException
Issue: SPR-10194
2013-01-22 23:29:20 +01:00
Juergen Hoeller 0efdd3d566 Aligned XML scheduled-task elements with @Scheduled in terms of kicking in after context refresh
Issue: SPR-9231
2013-01-22 23:29:19 +01:00
Rossen Stoyanchev a3e190e1bf Support sub-types of ResponseEntity
Issue: SPR-10207
2013-01-22 17:26:51 -05:00
Juergen Hoeller 0a09da7534 Final preparations for 3.2.1 2013-01-22 21:12:08 +01:00
Juergen Hoeller 8f103c2ea1 Introduced NoUniqueBeanDefinitionException as a dedicated subclass of NoSuchBeanDefinitionException
Issue: SPR-10194
2013-01-22 21:12:06 +01:00
Juergen Hoeller 1a929f22e0 EntityManagerFactoryUtils finds default EntityManagerFactory in parent 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
2013-01-22 21:12:05 +01:00
Juergen Hoeller 8e75eee9b2 SpringValidationAdapter properly detects invalid value for JSR-303 field-level bean constraints
Issue: SPR-9332
2013-01-22 21:12:04 +01:00
Juergen Hoeller 5a773b771d MockHttpServletResponse's getHeaderNames declares Collection instead of Set for Servlet 3.0 compatibility
Issue: SPR-9885
2013-01-22 21:12:03 +01:00
Juergen Hoeller c1a4f5c0fe MockHttpServletRequest's getParameter(Values) returns null for null parameter name
Issue: SPR-10192
2013-01-22 21:12:02 +01:00
Rossen Stoyanchev 692ced8046 Fix typo in reference docs
Issue: SPR-10204
2013-01-22 14:15:22 -05:00
Rossen Stoyanchev 40ed4e78be Make UriComponents Serializable
Issue: SPR-10186
2013-01-22 11:54:31 -05:00
Chris Beams d3f4528905 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
2013-01-22 16:02:31 +01:00
Chris Beams d5cad15e28 Merge branch 'SPR-9896' into 3.2.x
* SPR-9896:
  Support XML properties in ResourcePropertySource
2013-01-22 14:17:38 +01:00
Chris Beams 3a626f9319 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
2013-01-22 14:14:15 +01:00
Sam Brannen 2a41de00e3 Polish Javadoc in Spring MVC async support
This commit fixes some typographical and grammatical errors in various
classes in Spring MVC's async support.
2013-01-22 12:09:00 +01:00
Chris Beams 3cdb866bda 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
testing.

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
ConfigurableEnvironment.

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
2013-01-22 11:33:37 +01:00
Chris Beams d9a4fb410d 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.
2013-01-22 11:33:37 +01:00
Rossen Stoyanchev 660458a649 Fix init order issue in RequestMappingHandlerMapping
Issue: SPR-10173
2013-01-21 14:52:41 -05:00
Rossen Stoyanchev 902a136b6e Add helpful error message to DispServlet initializer
Issue: SPR-10168
2013-01-21 14:41:31 -05:00
Rossen Stoyanchev 0c56e86bfb Fix NPE in FormHttpMessageConverter
Issue: SPR-10187
2013-01-21 14:09:32 -05:00
Phillip Webb 21becef1bd Support Date to String in JodaTimeConverters
Update JodaTimeConverters in include support for Date to String
conversion.

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

Issue: SPR-10198
2013-01-21 10:55:25 -08:00
Rossen Stoyanchev e4fcad9f93 Fix exception message about producible media types
Issue: SPR-10175
2013-01-21 12:34:56 -05:00
Rossen Stoyanchev 8e1685caef Fix ClassCastException in TilesConfigurer
Issue: SPR-10195
2013-01-21 12:01:42 -05:00
Chris Beams 3c1536af75 Merge branch 'SPR-10197' into 3.2.x
* SPR-10197:
  Attempt to repro ReflectionUtils performance issue
2013-01-21 14:04:41 +01:00
Chris Beams cb8dc73fbb Attempt to repro ReflectionUtils performance issue
Issue: SPR-10197
2013-01-21 14:03:36 +01:00
Chris Beams 06017e7ecc Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Ensure -PtestGroups is passed through to unit tests
2013-01-21 14:00:21 +01:00
Chris Beams 4dc3fcecbd Ensure -PtestGroups is passed through to unit tests
Issue: SPR-9984
2013-01-21 13:57:32 +01:00
Chris Beams c97f26d516 Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add TimedSpringRunnerTests to performance test group
2013-01-21 12:45:03 +01:00
Chris Beams fc6377cc53 Add TimedSpringRunnerTests to performance test group
Issue: SPR-9984
2013-01-21 12:44:47 +01:00
Chris Beams d40c8cfc58 Fix broken Castor URLs in ref docs and mapping XML
Issue: SPR-10189
2013-01-21 11:21:44 +01:00
Chris Beams 24cc33306d Fix typo in reference documentation
Issue: SPR-10171
2013-01-21 11:07:04 +01:00
Juergen Hoeller 5d9ad5b1d1 AbstractDriverBasedDataSource does not rely on Properties chaining anymore
Issue: SPR-9461
2013-01-18 19:07:30 +01:00
Juergen Hoeller 87968e5a71 Further preparations for 3.2.1 2013-01-18 18:01:33 +01:00
Juergen Hoeller 944e1c95e6 EhCacheManagerFactoryBean applies cacheManagerName ahead of creation (for EHCache 2.5 compatibility)
Issue: SPR-9171
2013-01-18 17:58:24 +01:00
Juergen Hoeller cca255bc79 Added "exposeAccessContext" flag JndiRmiClientInterceptor/ProxyFactoryBean (for WebLogic)
Issue: SPR-9428
2013-01-18 16:51:21 +01:00
Juergen Hoeller 701c5f1110 ContextLoader properly detects pre-refreshed WebApplicationContext
Issue: SPR-9996
2013-01-18 15:20:55 +01:00
Juergen Hoeller 8c9383da7c BridgeMethodResolver properly handles bridge methods in interfaces
Issue: SPR-9330
2013-01-18 15:00:00 +01:00
Juergen Hoeller ed952ccba1 LocalVariableTableParameterNameDiscoverer works for bridge methods as well
Issue: SPR-9429
2013-01-18 14:52:24 +01:00
Juergen Hoeller 3dd817585b MBeanExporter does not log warnings for manually unregistered MBeans
Issue: SPR-9451
2013-01-18 14:43:11 +01:00
Juergen Hoeller 721fa9db6a SpringBeanAutowiringInterceptor eagerly releases BeanFactory if post-construction fails
Issue: SPR-10013
2013-01-18 14:12:02 +01:00
Juergen Hoeller 20c4ba40d8 AbstractDriverBasedDataSource does not rely on Properties chaining anymore
Issue: SPR-9461
2013-01-18 14:02:13 +01:00
Juergen Hoeller be606f4169 Added hint towards not using orm.hibernate3 classes with Hibernate 4
Issue: SPR-9365
2013-01-18 13:58:22 +01:00
Juergen Hoeller 13cf1fceaa Fixed reference to "fallbackToNoOpCache" flag
Issue: SPR-9064
2013-01-18 13:49:57 +01:00
Juergen Hoeller cd2183f9e1 Fixed ConnectionSpecConnectionFactoryAdapter explanation
Issue: SPR-9466
2013-01-18 13:47:11 +01:00
Juergen Hoeller 8a12b9e23f Removed reference to AttributesJmxAttributeSource
Issue: SPR-8916
2013-01-18 13:42:21 +01:00
Juergen Hoeller d55877ccf2 spring-jms-3.2.xsd allows for SpEL expressions in prefetch and receive-timeout attributes
Issue: SPR-9553
2013-01-18 13:32:11 +01:00
Juergen Hoeller 6a5744e61c CachedIntrospectionResults.clearClassLoader(null) removes cached classes for the system class loader
Issue: SPR-9189
2013-01-18 13:32:10 +01:00
Chris Beams dcf7d1864e Increment snapshot version from 3.3 => 4.0
See http://blog.springsource.org/2013/01/16/next-stop-spring-framework-4-0
for details.
2013-01-16 14:43:48 +01:00
Chris Beams e659deab4f Remove .aj sources from spring-aspects jar
Issue: SPR-10179
2013-01-16 08:56:06 +01:00
Chris Beams 19445508b3 Polish build.gradle 2013-01-16 08:55:58 +01:00
Chris Beams 26d5ef93e6 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
arrangement.

Also:

 - 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)
2013-01-16 08:11:55 +01:00
Rob Winch 6888a6f286 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
2013-01-15 17:20:54 -06:00
Juergen Hoeller e44b4b831e Further fixes for 3.2.1 2013-01-15 22:10:14 +01:00
Juergen Hoeller 2cd23a79a3 Polishing 2013-01-15 22:09:16 +01:00
Juergen Hoeller 450dbb2810 Reintroduced "mode" and "proxy-target-class" attributes in spring-task-3.1/3.2.xsd
Issue: SPR-10177
2013-01-15 22:05:21 +01:00
Juergen Hoeller abbe1db106 Polishing along with backport 2013-01-15 16:52:09 +01:00
Juergen Hoeller a3211782a6 AbstractCacheManager accepts no caches defined, allowing for EHCache default cache setup
Issue: SPR-7955
2013-01-15 15:54:14 +01:00
Sam Brannen f3e5f8bb4e Update copyright year, author tags, and Javadoc 2013-01-15 12:11:44 +01:00
Sam Brannen 33ee0ea4a6 Fix broken test in ContentAssertionTests 2013-01-15 11:56:27 +01:00
Rossen Stoyanchev b2d6596901 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
content().contentTypeCompatibleWith(MediaType.TEXT_PLAIN).

Issue: SPR-10165
2013-01-14 22:00:55 -05:00
Rossen Stoyanchev 9dc7b5feef 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
2013-01-14 22:00:55 -05:00
Rossen Stoyanchev a16bad04f0 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
2013-01-14 22:00:54 -05:00
Rossen Stoyanchev ad025b59c5 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
2013-01-14 22:00:54 -05:00
Phillip Webb ad91fa63fa 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
2013-01-14 15:49:38 -08:00
Phillip Webb bff36fb145 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
2013-01-14 14:07:26 -08:00
Phillip Webb d40bd8bd19 Tweak eclipse warning settings
Hide raw-type, generic and resource leak warnings.
2013-01-14 11:43:58 -08:00
Phillip Webb 8bb67149a7 Fix eclipse .settings generation
Fix issues where gradle would not regenerate .settings files due to
the task being considered UP-TO-DATE.
2013-01-14 11:42:12 -08:00
Phillip Webb f57c24cd8c Allow 'gradle eclipse' without 'cleanEclipse'
Allow eclipse projects to be regenerated without first requiring the
'gradle cleanEclipse' task to be executed.
2013-01-14 10:25:33 -08:00
Sam Brannen 8694a0aac0 Minor changes to AnnotationUtils
- Polished Javadoc for isAnnotationDeclaredLocally() and
  isAnnotationInherited().
- Removed unnecessary call to Arrays.asList() in
  isAnnotationDeclaredLocally().
2013-01-14 12:24:12 +01:00
Sam Brannen 8a37521a3c Fix copyright year & method names in spring-test
This commit fixes the copyright year for changes made in commit
5b147bfba8. In addition, method names
have been changed to reflect the semantic changes made in that same
commit.
2013-01-14 11:40:21 +01:00
Phillip Webb e4c1361c60 Remove accidentally committed interface @Override 2013-01-11 15:25:12 -08:00
Phillip Webb e8fcde09ab Polish author and copyright year 2013-01-11 15:12:59 -08:00
Phillip Webb fce7adc400 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
methods.

Issue: SPR-10162
2013-01-11 15:07:06 -08:00
Phillip Webb 5ddc313bef Upgrade to prop-deps gradle plugin 0.0.3 2013-01-11 15:07:06 -08:00
Rossen Stoyanchev 54c873b4c4 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
2013-01-11 16:28:19 -05:00
Juergen Hoeller f0a1ff2d76 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
2013-01-11 21:55:57 +01:00
Phillip Webb 68970b7902 Merge branch 'SPR-9518' into 3.2.x
* SPR-9518:
  Generate eclipse project settings from gradle
2013-01-11 12:43:25 -08:00
Phillip Webb 2db7a12288 Generate eclipse project settings from gradle
Update gradle to generate the following project specific eclipse
settings:

- 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
2013-01-11 12:43:16 -08:00
Sam Brannen 5b147bfba8 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.
2013-01-11 21:31:46 +01:00
Phillip Webb c1fe3c056a Polish DetectSplitPackagesPlugin
Polish DetectSplitPackagesPlugin to favor double-quoted strings.
2013-01-11 12:19:52 -08:00
Chris Beams bfdc191035 Merge branch 'SPR-10093' into 3.2.x
* SPR-10093:
  Polish changes from pull request #205
2013-01-11 16:35:08 +01:00
Chris Beams 74137794da 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
2013-01-11 16:32:52 +01:00
Chris Beams 54d2846816 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
2013-01-11 15:55:33 +01:00
Chris Beams 654c07db34 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
2013-01-11 15:54:11 +01:00
Chris Beams b8f408ed5f Replace space indentation with tabs
Issue: SPR-9990
2013-01-11 15:44:00 +01:00
Phillip Webb c425d22151 Exclude eclipse WTP generated artifacts 2013-01-10 23:17:49 -08:00
Phillip Webb a0e5394203 Exclude stax test dependency
Exclude transitive stax 1.0 dependency to prevent compile time
eclipse errors.
2013-01-10 23:17:34 -08:00
Sam Brannen 18bf860c27 Update Javadoc for MockMvc
Deleted reference to the obsolete configureWarRootDir() method from the
stand-alone spring-test-mvc project.
2013-01-11 00:31:37 +01:00
Rob Winch 91da138314 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
2013-01-10 15:40:22 -06:00
Sam Brannen 2427391286 Polish Javadoc in CookieValue and RequestHeader 2013-01-10 17:33:59 +01:00
Juergen Hoeller ea823fd398 AnnotationAwareOrderComparator etc 2013-01-10 17:01:18 +01:00
Juergen Hoeller e806c4eb3d AnnotationAwareOrderComparator is able to sort Class objects as well
Issue: SPR-10152
2013-01-10 17:00:46 +01:00
Juergen Hoeller dae4485155 Added dedicated sort method to AnnotationAwareOrderComparator
Issue: SPR-9625
2013-01-10 17:00:45 +01:00
Juergen Hoeller f6d7518013 SpringContextResourceAdapter implements equals/hashCode according to the JCA 1.5 contract
Issue: SPR-9162
2013-01-10 17:00:44 +01:00
Juergen Hoeller 5e8e901aba FreeMarkerConfigurationFactory properly supports TemplateLoaders when recreating Configurations
Issue: SPR-9389
2013-01-10 17:00:43 +01:00
Juergen Hoeller f8a7cf9f51 MimeMessageHelper encodes attachment filename if not ASCII compliant
Issue: SPR-9258
2013-01-10 17:00:42 +01:00
Juergen Hoeller 97ae403b53 AbstractAdvisingBeanPostProcessor caches per bean target class, working for null bean names as well
Issue: SPR-10144
2013-01-10 17:00:41 +01:00
Juergen Hoeller 3a9ca4a6bb MessageSourceResourceBundle overrides JDK 1.6 containsKey method, avoiding NPE in getKeys
Issue: SPR-10136
2013-01-10 17:00:40 +01:00
Juergen Hoeller 10dceb182e Marked LocalCacheProviderProxy as deprecated (following Hibernate 3.3.'s CacheProvider deprecation) 2013-01-10 17:00:40 +01:00
Sam Brannen 4ae9cf7cf1 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 3d1b3868fe.
- Deleted the now obsolete SPR-9398.txt file.

Issue: SPR-9398
2013-01-10 16:42:44 +01:00
Phillip Webb 0b612d651e Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Replace EasyMock with Mockito in spring-orm
2013-01-09 17:44:21 -08:00
Phillip Webb 1386479d6c Merge branch 'SPR-10126' into cleanup-3.2.x
* SPR-10126:
  Replace EasyMock with Mockito in spring-orm
2013-01-09 17:43:25 -08:00
Phillip Webb ee1ddc90ec Replace EasyMock with Mockito in spring-orm
Issue: SPR-10126
2013-01-09 17:42:12 -08:00
Rossen Stoyanchev 2f6e45ff06 Add protected method to AbstractHandlerMethodMapping 2013-01-09 05:44:23 -05:00
Rossen Stoyanchev f185c3a3c1 Add option to not trim path segments in AntPathMatch
Issue: SPR-8687
2013-01-08 12:03:51 -05:00
Rossen Stoyanchev 68d4a70f8e Add option to always append 'must-revalidate'
Issue: SPR-9248
2013-01-08 11:44:24 -05:00
Rossen Stoyanchev 24ffa5a706 Update info on RestTemplate related to 401 status code
Issue: SPR-9367
2013-01-08 10:48:22 -05:00
Chris Beams 0829cbfdd3 Update license header for recently modified files
Issue: SPR-7763, SPR-10140, SPR-10132, SPR-10093, SPR-10103
2013-01-08 16:23:46 +01:00
Rossen Stoyanchev 07605948ff Merge pull request #205 from acogoluegnes/SPR-10093
* tmp:
  Add support for HTTP OPTIONS in Spring MVC Test
2013-01-08 10:04:21 -05:00
Arnaud Cogoluègnes a56d8f28fe Add support for HTTP OPTIONS in Spring MVC Test
Issue: SPR-10093
2013-01-08 10:01:51 -05:00
Rossen Stoyanchev c7d0054a9e 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.

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

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

Issue: SPR-10103
2013-01-08 10:01:51 -05:00
Rossen Stoyanchev 2ac4a8c541 Update mvc chapter on annotations and proxies
Issue: SPR-10132
2013-01-08 10:01:51 -05:00
Rossen Stoyanchev 87109b348c Add decoding matrix variable values
Issue: SPR-10140
2013-01-08 10:01:51 -05:00
Rossen Stoyanchev 2391277115 Fix issue in BufferedImageHttpMessageConverter
This change ensures BufferedImageHttpMessageConverter writes when
"*/*" is requested.

Issue: SPR-7763
2013-01-08 10:01:51 -05:00
Chris Beams 4611d150fe Merge branch 'SPR-9843' into 3.2.x
* SPR-9843:
  Add 3.1 migration section to reference docs
2013-01-08 12:32:53 +01:00
Chris Beams b8f223c404 Add 3.1 migration section to reference docs
Address error raised when using component-scan against the unqualified
"org" base package.

Issue: SPR-9843
2013-01-08 11:30:22 +01:00
Rossen Stoyanchev 7bc9667913 Add support for placeholders in @RequestMapping
@RequestMapping annotations now support ${...} placeholders.

Issue: SPR-9935
2013-01-07 18:06:47 -05:00
Phillip Webb 15c0971381 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
2013-01-07 14:10:23 -08:00
Rossen Stoyanchev 153508a300 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.

[0] http://tools.ietf.org/html/draft-ietf-appsawg-http-forwarded-10

Issue: SPR-10110
2013-01-07 16:55:09 -05:00
Phillip Webb f92f58d0b3 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
generation.
2013-01-07 13:10:22 -08:00
Glyn Normington 2df08bdfbd 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
detected.

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

Issues: SPR-9990, SPR-10150

Conflicts:

	build.gradle
2013-01-07 13:49:44 +00:00
Rob Winch a27a3be76c Example SplitPackageDetectorPlugin 2013-01-07 13:48:17 +00:00
Glyn Normington 00a86c3722 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
maintenance.

Juergen Hoeller supports this position in the following comment in
SPR-9990:

>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

Conflicts:

	build.gradle
2013-01-07 13:47:44 +00:00
Chris Beams ad1fda59c3 Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Mark all IsFastEnough tests as performance tests
2013-01-07 12:04:23 +01:00
Chris Beams 29dd91b3ec Merge pull request #212 from sslavic/SPR-9984
# By Stevo Slavic
* sslavic/SPR-9984:
  Mark all IsFastEnough tests as performance tests
2013-01-07 12:03:01 +01:00
Stevo Slavic 4c0a306943 Mark all IsFastEnough tests as performance tests
This patch marks remaining/missed tests as ones belonging to
performance tests group.

Issue: SPR-9984
2013-01-07 11:58:18 +01:00
Phillip Webb b78a8a412d 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
  ...
2013-01-04 14:45:04 -08:00
Chris Beams 895feda349 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
2013-01-04 12:24:07 +01:00
Chris Beams 3a61e9999f 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
2013-01-04 12:22:14 +01:00
Chris Beams cf68cc5f0b 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
2013-01-04 12:20:19 +01:00
Chris Beams 676231644d Update Apache license headers for moved files
Issue: SPR-9431
2013-01-04 12:20:13 +01:00
Chris Beams 42729014b6 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 com.foo 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
2013-01-04 12:16:20 +01:00
Chris Beams 662a02b952 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
2013-01-04 11:41:49 +01:00
Chris Beams 15e9fe638c 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
2013-01-04 11:38:58 +01:00
Chris Beams 51b307681a Fix warnings due to unused import statements
Issue: SPR-9431
2013-01-04 11:04:54 +01:00
Chris Beams 03517871a6 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.
2013-01-04 10:59:40 +01:00
Chris Beams b836e14b5f 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

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:31:31 +01:00
Chris Beams d1e6dbe74a Update Apache license headers for affected sources 2013-01-04 10:29:11 +01:00
Phillip Webb 42b5d6dd7e 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'
project.

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.

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/factory/ConcurrentBeanFactoryTests.java
	spring-beans/src/test/java/org/springframework/beans/factory/support/BeanFactoryGenericsTests.java
	spring-beans/src/test/java/org/springframework/beans/support/PagedListHolderTests.java
2013-01-04 10:02:29 +01:00
Phillip Webb 2a30fa07ea Replace test beans with test objects
Refactor spring-core tests to replace test beans from
'org.springframework.beans' with lighter test objects in
'org.springframework.tests.sample.objects'.
2013-01-04 10:02:29 +01:00
Chris Beams bd1db73a17 Merge branch 'share-test-classes' into cleanup-3.2.x
* share-test-classes:
  Polish test sourceSet dependencies
  Add test dependencies sources for testCompile
2013-01-04 09:55:19 +01:00
Phillip Webb 16a3a8bda8 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.
2013-01-04 09:39:27 +01:00
Phillip Webb d52f883453 Add test dependencies sources for testCompile
Update the TestSourceSetDependenciesPlugin to consider testCompile
configurations.
2013-01-04 09:39:27 +01:00
Chris Beams d3fe57816b Merge branch '3.2.x' into master
* 3.2.x:
  Use unmodified 'version' when not on a topic branch
2013-01-04 00:36:22 +01:00
Chris Beams 0e8e9981f5 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  Use unmodified 'version' when not on a topic branch
2013-01-03 23:56:43 +01:00
Chris Beams 1487b70394 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Use unmodified 'version' when not on a topic branch
2013-01-03 23:56:31 +01:00
Chris Beams 7d6161f280 Use unmodified 'version' when not on a topic branch 2013-01-03 23:54:52 +01:00
Chris Beams 7a737bebdd Merge branch '3.2.x' into master
* 3.2.x:
  Fix ClassCastException when setting media types
  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
  Fix null parameterName issue in content negotiation
  Recursively add test dependencies
2013-01-03 22:31:52 +01:00
Chris Beams 3d1b3868fe Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x:
  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
2013-01-03 22:28:37 +01:00
Chris Beams 3b5e90d242 Merge branch 'SPR-8116' into cleanup-3.2.x
* SPR-8116:
  Enable execution of TestNG tests in spring-test
2013-01-03 22:14:30 +01:00
Chris Beams ab16af5c50 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Polish support for topic branch-specific versions
2013-01-03 22:09:18 +01:00
Rossen Stoyanchev 9f9f1ed253 Fix ClassCastException when setting media types
Issue: SPR-10019
2013-01-03 15:13:19 -05:00
Chris Beams 8216e75a91 Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Segregate add'l long-running and performance tests
2013-01-03 19:37:20 +01:00
Chris Beams 3cbb136861 Enable execution of TestNG tests in spring-test
Both JUnit- and TestNG-based tests are once again executed in the
spring-test module.

Note that two lines in FailingBeforeAndAfterMethodsTests had to be
commented out. See diff or `git grep 'See SPR-8116'` for details.

Issue: SPR-8116
2013-01-03 19:34:29 +01:00
Chris Beams 44a7e77e6d Polish support for topic branch-specific versions
Issue: SPR-10124
2013-01-03 19:31:51 +01:00
Chris Beams 68e3b7773c Segregate add'l long-running and performance tests
- Add TestGroup#LONG_RUNNING to distinguish from #PERFORMANCE, the
   former being tests that simply take a long time vs the latter being
   tests that are actually dependent on certain actions happening within
   a given time window and are thefore CPU-dependent.

Issue: SPR-9984
2013-01-03 19:28:05 +01:00
Chris Beams acd86a1fd7 Merge branch 'cleanup-3.2.x' into SPR-9984 2013-01-03 19:26:24 +01:00
Chris Beams 830d73b4a7 Eliminate EBR dependencies and repository config
Swap the following EBR-specific dependencies for their equivalents at
Maven Central:

 - atinject-tck
 - jaxb
 - xmlbeans

Remove the /ebr-maven-external repository from the build script entirely
such that all dependencies are now resolved against a single repository:

    http://repo.springsource.org/libs-release
2013-01-03 19:19:25 +01:00
Chris Beams dcda78bad6 Skip creation of IDEA metadata for spring-aspects
See diff for details
2013-01-03 19:19:24 +01:00
Chris Beams a6eaf871f1 Fix Eclipse compilation error in Gradle plugin
Prior to this commit, the following compilation error presented itself
when importing buildSrc ('spring-build-src') into Eclipse:

    Groovy:missing type for constructor call @ line 36, column 49.

This commit replaces the use of the diamond operator with typical
generics syntax in order to work around the problem. It is assumed that
the underlying problem is to do with the Groovy compiler in use. This
change ensures that any contributor / committer importing
spring-framework into Eclipse has a straightforward experience without
being required to tweak Groovy settings.

If selection of the correct Groovy compilation settings can be made
automatic, then we should of course feel free to use Java 7-style syntax
there in the future.

Note that this was *not* a problem when importing buildSrc into IDEA 12.
2013-01-03 19:19:24 +01:00
Chris Beams a2d80c6094 Polish build.gradle
- Consolidate shared test systemProperty declarations
 - Consolidate easymock dependency declarations
2013-01-03 19:08:48 +01:00
Chris Beams 1c31f6af8e Merge branch '3.2.x' into cleanup-3.2.x 2013-01-03 19:07:02 +01:00
Rossen Stoyanchev 42cdb200ed Fix null parameterName issue in content negotiation
After this change ParameterContentNegotiationStrategy no longer allows
a null parameter name, ContentNegotiationManagerFactoryBean also
requires it.

Issue: SPR-10139
2013-01-03 11:18:29 -05:00
Phillip Webb 0b2c305072 Recursively add test dependencies
Update TestSourceSetDependenciesPlugin to recursively search project
dependencies when adding test source sets.
2013-01-02 11:51:10 -08:00
Chris Beams 961dbdb68a Merge branch '3.2.x' into master
* 3.2.x:
  Exclude spring-build-src from maven publish
  Move spring-build-junit into spring-core
  Relocate MergePlugin package
  Develop a gradle plugin to add test dependencies
  Expose Gradle buildSrc for IDE support
  Fix [deprecation] compiler warnings
  Upgrade to xmlunit version 1.3
  Improve 'build' folder ignores
  Fix regression in static setter method support
  Fix SpEL JavaBean compliance for setters

Conflicts:
	spring-beans/src/test/java/org/springframework/beans/ExtendedBeanInfoTests.java
2013-01-02 10:36:57 +01:00
Chris Beams 70eaf02b7f Revert "Merge branch 'SPR-10130' into cleanup-master"
This reverts commit 45fa50821a, reversing
changes made to a312d900f8.
2013-01-02 10:33:59 +01:00
Phillip Webb c892b81852 Exclude spring-build-src from maven publish 2013-01-01 20:42:36 -08:00
Phillip Webb 65fb26f847 Move spring-build-junit into spring-core
Move code from spring-build-junit into spring-core/src/test along with
several other test utility classes. This commit removes the temporary
spring-build-junit project introduced in commit
b083bbdec7.
2013-01-01 19:49:45 -08:00
Phillip Webb db2b00a2a5 Relocate MergePlugin package
Relocate the MergePlugin from org.springframework.build.gradle.merge
to org.springframework.build.gradle.
2013-01-01 17:38:06 -08:00
Phillip Webb 290aa5d647 Develop a gradle plugin to add test dependencies
Develop a gradle plugin to automatically update testCompile dependencies
to include the test source sets of project dependencies.

Allows the gradle build to more closely mirror the way that tests run
inside eclipse.
2013-01-01 17:30:28 -08:00
Phillip Webb 57d68b070e Expose Gradle buildSrc for IDE support
Create 'spring-build-src' Gradle module that exposes the buildSrc
folder as an IDE project.
2013-01-01 14:53:42 -08:00
Phillip Webb 6626a38730 Fix [deprecation] compiler warnings
Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
2013-01-01 13:42:15 -08:00
Phillip Webb 9364043a64 Upgrade to xmlunit version 1.3 2013-01-01 13:26:49 -08:00
Phillip Webb 938c24bb9e Improve 'build' folder ignores
Update .gitignore to only ignore 'build' folders in the project roots
rather than throughout the source tree.
2013-01-01 13:24:05 -08:00
Chris Beams 38f84fa03e Merge branch 'SPR-10115' into 3.2.x
* SPR-10115:
  Fix regression in static setter method support
2012-12-31 14:50:38 +01:00
Chris Beams 7a19fd5750 Fix regression in static setter method support
The intention of ExtendedBeanInfo, introduced with SPR-8079 in
v3.1.0.M2, was to support dependency injection against non-void
returning write methods. However, it also inadvertently introduced
support for injection against static setter methods.

When use of ExtendedBeanInfo was made optional with SPR-9723 in
v3.2.0.M2, ExtendedBeanInfo continued to support static write methods,
but its new BeanInfoFactory-based approach to testing whether or not
a given bean class contains candidate write methods was written in a
fashion exclusive of static methods, and this thereby introduced a
regression - a regression in an otherwise undocumented and unintended
feature, but a regression nevertheless.

The reporting of SPR-10115 proves that at least one user has come to
depend on this behavior allowing injection against static write
methods, and so this commit fixes the regression by ensuring that the
candidacy test includes standard and non-void setter methods having a
static modifier.

Issue: SPR-10115, SPR-9723, SPR-8079
2012-12-31 14:16:38 +01:00
Chris Beams 0ed9cb2302 Merge pull request #206 from daveboden/SPR-10122
* SPR-10122:
  Fix SpEL JavaBean compliance for setters
2012-12-31 11:52:18 +01:00
Chris Beams d91a419fdc Fix SpEL JavaBean compliance for setters
Prior to this change, SpEL was capable of handling getter methods for
property names having a lowercase first letter and uppercase second
letter such as:

    public String getiD() { ... }

However, setters with the same naming arrangement were not supported,
e.g.:

    public void setiD() { ... }

This commit ensures that setters and getters are treated by SpEL equally
in this regard, such that "iD"-style property names may be used anywhere
within SpEL expressions.

Issue: SPR-10122, SPR-9123
2012-12-31 11:40:53 +01:00
Chris Beams d5c6d797e5 Merge branch '3.2.x' into master
* 3.2.x:
  Add aop target source test to TestGroup.PERFORMANCE
2012-12-29 01:05:56 +01:00
Chris Beams 55a05744f7 Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add aop target source test to TestGroup.PERFORMANCE
2012-12-29 01:05:46 +01:00
Chris Beams 90d1886cbd Add aop target source test to TestGroup.PERFORMANCE
Issue: SPR-9984
2012-12-29 01:04:57 +01:00
Chris Beams f87b1936b1 Merge branch '3.2.x' into master
* 3.2.x:
  Add quartz scheduling test to TestGroup.PERFORMANCE
2012-12-29 00:26:56 +01:00
Chris Beams 1220611f4a Merge branch 'SPR-9984' into 3.2.x
* SPR-9984:
  Add quartz scheduling test to TestGroup.PERFORMANCE
2012-12-29 00:24:20 +01:00
Chris Beams c005757775 Add quartz scheduling test to TestGroup.PERFORMANCE
Issue: SPR-9984
2012-12-29 00:23:52 +01:00
Chris Beams 30112369fd Merge branch '3.2.x' into master
* 3.2.x:
  Remove extra URL prefix in the MVC chapter
  Polish contributor guidelines
2012-12-28 23:58:46 +01:00
Chris Beams 08c2d2b156 Merge branch 'cleanup-master' into master
* cleanup-master: (36 commits)
  Update Apache license headers for affected sources
  Add @Override annotations to main sources
  Update main source and target JDK compatibility
  Update Apache license headers for affected sources
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
  Replace EasyMock with Mockito in test sources
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
  Replace <code> with {@code} throughout Javadoc
  Fix various Javadoc warnings
  ...
2012-12-28 23:58:15 +01:00
Chris Beams b2a048b6f3 Update Apache license headers for affected sources 2012-12-28 23:57:33 +01:00
Chris Beams 45fa50821a Merge branch 'SPR-10130' into cleanup-master
* SPR-10130:
  Add @Override annotations to main sources
  Update main source and target JDK compatibility
2012-12-28 23:53:35 +01:00
Chris Beams 3b40ce76bf Add @Override annotations to main sources
Issue: SPR-10130
2012-12-28 23:53:24 +01:00
Chris Beams 9c2046c3ee Update main source and target JDK compatibility
Update source and target compatibility from 1.5 to 1.6, meaning that
@Override is now allowed on implementations of interface methods within
main classes.

Issue: SPR-10130
2012-12-28 23:53:24 +01:00
Chris Beams a312d900f8 Merge branch 'cleanup-3.2.x' into cleanup-master
* cleanup-3.2.x: (33 commits)
  Update Apache license headers for affected sources
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
  Replace EasyMock with Mockito in test sources
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
  Replace <code> with {@code} throughout Javadoc
  Fix various Javadoc warnings
  Replace space indentation with tabs
  Remove trailing whitespace in source files
  Various updates to support IDEA
  ...

Conflicts:
	gradle.properties
2012-12-28 23:26:59 +01:00
Chris Beams b83e2617ce Merge pull request #208 from tommack/typo-fix
# By Tom Mack
* typo-fix:
  Remove extra URL prefix in the MVC chapter
2012-12-28 23:18:59 +01:00
Tom Mack 005ee7385f Remove extra URL prefix in the MVC chapter
A link in the MVC chapter of the reference manual contained an extra
"http://" URL prefix.

This commit removes the extra "http://" URL prefix.
2012-12-28 23:18:18 +01:00
Sam Brannen 11d975bfef Polish contributor guidelines 2012-12-28 23:17:52 +01:00
Chris Beams 7736dc3122 Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x: (21 commits)
  Update Apache license headers for affected sources
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
  Replace EasyMock with Mockito in test sources
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
  Replace <code> with {@code} throughout Javadoc
  Fix various Javadoc warnings
  Replace space indentation with tabs
  Remove trailing whitespace in source files
  Various updates to support IDEA
  ...
2012-12-28 23:16:54 +01:00
Chris Beams 8472a2b2ab Update Apache license headers for affected sources 2012-12-28 23:09:31 +01:00
Chris Beams e7155616a5 Merge branch 'SPR-9984' into cleanup-3.2.x
* SPR-9984:
  Ignore performance-sensitive tests by default
  Introduce 'spring-build-junit' subproject
2012-12-28 23:08:56 +01:00
Phillip Webb 60032e0012 Ignore performance-sensitive tests by default
Make use of the new JUnit functionality introduced in the previous
commit to 'Assume' that perfomance- and timing-sensitive tests should
run only when TestGroup.PERFORMANCE is selected, i.e. when
-PtestGroups="performance" has been provided at the Gradle command line.

The net effect is that these tests are now ignored by default, which
will result in far fewer false-negative CI build failures due to
resource contention and other external factors that cause slowdowns.

We will set up a dedicated performance CI build to run these tests on
an isolated machine, etc.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Phillip Webb b083bbdec7 Introduce 'spring-build-junit' subproject
Introduce new 'spring-build-junit' subproject containing shared
JUnit utilities and classes to be used by other test cases. This
project is for internal use within the framework, and therefore
creates no artifacts to be published to any repository.

The initial code includes support for JUnit Assumptions that can
be used to determine when a test should run. Tests can be skipped
based on the running JDK version, logging level or based on specific
'groups' that have activated via a Gradle property.

It is intended that sources within the spring-build-junit project be
folded into spring-core/src/test/java, pending some Gradle work that
will facilitate sharing test output across subprojects; therefore this
commit should be seen as a temporary solution.

Issue: SPR-9984
2012-12-28 23:08:37 +01:00
Chris Beams 330457be95 Merge branch 'SPR-10126' into cleanup-3.2.x
* SPR-10126:
  Replace EasyMock with Mockito in test sources
2012-12-28 23:07:27 +01:00
Phillip Webb d66c733ef4 Replace EasyMock with Mockito in test sources
Issue: SPR-10126
2012-12-28 23:07:04 +01:00
Chris Beams cbf6991d47 Merge branch 'SPR-10129' into cleanup-3.2.x
* SPR-10129:
  Add @Override annotations to test sources
  Update test source and target JDK compatibility
2012-12-28 23:06:22 +01:00
Chris Beams 4c8cd7b0bd Add @Override annotations to test sources
Issue: SPR-10129
2012-12-28 23:05:44 +01:00
Chris Beams 6f0c7eb8c1 Update test source and target JDK compatibility
"test" source and target compatibility has been upgraded to 1.7 except
where noted, allowing us to use 1.7 language features such as
diamond-style (<>) generics declarations, automatic resource management
and multi-catch. More importantly, we will be able to upgrade to 1.8
once it is available in order to make use of lambda expressions, etc in
our test cases.

IDE configurations must be relaxed to allow 1.7 across the board, as
neither Eclipse nor IDEA are clever enough to allow for different
language levels across production and test resources. See [1] for a
feature request on that front.

spring-oxm is a special case here, and has been pinned at 1.6
compatibility even for its test sources in order to avoid a class
verification error that JibX throws when encountering 1.7-level
bytecode [2].

Likewise with spring-orm, toplink encounters a similar class
verification error, so has been pinned to 1.6 for the time being.
When we remove the (already deprecated since 3.2) Toplink support
we can restore compatibility to 1.7.

[1]: http://youtrack.jetbrains.com/issue/IDEA-97814
[2]: http://jira.codehaus.org/browse/JIBX-465

Issue: SPR-10129
2012-12-28 23:04:44 +01:00
Chris Beams aa824641ab Merge branch 'SPR-9431' into cleanup-3.2.x
* SPR-9431:
  Update -Xlint compiler warning output
  Fix various compiler warnings in spring-context
  Fix "unnecessary @SuppressWarnings" warnings
  Fix [rawtypes] compiler warnings
  Fix [dep-ann] warnings with @Deprecated
  Fix [cast] compiler warnings
  Fix [serial] compiler warnings
  Fix [varargs] compiler warnings
  Fix warnings due to unused import statements
2012-12-28 22:56:04 +01:00
Phillip Webb 3ac45547cf Update -Xlint compiler warning output
Enable output for the compiler warnings that have been eliminated so
far. 'rawtypes', 'deprecation', and 'unchecked' remain suppressed until
these warnings can be fully eliminated as well.
2012-12-28 22:53:48 +01:00
Chris Beams 40357be72b Fix various compiler warnings in spring-context
All warning types other than [deprecation] and [unchecked] are now
fixed in spring-context/src/test
2012-12-28 22:50:46 +01:00
Chris Beams 4c7cafbde6 Fix "unnecessary @SuppressWarnings" warnings 2012-12-28 22:50:46 +01:00
Chris Beams 8d2e125e7b Fix [rawtypes] compiler warnings
- Suppress rawtypes warnings for src/main
 - Enable rawtypes warnings for src/test

This commit attempts to to resolve all rawtypes problems across tests as
aggressively as possible, i.e. without regard for binary compatibility,
whereas main sources must be treated much more cautiously with an eye
toward compatibility.
2012-12-28 22:50:46 +01:00
Chris Beams 4d97ff2479 Fix [dep-ann] warnings with @Deprecated 2012-12-28 22:50:45 +01:00
Phillip Webb 6c14eaad61 Fix [cast] compiler warnings 2012-12-28 22:41:06 +01:00
Phillip Webb b0986049a3 Fix [serial] compiler warnings
Fix serialization warnings by applying @SuppressWarnings("serial")
when appropriate.

In certain cases and for unknown reasons, a correctly-placed
@SuppressWarnings("serial") annotation will fix the warning at the
javac level (i.e. the Gradle command-line), but will produce an
"unnecessary @SuppressWarnings" warning within Eclipse. In these
cases, a private static final serialVersionUID field has been added
with the default value of 1L.
2012-12-28 22:41:06 +01:00
Phillip Webb 7f0aa5cfb2 Fix [varargs] compiler warnings
Remove unnecessary 'null' argument from calls to vararg supported
methods and fix cast in ValidationUtils.invokeValidator().
2012-12-28 22:40:49 +01:00
Phillip Webb 731d5be644 Fix warnings due to unused import statements 2012-12-28 22:40:49 +01:00
Chris Beams fe039030a0 Merge branch 'SPR-10128' into cleanup-3.2.x
* SPR-10128:
  Replace <code> with {@code} throughout Javadoc
  Fix various Javadoc warnings
2012-12-28 22:36:32 +01:00
Chris Beams 9540d2c81b Replace <code> with {@code} throughout Javadoc
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Chris Beams 8597ec25ec Fix various Javadoc warnings
Issue: SPR-10128
2012-12-28 22:36:02 +01:00
Chris Beams 84e2be4412 Merge branch 'SPR-10127' into cleanup-3.2.x
* SPR-10127:
  Replace space indentation with tabs
  Remove trailing whitespace in source files
2012-12-28 20:53:32 +01:00
Phillip Webb 2cf45bad86 Replace space indentation with tabs
Issue: SPR-10127
2012-12-28 20:49:56 +01:00
Phillip Webb 1762157ad1 Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
    xargs perl -p -i -e "s/[ \t]*$//g" {} \;

Issue: SPR-10127
2012-12-28 20:49:45 +01:00
Chris Beams 44a474a014 Various updates to support IDEA
Remove the 'final' modifier from SingletonBeanFactoryLocatorTests
to work around the "cannot extend final class" error issued when
running all tests. The error was due to confusion with IDEA between
the two variants of SingletonBeanFactoryLocatorTests across
spring-context and spring-beans.

Rename one of the GroovyMessenger classes to GroovyMessenger2.
Previously there were multiple Groovy classes named
'GroovyMessenger', causing a compilation error in certain IDE
arrangements.

Update import-into-idea.md documentation

Add various IDEA artifacts to .gitignore
 - ignore derby.log wherever it is written
 - ignore IDEA's test-output directory
 - ignore IDEA's Atlassian connector config file
2012-12-28 19:50:04 +01:00
Chris Beams e78a1dcdd1 Merge branch 'SPR-10124' into cleanup-3.2.x
* SPR-10124:
  Support snapshot versions qualified by branch name
2012-12-28 19:47:58 +01:00
Chris Beams 426b099965 Support snapshot versions qualified by branch name 2012-12-28 13:15:21 +01:00
Chris Beams 0758e72465 Update contributor guidelines regarding 3.2.x branch 2012-12-28 10:26:29 +01:00
Chris Beams 3724b90a8f Add spring-oxm-1.5.xsd
Issue: SPR-10121
2012-12-26 09:31:00 +01:00
Phillip Webb 1abb7f66a7 Fix GenericConversionService search algorithm
Previously the algorithm used by GenericConversionService to find
converters incorrectly searched for interfaces working up from the
base class. This caused particular problems with custom List
converters as as the Collection interface would be considered before
the List interface giving CollectionToObjectConverter precedence
over the custom converter.

The updated algorithm restores the class search order to behave in the
same way as Spring 3.1.

Issue: SPR-10116
Backport-Issue: SPR-10117
Backport-Commit: aa914497dc
2012-12-22 11:53:00 -08:00
Phillip Webb aa914497dc Fix GenericConversionService search algorithm
Previously the algorithm used by GenericConversionService to find
converters incorrectly searched for interfaces working up from the
base class. This caused particular problems with custom List
converters as as the Collection interface would be considered before
the List interface giving CollectionToObjectConverter precedence
over the custom converter.

The updated algorithm restores the class search order to behave in the
same way as Spring 3.1.

Issue: SPR-10116
2012-12-22 10:52:15 -08:00
Juergen Hoeller a30ee0164a Initial preparations for 3.2.1 2012-12-20 17:35:31 +01:00
Juergen Hoeller c242abada1 Fixed QualifierAnnotationAutowireCandidateResolver's detection of custom qualifier annotations
Issue: SPR-10107
2012-12-20 17:35:02 +01:00
Juergen Hoeller 047db8cdf8 Fixed AbstractAutoProxyCreator to accept null bean names again
Issue: SPR-10108
2012-12-20 17:33:26 +01:00
Chris Beams 1c306dffcd 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
arrangement.

Also:

 - 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
2012-12-20 02:17:42 +01:00
Juergen Hoeller d3da2edf18 JmsTemplate uses configured receiveTimeout if shorter than remaining transaction timeout
Issue: SPR-10109
2012-12-19 21:42:37 +01:00
Juergen Hoeller b73a7a8410 Added MappingJackson2MessageConverter for JMS
Issue: SPR-10099
2012-12-19 20:10:42 +01:00
Juergen Hoeller c954d10be4 Allow for SpEL expressions in initial-delay attribute
Issue: SPR-10102
2012-12-19 12:09:18 +01:00
Sam Brannen 155aecf557 Fix typo in 3.2 migration guide
- @WebApplicationContext --> @WebAppConfiguration

Backport-Commit: 62e9d6b105
2012-12-17 18:40:54 +01:00
Craig Walls ccb1153440 Fix JavaDoc in MockRestServiceServer 2012-12-14 10:07:50 -05:00
Craig Walls bf8a33902f Fix JavaDoc in MockRestServiceServer 2012-12-14 10:06:11 -05:00
Sam Brannen 62e9d6b105 Fix typo in 3.2 migration guide
- @WebApplicationContext --> @WebAppConfiguration
2012-12-13 22:23:37 +01:00
Chris Beams 6be0445072 Increment version to 3.2.1.BUILD-SNAPSHOT 2012-12-13 18:01:06 +01:00
Chris Beams 3d3469c015 Increment version to 3.3.0.BUILD-SNAPSHOT 2012-12-13 17:36:45 +01:00
Spring Buildmaster abdcefb460 Release version 3.2.0.RELEASE 2012-12-13 17:35:15 +01:00
Chris Beams b472fe361d Restore 3.2.0.RELEASE url paths in migration guide 2012-12-13 17:35:15 +01:00
Chris Beams f1550b67fa Update "what's new" in 3.1 and 3.2 sections
- Remove unnecessary "overview of new features" section in 3.1
 - Mention new Gradle build and GitHub-based source control in 3.2
2012-12-13 15:43:02 +01:00
Chris Beams 57468aded9 Upgrade reference plugin to version 0.2.4
Pick up fix for regression in version 0.2.3 that caused project-specific
images, e.g. diagrams not to be copied into the images/ folder, thereby
causing broken image links online and in the PDF.
2012-12-13 15:21:57 +01:00
Chris Beams c5c464c885 Remove previousVersion from 'jdiff' Gradle task 2012-12-13 12:52:30 +01:00
Juergen Hoeller 22e9e0bf03 Minor rewording 2012-12-13 12:20:25 +01:00
Juergen Hoeller 0019d68c75 Final preparations for 3.2 GA 2012-12-13 11:33:35 +01:00
Juergen Hoeller 6b3284f6b0 DefaultMessageListenerContainer clears resources of paused tasks when shutting down after stop
Issue: SPR-10092
2012-12-13 11:29:40 +01:00
Juergen Hoeller 431c7ff31f SpEL correctly handles "is" accessors with Boolean return type
Issue: SPR-10091
2012-12-13 10:15:19 +01:00
Juergen Hoeller bda07059d0 What's new and migration doc updates 2012-12-13 01:38:13 +01:00
Sam Brannen 59a8da3eff Polish the migration guide
- Added missing <para> tags to the JDiff reports section.

 - Converted tabs to spaces.
2012-12-13 01:14:08 +01:00
Sam Brannen 2775862c50 Update migration guide regarding spring-test
This commit adds information to the 3.2 migration guide regarding
deprecations and Maven dependencies in the spring-test module.
2012-12-13 01:05:15 +01:00
Phillip Webb b3b1fe1566 Update API links in reference documentation
Replace all API links with the correct springsource.org URL
2012-12-12 15:49:00 -08:00
Juergen Hoeller 8aed322284 Final preparations for 3.2 GA 2012-12-13 00:39:55 +01:00
Juergen Hoeller e080af8d85 SpEL indexer uses direct access to specific List elements instead of iterating over the Collection
Issue: SPR-10035
2012-12-13 00:36:20 +01:00
Juergen Hoeller 531318a4b2 Polishing 2012-12-13 00:03:26 +01:00
Juergen Hoeller a35b9c9431 Revert "Cache MethodParameter annotation lookup results"
This reverts commit c10d63dc01.
2012-12-12 23:57:50 +01:00
Juergen Hoeller 33471a1744 Removed "target" entry from gitignore, allowing to commit changes to the "org.springframework.aop.target" package 2012-12-12 23:55:47 +01:00
Juergen Hoeller b9df7d68d9 Consistent fine-tuning of synchronized and concurrent data structures
In particular, avoiding synchronized Sets and Maps wherever possible (preferring a ConcurrentHashMap even instead of a synchronized Set) and specifying appropriate ConcurrentHashMap initial capacities (even if we end up choosing 16).
2012-12-12 23:46:26 +01:00
Juergen Hoeller a2f8902b3a Inlined AntPathStringMatcher into AntPathMatcher
Also initializing the capacity of the AntPathStringMatcher cache to 256 now.
2012-12-12 23:39:25 +01:00
Juergen Hoeller 710fe9349a Deprecated CachingMapDecorator (following the deprecation of LabeledEnum support) 2012-12-12 23:39:24 +01:00
Juergen Hoeller 6e8117c627 Polishing along with backports to 3.1.4 2012-12-12 23:39:23 +01:00
Chris Beams 3458d4d945 Add 'Migrating to Spring Framework 3.2' appendix 2012-12-12 22:45:30 +01:00
Chris Beams a4f882fbf0 Fully qualify Spring=>Spring Framework in ref docs
This is not a comprehensive update, only covering the "What's new"
sections for now.
2012-12-12 22:45:30 +01:00
Rob Winch b16bf2d83e Rm buildSrc/src/main/groovy from Eclipse Sources
Previously buildSrc/src/main/groovy was a source folder within Eclipse.
This caused build errors due to missing dependencies for Gradle.

This commit removes buildSrc/src/main/groovy from the source folders
within Eclipse to prevent errors from being displayed.
2012-12-12 12:24:40 -06:00
Rossen Stoyanchev 26b1f44ce7 Update reference doc for async web request config
Issue: SPR-9400
2012-12-12 12:58:47 -05:00
Rossen Stoyanchev c209b6700a Update reference docs on content negotiation config 2012-12-12 12:33:47 -05:00
Chris Beams 4badf2503b Upgrade to AspectJ 1.7.1
This change upgrades the spring-framework build to AspectJ 1.7.1 to
ensure compatibility. We remain backward-compatible to at least AJ
1.6.12 (the previous version), and likely back to 1.6.7.

AJ 1.7 allows for weaving Java 7 bytecode, particularly with regard
to invokedynamic instructions, and furthermore makes improvements to
the aspectj language itself to allow users to take advantage of Java 7-
style language features within aspects. See [1] for details.

[1]: http://eclipse.org/aspectj/doc/released/README-170.html

Issue: SPR-10079
2012-12-12 13:33:21 +01:00
Chris Beams f26534700a Eliminate all Javadoc warnings
- Support external Javadoc links using Gradle's javadoc.options.links

 - Fix all other Javadoc warnings, such as typos, references to
   non-existent (or no longer existent) types and members, etc,
   including changes related to the Quartz 2.0 upgrade (SPR-8275) and
   adding the HTTP PATCH method (SPR-7985).

 - Suppress all output for project-level `javadoc` tasks in order to
   hide false-negative warnings about cross-module @see and @link
   references (e.g. spring-core having a @see reference to spring-web).
   Use the `--info` (-i) flag to gradle at any time to see project-level
   javadoc warnings without running the entire `api` task. e.g.
   `gradle :spring-core:javadoc -i`

 - Favor root project level `api` task for detection of legitimate
   Javadoc warnings. There are now zero Javadoc warnings across the
   entirety of spring-framework. Goal: keep it that way.

 - Remove all @link and @see references to types and members that exist
   only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
   respectively. This is necessary because only one version of each of
   these dependencies can be present on the global `api` javadoc task's
   classpath. To that end, the `api` task classpath has now been
   customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
   have precedence.

 - SPR-8896 replaced our dependency on aspectjrt with a dependency on
   aspectjweaver, which is fine from a POM point of view, but causes
   a spurious warning to be emitted from the ant iajc task that it
   "cannot find aspectjrt on the classpath" - even though aspectjweaver
   is perfectly sufficient. In the name of keeping the console quiet, a
   new `rt` configuration has been added, and aspectjrt added as a
   dependency to it. In turn, configurations.rt.asPath is appended to
   the iajc classpath during both compileJava and compileTestJava for
   spring-aspects.

Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
2012-12-12 12:55:10 +01:00
Chris Beams 8f90b487e2 Rename API and reference doc output dirs
Prior to this change, aggregated javadoc has been written to an 'api'
dir and reference docs into a 'reference' dir. This shorter naming is
desirable, but is not compatible with historical naming under 3.1.x as
defined by the Ant+Ivy Spring Build.

For example, URLs are currently as follows:

http://static.springsource.org/spring-framework/docs/3.1.3.RELEASE/javadoc-api
http://static.springsource.org/spring-framework/docs/3.1.x/javadoc-api
http://static.springsource.org/spring-framework/docs/current/javadoc-api

Particularly with regard to the 'current' link, we do not want to
break this url scheme with the shortened 'api' directory naming. Of
course this compatibility can be preserved with symlinks, but this makes
the release process that much more complicated and fragile.

This commit ensures that the naming is 'javadoc-api' and
'spring-framework-reference', consistent with historical convention.
We can always add a symlinking scheme to add the shorter 'api' and
'reference' options after the fact if desired.
2012-12-12 12:54:28 +01:00
Phillip Webb 6a6b441ffd Document annotation-config / component-scan tip
Document that the <context:annotation-config> element is usually
not required when using <context:component-scan>.

Issue: SPR-9808
2012-12-11 21:38:54 -08:00
Phillip Webb a263fd343d Use consistent XML docbook namespace format
Reorder XML namespace imports for consistency with other docbook
files.
2012-12-11 21:10:05 -08:00
Rossen Stoyanchev e09bdb31cc Add reference documentation for async web requests
Issue: SPR-9400
2012-12-11 23:12:00 -05:00
Juergen Hoeller 5b2cd763cf Final preparations for 3.2 GA 2012-12-12 03:31:39 +01:00
Juergen Hoeller c55446da9d Polishing 2012-12-12 03:29:47 +01:00
Juergen Hoeller 9b6ec5bfab DeprecatedBeanWarner detects deprecated FactoryBean classes and always logs user-specified bean type 2012-12-12 03:29:46 +01:00
Juergen Hoeller 9deaefe74d AbstractCachingViewResolver uses a cache limit of 1024 by default, avoiding overflow for redirect URLs
Issue: SPR-10065
2012-12-12 03:29:45 +01:00
Juergen Hoeller 1cb6e3dbb6 Several enhancements with respect to CachingMetadataReaderFactory handling.
Added "clearCache()" method to CachingMetadataReaderFactory, for clearing the metadata cache once not needed anymore - in particular when the MetadataReaderFactory instance is long-lived. Also added "setMetadataReaderFactory" method to ClassPathScanningCandidateComponentProvider, analogous to ConfigurationClassPostProcessor.
2012-12-12 03:29:44 +01:00
Juergen Hoeller e298658ef0 Polishing 2012-12-12 03:29:44 +01:00
Juergen Hoeller 801d4714b1 Fixed CGLIB proxy class leaks through further equals/hashCode implementations in Spring AOP pointcuts
Issue: SPR-8008
2012-12-12 03:29:43 +01:00
Juergen Hoeller 7af92b483a Fixed HierarchicalUriComponents equals implementation
Issue: SPR-10088
2012-12-12 03:29:42 +01:00
Sam Brannen d4c55838ad Document testing in "New in Spring 3.2" sect.
This commit adds documentation to the "New Features and Enhancements in
Spring 3.2" section of the reference manual regarding new testing
features.

Issue: SPR-9941
2012-12-12 01:38:23 +01:00
Sam Brannen a1053d4364 Document WebApplicationContext support in the TCF
This commit adds documentation for the following new features in the
Spring TestContext Framework within the Testing chapter of the reference
manual.

 - @WebAppConfiguration and context caching
 - WebDelegatingSmartContextLoader
 - AnnotationConfigWebContextLoader
 - GenericXmlWebContextLoader
 - Loading a WebApplicationContext in integration tests
 - ServletTestExecutionListener
 - Testing request and session scoped beans

Issue: SPR-9864
2012-12-12 00:56:26 +01:00
Sam Brannen 7f1b990ee9 Reformat the Testing chapter
Reformatted the Testing chapter in preparation for upcoming changes.
2012-12-11 22:47:44 +01:00
Rossen Stoyanchev acf32726d7 Add documentation for Spring MVC Test
Issue: SPR-9860, SPR-9886
2012-12-11 16:11:47 -05:00
Sam Brannen 4be2d15950 Reformat the Testing chapter
Reformatted the Testing chapter in preparation for upcoming changes.
2012-12-11 22:03:18 +01:00
Phillip Webb 6fed79cb10 Ensure buildSrc is only added once to eclipse 2012-12-10 20:54:56 -08:00
Sam Brannen a6387dc725 Document WebApplicationContext support in the TCF
This commit adds Javadoc documentation for the WebApplicationContext
testing support that was recently introduced in the Spring TestContext
Framework.

Issue: SPR-9864
2012-12-11 01:58:10 +01:00
Phillip Webb c8a3562933 Update test tiles.xml files to use v3 DTD
Update tiles.xml files used with tests to reference tiles-config_3_0
instead of tiles-config_2_1 DTD.

Prior to this commit tiles based tests would fail when building
offline or behind a proxy server.
2012-12-10 15:39:47 -08:00
Phillip Webb 25a7136a96 Merge pull request #199 from rwinch/SPR-10059
* SPR-10059:
  Make DeferredResult extensible
2012-12-10 13:47:12 -08:00
Rob Winch be7b07f832 Make DeferredResult extensible
Previously it was cumbersome to associate data or behavior to a
DeferredResult because it was marked as final and had no extension
points.

Now DeferredResult is non-final which allows subclasses to associate
additional data and behavior to it.

Issue: SPR-10059
2012-12-10 13:41:14 -08:00
Rob Winch 455701d2ee Merge plugin copies exclude rules
Previously the 'merge from' project's configurations exclude rules were
not used in the dynamically created 'merge into' project configurations.
This meant that the pom generation for 'merge into' project did not
exclude the dependencies from the 'merge from' project's configuration
excludes.

Now the exclude rules are copied into the dynamically created
'merge into' project's configurations.
2012-12-10 13:29:10 -08:00
Phillip Webb 809d62e318 Add buildSrc to generated eclipse project
Post process the generated 'spring' eclipse project to include the
buildSrc/src/main/groovy folder.
2012-12-10 13:09:23 -08:00
Phillip Webb 42bbcc3220 Move Merge plugin into a build package structure 2012-12-10 00:32:00 -08:00
Phillip Webb b206e6891f Renamed buildsrc to buildSrc
Rename buildsrc folder to buildSrc to follow Gradle conventions.
2012-12-09 23:13:23 -08:00
Phillip Webb 9e790829d9 Upgrade reference plugin to version 0.2.3
Upgrade to the latest reference plugin, providing slightly refined
titlepage and admon graphics.
2012-12-09 21:33:35 -08:00
Phillip Webb 87f7ecf907 Refactor merge-artifacts script to a plugin
Refactor the existing merge-artifacts script to a full Gradle plugin.
The new plugin uses a 'merge' extension in favor of Gradle 'ext'
configuration and can be applied to all projects in a multi-module
build.

Any project that defines a 'merge.into' project will now implicitly
receive a dependency to that project. Furthermore other projects
with a dependency on 'merge.into' will receive a direct project
link within the IDE. For example: 'spring-webmvc-tiles3'
is merged into 'spring-webmvc' and 'spring-test-mvc' depends
on 'spring-webmvc'. Within the IDE 'spring-test-mvc' will show
dependencies to both 'spring-webmvc' and 'spring-webmvc-tiles'.

Issue: SPR-10042
2012-12-09 21:33:35 -08:00
Phillip Webb 4551cfcdfc Remove superfluous exclusions from Gradle build
Remove several dependency exclusions from the Gradle build that are
no longer required and were not present in Spring 3.1.
2012-12-09 21:33:34 -08:00
Phillip Webb 0751b2cbeb Convert Gradle build to use new propdeps-plugin
Replace existing 'optional' and 'provided' Spring specific build
extensions with a new Gradle propdeps-plugin. Optional and Provided
dependencies are now defined use dependency configurations.

The new plugin does not currently support the notion of optional
runtime dependencies. All optional dependencies are implicitly
part of the 'compile' scope. This is an intentional design decision
that aims to keep both the plugin and the build simple. Since optional
dependencies are non-transitive this restriction should not cause
any real problems for existing users. The only existing dependency
affected is 'commons-io' in the 'spring-beans' project, however, this
was an optional compile scope dependency in the previous Spring 3.1
release.

Both provided and optional dependencies are no longer exported from
generated eclipse .classpath files. This fixes several tests that
would previously fail when running within eclipse. The servlet-api
specific elements of ide.gradle are also no longer required.

Issue: SPR-9656, SPR-10070
2012-12-09 21:33:34 -08:00
Phillip Webb 7cc406ffc7 Depend on javax.servlet for version 3.0 API
Replace tomcat servlet-api 3.0 dependencies with the javax.servlet
versions that are now available in the Maven central repository.
2012-12-09 21:33:34 -08:00
Phillip Webb 6103a7f1c1 Upgrade log4j dependency to version 1.2.17
Upgrade to the latest stable release of log4j. The previous 'jms'
and 'jmx' exclusions are not longer required since these have now
been marked as optional dependencies in the upstream POM.
2012-12-09 21:33:34 -08:00
Phillip Webb dc708c5baa Removed unused gradle import
Remove the unused ProjectDependency import from the Gradle build file.
2012-12-09 21:33:17 -08:00
Phillip Webb 22741b1fdc Use consistent Gradle dependency style
Update all Gradle files to use a consistent style when specifying
dependencies. All dependencies are now specified using parentheses,
for example:

   scope("group:artifat:version")
or scope(project(":projectname"))
2012-12-09 21:32:28 -08:00
Phillip Webb 90cfdbb040 Polish quote styles in gradle files
Replace singe quote-marks with double quote-marks when possible for a
more consistent style.
2012-12-09 21:32:27 -08:00
Phillip Webb a268528726 Polish .gradle file formatting to use tabs
Replace spaces with tabs for consistency with Java source code
2012-12-09 21:32:27 -08:00
Sam Brannen 756bff8e0a Improve Javadoc in SpringServletContainerInitializer 2012-12-08 17:30:50 +01:00
Sam Brannen a436a57503 Move tests to spring-test module
When Spr9799XmlConfigTests and Spr9799AnnotationConfigTests were
created, there were issues with the classpath related to slf4j
dependencies that made it impossible for these classes to reside in the
spring-test module. Consequently, these tests were added to the
spring-test-mvc module. However, the issues with slf4j have since been
resolved in the Gradle build, and this commit therefore moves these test
classes to the spring-test module where they belong.

Issue: SPR-9799
2012-12-08 14:26:47 +01:00
Rossen Stoyanchev 85a552daed Fix package cycle among http message converters
This change introduces a new AllEncompassingFormHttpMessageConverter
class that adds JSON and XML converters for individual mime parts of
a multi-part request. The new converter is used in place of the
previously used XmlAwareFormHttpMessageConverter.

Issue: SPR-10055
2012-12-07 18:12:11 -05:00
Rossen Stoyanchev d309bb4bbb Add web-fragment.xml to spring-web
The servlet spec treats any jar in WEB-INF/lib as a web fragment:
"A plain old jar file in the WEB-INF/lib directory with no web-
fragment.xml is also considered a fragment" (section 8.2.1)

This change adds a web-fragment.xml giving the web fragment an
explicit name, "spring_web", and indicating there is no need
to scan for Servlet annotations in the spring-web.jar itself
through metadata-complete=true.

This allows applications that choose to include only specific
web fragments, through the <absolute-ordering> element in web.xml
to also include the "spring_web" fragment, in order to enable scanning
for WebApplicationInitializer types.
2012-12-07 17:30:44 -05:00
Rossen Stoyanchev 6e7df513f1 Exclude jcl-over-slf4j from tiles-core dependency
tiles-core-3 brings in a dependency on jcl-overl-slf4 which causes
an slf4j delegation loop as explained at [1] when tests run inside
Eclipse. Other modules that depend on tiles-core like
(tiles-servlet, tiles-jsp) have also had the exclusion added since
they seem to bring it in as well.

[1] http://www.slf4j.org/codes.html#jclDelegationLoop
2012-12-07 16:10:38 -05:00
Rossen Stoyanchev 3643d92cb8 Fix issue with creating ServletRequestAttributes
Prevously the FrameworkServlet created a new ServletRequestAttributes
instance for every request, unless the RequestContextHolder already
contained an instance whose type is not ServletRequestAttributes.
The main intent was that if RequestContextHolder contains a
PortletRequestAttributes, it should be left in place.

This change does an "instanceof" check against the request in
RequestContextHolder instead of an "equals" check on the type.
It still leaves PortletRequestAttributes in place but also allows
the previous request to be any sub-class of ServletRequestAttributes.

Issue: SPR-10025
2012-12-07 15:19:38 -05:00
Sam Brannen 69ace01640 Clean up warnings in spring-test
- Deleted unused imports.

 - Switched from junit.framework.Assert to org.junit.Assert, since the
   former is deprecated as of JUnit 4.11.

 - Suppressed warnings for continued deprecated usage of
   junit.framework.Assert.
2012-12-07 12:26:27 +01:00
Sam Brannen 2233949a0f Fix typo 2012-12-07 12:06:21 +01:00
Rossen Stoyanchev 9cc4bd892a Fix issue with suffix pattern match
Spring Framework 3.2 M2 added the ability to map requests using only
file extensions registered through the configured through a
ContentNeotiationManager, as opposed to allowing any file extension
(i.e. ".*"). The MVC namespace the MVC Java config automatically
register extensions such as ".json" and ".xml" depending on libraries
found on the classpath. That in turn causes issues in cases where
additional extensions are in use but not registered (e.g. ".html").

This change ensures that matching with registered file extensions only
works only if explicitly enabled through a property on
RequestMappingHandlerMapping.

Issue: SPR-10061, SPR-8474
2012-12-06 18:31:32 -05:00
Phillip Webb fb05c7b33c Replace SLF4J with ACL TilesConfigurer for Tiles 3
Replace the use of SLF4J LoggerFactory and Logger classes with Apache
commons-logging LogFactory and Log.

Issue: SPR-10077
2012-12-06 10:12:14 -08:00
Rossen Stoyanchev 31cb14e03a Remove Spring Security sample tests in spring-test-mvc
Those tests as well as Spring Hateoas tests will be added to respective
projects instead.
2012-12-05 19:10:13 -05:00
Juergen Hoeller d6b9c6a475 Removed coverage of deprecated java.util.Timer support
Issue: SPR-10050
2012-12-05 19:19:24 +01:00
Juergen Hoeller a92f7dd474 ConfigurationClassPostProcessor consistently uses ClassLoader, not loading core JDK classes via ASM
Issue: SPR-10058
2012-12-05 19:12:05 +01:00
Sam Brannen 8a422f48c6 Update changelog re: comments in SQL statements
Issue: SPR-9982, SPR-10075
2012-12-05 17:49:47 +01:00
Sam Brannen aa16caa2ac Support comments in statements in RDbPopulator
Prior to this commit, executing an SQL script via
ResourceDatabasePopulator would fail if a statement in the script
contained a line comment within the statement.

This commit ensures that standard SQL comments (i.e., any text beginning
with two hyphens and extending to the end of the line) are properly
omitted from the statement before executing it.

In addition, multiple adjacent whitespace characters within a statement,
but outside a literal, are now collapsed into a single space.

Issue: SPR-10075
2012-12-05 17:41:24 +01:00
Sam Brannen d0f687f028 Support comments in statements in JdbcTestUtils
Prior to this commit, executing an SQL script with JdbcTestUtils would
fail if a statement in the script contained a line comment within the
statement.

This commit ensures that standard SQL comments (i.e., any text beginning
with two hyphens and extending to the end of the line) are properly
omitted from the statement before executing it.

In addition, multiple adjacent whitespace characters within a statement
but outside a literal are now collapsed into a single space.

Issue: SPR-9982
2012-12-05 16:58:26 +01:00
Rossen Stoyanchev d1a6ceecc2 Update @ModelAttribute javadoc
The @ModelAttribute javadoc now explicitly mentions that model content
is not available after an Exception is raised. This is a very common
question given that @ExceptionHandler methods are co-located with
@ModelAttribute and @RequestMapping methods.

Issue: SPR-10071
2012-12-05 09:42:01 -05:00
Sam Brannen 2b4ecfad12 Upgrade to JUnit 4.11
This commit upgrades the compile dependency on JUnit in the spring-test
module as well as the global test dependency on JUnit for the entire
test suite to 4.11 GA.

In addition, the spring-test module now depends on junit:junit instead
of junit:junit-dep since, as of JUnit 4.11, the "junit" Maven artifact
no longer inlines hamcrest-core.

Issue: SPR-10044
2012-12-05 11:29:50 +01:00
Sam Brannen 31dfffde52 Update TODOs with new JIRA issue
Issue: SPR-8116, SPR-10074
2012-12-05 10:45:40 +01:00
Sam Brannen 025d111efc Re-enable and document @Ignore'd tests
Documented why static nested test cases in the spring-test module are
ignored, explaining that such "TestCase classes are run manually by the
enclosing test class". Prior to the migration to Gradle (i.e., with
Spring Build), these tests would not have been picked up by the test
suite since they end with a "TestCase" suffix instead of "Test" or
"Tests".

Re-enabled HibernateMultiEntityManagerFactoryIntegrationTests.

For the remaining tests that were disabled as a result of the migration
to Gradle, comments have been added to the @Ignore declarations.

Issue: SPR-8116, SPR-9398
2012-12-05 10:31:31 +01:00
Phillip Webb d12fbcc7ce Merge pull request #196 from KingBuzzer/spring-aspects-dependencies
* spring-aspects-dependencies:
  Replace dependency to aspectjrt with aspectjweaver
2012-12-04 14:51:45 -08:00
Fredrik Sundberg a8589bf035 Replace dependency to aspectjrt with aspectjweaver
Replace the gradle dependency on aspectjrt with aspectjweaver since
aspectjrt is a subset of aspectjweaver and the full jar is required
by Spring. SPR-8896 fixed the original code issue, this change
just relates to the generated maven pom.

Issue: SPR-10072
2012-12-04 14:16:33 -08:00
Phillip Webb 1352222ea6 Upgrade reference plugin and remove custom xsl
Upgrade to docbook-reference-plugin v0.2.2 and remove custom xsl
styles in favor of plugin defaults. Modify some docbook source
files to work with newer style.
2012-12-04 14:08:21 -08:00
Sam Brannen 19d7cedcf2 Fix classpaths regarding slf4j versions
- Defined global slf4jVersion as '1.6.1' in the Gradle build.

 - Replaced dependencies on slf4j-log4j12 with slf4j-jcl where possible;
   however, spring-test-mvc still depends on jcl-over-slf4j and
   slf4j-log4j12 (see SPR-10070).

 - Reenabled HibernateSessionFlushingTests.

 - Verified that the following tests pass in the Gradle build and within
   Eclipse:
   - HibernateSessionFlushingTests
   - HibernateTransactionManagerTests (Hibernate 3)
   - HibernateTransactionManagerTests (Hibernate 4)
   - RequestResponseBodyMethodProcessorTests

Issue: SPR-9421, SPR-10066
2012-12-04 19:52:37 +01:00
Sam Brannen 53726612ee spring-orm should not build against cglib-repack
The previous commit by Juergen Hoeller upgraded spring-orm's Hibernate 3
dependency to 3.3.2.GA, and this commit removes the now unnecessary
dependency on org.hibernate:hibernate-cglib-repack:2.1_3.

Issue: SPR-10066
2012-12-04 18:25:47 +01:00
Juergen Hoeller 4e442471e1 Hibernate 3 support builds against standard Hibernate 3.3.2.GA artifact from Maven 2012-12-04 16:06:07 +01:00
Juergen Hoeller 0c51cd7fd3 Polishing 2012-12-04 15:38:06 +01:00
Juergen Hoeller 738c643592 Deprecated JSF 1.1 VariableResolver implementations in favor of Spring-provided ELResolvers 2012-12-04 15:38:05 +01:00
Juergen Hoeller 184361a096 Transaction timeouts for JPA translate to "javax.persistence.query.timeout" only (for EclipseLink compatibility)
Issue: SPR-10068
2012-12-04 15:38:04 +01:00
Sam Brannen ffd040b8d2 Javadoc in MockMvcClientHttpRequestFactoryTests
The Javadoc in MockMvcClientHttpRequestFactoryTests had been copied and
pasted from WebAppResourceTests. This commit updates the documentation
in MockMvcClientHttpRequestFactoryTests to reflect what the tests do.
2012-12-04 14:58:22 +01:00
Sam Brannen e16f3b95cb Fix typo in Javadoc 2012-12-04 14:29:54 +01:00
Sam Brannen 57e6e0881d Introduce isExecuted() in MockClientHttpRequest
This commit introduces the missing isExecuted() method in
MockClientHttpRequest and improves the documentation for execute()
and executeInternal().
2012-12-04 01:03:20 +01:00
Sam Brannen a3e4f6cad4 Use EasyMock 2.5.2 consistently across the build
This commit ensures that EasyMock version 2.5.2 is used consistently
across the test suite. This applies to both the easymock and
easymockclassextension artifacts. Using the same version for both of
these artifacts helps to better align us for a future upgrade to
EasyMock 3.0 since the Class Extension artifact is deprecated in 3.x
releases of the library.

Issue: SPR-10069
2012-12-04 00:01:06 +01:00
Sam Brannen d0503ab733 Relocate web artifacts in the TCF to web package
This commit relocates recently introduced web artifacts in the
TestContext framework to the ~.test.context.web package and renames some
classes for consistency with the existing code base.

 - introduced package-info.java in the web package.

 - ServletTestExecutionListener now extends
   AbstractTestExecutionListener instead of implementing
   TestExecutionListener.

 - relocated AbstractGenericWebContextLoader,
   AnnotationConfigWebContextLoader, XmlWebContextLoader, and
   WebDelegatingSmartContextLoader to the web package.

 - renamed XmlWebContextLoader to GenericXmlWebContextLoader for
   consistency with GenericXmlContextLoader.

 - changed the visibility of AbstractDelegatingSmartContextLoader and
   AnnotationConfigContextLoaderUtils to public.

Issue: SPR-10067
2012-12-03 23:29:10 +01:00
Sam Brannen e0e3143dd5 Fix Javadoc errors in TransactionalTEL
This commit fixes recently introduced formatting errors in the Javadoc
of TransactionalTestExecutionListener.
2012-12-03 22:52:19 +01:00
Rossen Stoyanchev 7ff964afa8 Add JSON converters to FormHttpMessageConverter
The FormHttpMessageConverter now adds Jackson JSON converters
(version 1.x or 2.x) if available on the classpath.

Issue: SPR-10055
2012-12-03 15:11:13 -05:00
Rossen Stoyanchev 42a928596f Remove tiles-request-servlet-wildcard dependency
The tiles-request-servlet-wildcard contained only one class that is an
implementation of the tiles-request ServletApplicationContext using a
Spring ApplicationContext to look up resources. It makes sense for this
class to be part of the Spring Tiles 3 integration.

Issue: SPR-10054
2012-12-03 15:11:13 -05:00
Rossen Stoyanchev d3c977b54b Fix failing tests failing when debug logging is on
Issue: SPR-10048
2012-12-03 15:11:12 -05:00
Rossen Stoyanchev 9643ff3f1d Polish StandaloneMockMvcBuilder
Issue: SPR-10053
2012-12-03 15:11:12 -05:00
Sam Brannen ab886b82ea Polish Gradle build script
- fixed typo
 - spring-test-mvc now builds against Hibernate Validator 4.3
2012-12-03 19:59:09 +01:00
Rob Winch 149e6f6425 polish web.Mock* classpath
Previously when running the tests for spring-web, spring-webmvc,
spring-test-mvc, and spring-orm there were possible collissions in the
classpath due to the fact that each had its own copy of the web.Mock*
classes in it. This causes uncertainty for which class the code was
running against. Furthermore, the maintance of keeping the copies up to
date was tedious.

Now there are two copies of the web.Mock* classes. The ones that exist
in spring-test main sources and a copy that supports servlet 3 within
spring-web test sources. The copy in spring-web test sources has been
moved to a new package to avoid having the classes exist twice on the
classpath within Eclipse.
2012-11-30 11:15:58 -05:00
Rob Winch 1e62ad8665 Add beforeConcurrentHandling support
Previously CallableProcessingInterceptor and
DeferredResultProcessingInterceptor did not have support for capturing
the state of the original Thread just prior to processing. This made it
difficult to transfer the state of one Thread (i.e. ThreadLocal) to the
Thread used to process the Callable.

This commit adds a new method to CallableProcessingInterceptor and
DeferredResultProcessingInterceptor named beforeConcurrentHandling
which will be invoked on the original Thread used to submit the Callable
or DeferredResult. This means the state of the original Thread can be
captured in beforeConcurrentHandling and transfered to the new Thread
in preProcess.

Issue: SPR-10052
2012-11-30 11:10:07 -05:00
Phillip Webb 0d73d199ec Reset MBean Servers after JRuby and JMX tests
Refactor MBean Server reset code from MBeanServerFactoryBeanTests
and reuse in AdvisedJRubyScriptFactoryTests and
AbstractMBeanServerTests.

Issue: SPR-9288
2012-11-29 14:47:24 -08:00
Juergen Hoeller ff945bdca9 Added initial unit tests for Hibernate 4 2012-11-29 23:45:33 +01:00
Juergen Hoeller f1923f406e Removed outdated EjbSupportTests 2012-11-29 23:42:26 +01:00
Juergen Hoeller 1b6f3d0352 Preparations for 3.2 GA 2012-11-29 23:28:57 +01:00
Juergen Hoeller edd8d148bb Upgraded to Joda-Time 2.1, Groovy 1.8.8, JRuby 1.6.5; removed unnecessary dependencies 2012-11-29 23:28:25 +01:00
Juergen Hoeller 4e443da7ae Officially deprecated Apache iBATIS support in favor of native Spring support in Mybatis (http://code.google.com/p/mybatis/) 2012-11-29 23:21:50 +01:00
Juergen Hoeller 89fc6acba8 Velocity 1.6 oriented updates to Spring's Velocity support 2012-11-29 23:20:22 +01:00
Juergen Hoeller 48f405e8fd Finally added generics to JasperReports API signatures (motivated by JasperReports 5.0) 2012-11-29 23:15:41 +01:00
Juergen Hoeller 230dec8e6f Removed unnecessary dependency on JTA API 2012-11-29 23:14:08 +01:00
Juergen Hoeller 0614d312ed Polishing 2012-11-29 23:13:49 +01:00
Juergen Hoeller 786a20f9d0 Finally deprecated BeanReferenceFactoryBean and CommonsLogFactoryBean 2012-11-29 23:11:41 +01:00
Juergen Hoeller d2207b2619 Fixed typos in javadoc 2012-11-29 23:10:55 +01:00
Juergen Hoeller ad33dbca0b Removed accidentally added DestructionAwareAttributeHolder class 2012-11-29 23:09:12 +01:00
Juergen Hoeller 0933734fbb DefaultMessageListenerContainer allows for concurrent subscription consumers on WebLogic/ActiveMQ
Issue: SPR-10037
2012-11-29 23:08:34 +01:00
Rossen Stoyanchev ad96f8511f Merge pull request #191 from rwinch/SPR-10051
* rwinch-SPR-10051:
  Rename MvcAsyncTask to WebAsyncTask
2012-11-28 16:56:43 -05:00
Rob Winch 157a1d6ee2 Rename MvcAsyncTask to WebAsyncTask
The name MvcAsyncTask is misleading because the class is part of Spring
Web as apposed to Spring MVC. This is also inconsistent with the other
async classes which use Web instead of Mvc.

This commit changes MvcAsyncTask to WebAsyncTask making it more
consistent with the jar it is found in and the other async classes.

Issue: SPR-10051
2012-11-28 16:55:45 -05:00
Phillip Webb ce7fa8a98e Upgrade to Gradle 1.3 2012-11-28 09:15:52 -08:00
Phillip Webb dfdb31715f Fix -XX:MaxHeapSize setting for Windows 2012-11-27 10:51:53 -08:00
Chris Beams 511240fbb8 Increment version to 3.2.0.BUILD-SNAPSHOT 2012-11-27 11:55:06 +01:00
Spring Buildmaster 5cbc5b1901 Release version 3.2.0.RC2 2012-11-27 02:43:36 -08:00
Chris Beams 7cc492de4f Update changelog 2012-11-27 10:02:51 +01:00
Chris Beams 2deeb54a9b Merge pull requests #183 and #190
# By Rob Winch
# Via Rob Winch
* gradle-1116:
  Make GRADLE-1116 workaround more generic

# By Rob Winch
* spring-test-mvc-classpath:
  Fix spring-test-mvc Eclipse classpath
2012-11-27 09:09:16 +01:00
Rob Winch e7b8cd58db Fix spring-test-mvc Eclipse classpath 2012-11-27 09:07:29 +01:00
Rob Winch 6e8eede0bf Make GRADLE-1116 workaround more generic
Previously the workaround for GRADLE-1116 only worked for the
merge-dist.gradle projects

Now the workaround is more generic and fixes errors that have since
been introduced when performing a fresh import into Eclipse.
2012-11-26 20:07:55 -06:00
Phillip Webb 2ef99cdda1 Merge pull request #179 from EzequielB/spring-aop-cleaning
* spring-aop-cleaning:
  Remove unused imports
2012-11-26 16:59:26 -08:00
Ezequiel Ballesi b43bc8659a Remove unused imports 2012-11-26 16:57:57 -08:00
Phillip Webb 6ca71abf93 Intermittent MBeanServerFactoryBeanTests failure
Prior to this commit the testWithLocateExistingAndExistingServer method
would fail if any preceding test called the ManagementFactory
getPlatformMBeanServer() method. In such situations the platform
server is located instead of the expected freshly created server.

These failures are more likely to happen when compiling with JDK 7
due to the fact that the reflection API no longer returns methods
in a consistent order.

Unfortunately there is no easy way to reset the platform MBean server
so the new code must resort to using reflection to access the private
static ManagementFactory.platformMBeanServer field.

Issue: SPR-9288
2012-11-26 15:45:21 -08:00
Rob Winch d7bf56df49 Remove reflection usage in orm.hibernate4.*
Previously reflection was required when interacting with Hibernate 4 in
order to support both Hibernate 3 and Hibernate 4 since there were
non-passive changes in the APIs. Now that the Spring build uses Gradle
it is trivial to support multiple Hibernate versions.

This commit removes the reflection usage in orm.hibernate4.* by
creating a spring-orm-hibernate4 module that uses
gradle/merge-artifacts.gradle to build a single artifact but keep
distinct classpaths.

Issue: SPR-10039
2012-11-26 22:47:10 +01:00
Juergen Hoeller cf681a809e Final preparations for 3.2 RC2 2012-11-26 22:47:09 +01:00
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]: https://github.com/SpringSource/gradle-plugins/commit/b209c350ed76c10815815ab320c2379e8de3fec9
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
Phillip Webb 27210ff3cc Polish XML snippets showing XSD imports
Remove <literal> tag from XML samples to improve the look of the
HTML output.
2012-11-20 18:10:04 -08:00
Phillip Webb c20b22a011 Consistent spelling for US/UK words
Replaced behaviour and summarised with US variants that seem to be
more prevalent in the rest of the document.
2012-11-20 16:39:54 -08:00
Phillip Webb d70762baaf Replace reference to aspectjrt with aspectjweaver
Replace reference to aspectjrt.jar with aspectjweaver.jar since
aspectjrt is a subset of aspectjweaver and the full jar is required
by Spring.

Issue: SPR-8896
2012-11-20 16:06:00 -08:00
Phillip Webb 59b27004de Document @Enable* annotations
Update reference manual with details of Java configuration @Enable*
annotations. Examples of Java style @Configuration is provided
when appropriate alongside existing XML samples.

Several existing @Configuration samples have been changed to placing
the @Enable annotation below the @Configuration annotation.
This has been done to provide consistency with existing Javadoc.

Issue: SPR-9920
2012-11-20 12:17:25 -08:00
Phillip Webb da50a0213b Polish Javadoc
Minor Javadoc reformat to prevent erroneous eclipse warnings
2012-11-20 12:17:25 -08:00
Phillip Webb 838ba79f55 Fix Javadoc references to incorrect XML
Replace references to <task:annotation-config> with
<task:annotation-driven>
2012-11-20 12:17:25 -08:00
Rossen Stoyanchev 11cf978394 Define behavior of null Callable or DeferredResult
When a controller method declares Callable or DeferredResult as its
return value, and returns null, async processing will not start and
the request will be considered "handled" by the controller method.

Issue: SPR-9951
2012-11-20 15:12:58 -05:00
Rossen Stoyanchev 77223d7ced Deprecate pre 3.1 @MVC support classes
Issue: SPR-10005
2012-11-20 14:59:01 -05:00
Rossen Stoyanchev 2a11007a04 Add Spring Framework integration with Tiles 3
Tiles 3 has modified packages and classes as well as additional
dependencies, notably "tiles-request-api", which is a request/response
abstraction independent of Servlet and JSP APIs.

In order to have both Tiles 2 and Tiles 3 integrations, the source for
the Tiles 3 integration is in a separate project spring-webmvc-tiles3.
The build process merges the compiled Tiles 3 integration classes into
the spring-webmvc module so in effect it contains both the Tiles 2 and
the Tiles 3 integrations.

This change originated as a pull request at spring-framework-issues:
https://github.com/SpringSource/spring-framework-issues/pull/30

And was additionally updated:
https://github.com/SpringSource/spring-framework-issues/commit/1f64be4aa59b4766f9cc5fc6ead621d29f92a0d6

Issue: SPR-8825
2012-11-20 12:24:08 -05:00
Phillip Webb 63ca14c33e Clarify use of @Bean with @EnableAsync executors
Update Javadoc to indicate that the getAsyncExecutor() method may be
optionally annotated with @Bean and in such circumstance the
executor.initialize() method need not be called.

Issue: SPR-9934
2012-11-19 10:42:33 -08:00
Rossen Stoyanchev 92ca8b32fb Add DefaultMvcResultTests 2012-11-16 09:48:12 -05:00
Phillip Webb 107fafbcc5 Do not consider bridge methods in SpEL properties
Modify ReflectivePropertyAccessor so that it no longer considers
bridge methods when finding getters or setters. This should help
to prevent subtle errors that can occur when particular JDK
implementations happen to return bridge methods before non-bridge
methods when calling Class.getMethods()

Issue: SPR-9994
2012-11-15 17:22:45 -08:00
Rossen Stoyanchev f8bf577eff Fix failures in PrintingResultHandlerTests 2012-11-15 11:26:14 -05:00
Rossen Stoyanchev 8afcf717e2 Fix failing test from previous commit 2012-11-15 10:15:34 -05:00
Rossen Stoyanchev 1f2e89e3ed Print async result in Spring MVC Test ResultHandler 2012-11-15 09:45:38 -05:00
Chris Beams f0f76e493d Update README to reflect JDK 1.7 build prereq 2012-11-14 13:18:59 +01:00
Chris Beams 084486a6b6 Update README link to contributor guidelines 2012-11-14 12:41:11 +01:00
Rossen Stoyanchev ecce7520fb Support HttpMessageConverter refs in mvc namespace
Issue: SPR-9469
2012-11-13 21:47:59 -05:00
Rossen Stoyanchev 62f2858f7f Fix issue with SpEL in mvc namespace
This change ensures that the location attribute of a resource mapping
and the path attribute of an interceptor mapping support SpEL
expressions.

Issue: SPR-9291, SPR-9848
2012-11-13 21:13:52 -05:00
Phillip Webb 950f00a280 Fix Collections import
Replace backport Collections class with stock JDK version
2012-11-12 13:15:25 -08:00
Chris Beams 6407a347c1 Merge pull request #181 from olivergierke/SPR-9568
# By Oliver Gierke
* SPR-9568:
  Support *Aware ImportBeanDefinitionRegistars
2012-11-12 18:27:43 +01:00
Oliver Gierke 146a66fe0b Support *Aware ImportBeanDefinitionRegistars
Implementations of Spring's ImportBeanDefinitionRegistrar interface may
now implement any of the following *Aware interfaces and have their
respective methods called prior to #registerBeanDefinitions:

 - BeanFactoryAware
 - BeanClassLoaderAware
 - ResourceLoaderAware

Issue: SPR-9568
2012-11-12 18:26:50 +01:00
Sam Brannen f5080f7d70 Suppress warnings for java.io.Closeable resources
Issue: SPR-9962
2012-11-10 19:22:26 +01:00
Sam Brannen f833366a7f Update package-info for test.util package 2012-11-10 19:08:18 +01:00
Juergen Hoeller f6209cd7af DefaultSingletonBeanRegistry avoids singletonObjects lock wherever possible for non-singleton factory performance
Also fixing setCurrentlyInCreation to use a concurrent Set and to apply to prototype beans as well.

Issue: SPR-9819
2012-11-09 00:54:57 +01:00
Juergen Hoeller de91d754d8 Re-added InitializingBean declaration 2012-11-09 00:13:40 +01:00
Juergen Hoeller f00559c440 Initial preparations for 3.2 RC2 2012-11-08 23:48:08 +01:00
Juergen Hoeller ea95da126a Implement java.io.Closeable where appropriate
Issue: SPR-9962
2012-11-08 23:44:49 +01:00
Juergen Hoeller d6e1a4a26a LocalDataSourceConnectionProvider checks against SmartDataSource before closing a Connection
Issue: SPR-9978
2012-11-08 23:37:14 +01:00
Juergen Hoeller 4ed9ababdf spring-jms-3.2.xsd declares former nmtoken attributes as string, allowing for placeholders
Issue: SPR-9597
2012-11-08 23:24:58 +01:00
Juergen Hoeller 0a3ea42fe1 DefaultSingletonBeanRegistry avoids singletonObjects lock wherever possible for non-singleton factory performance
Issue: SPR-9819
2012-11-08 23:21:18 +01:00
Juergen Hoeller c24825ca19 DefaultSingletonBeanRegistry avoids singletonObjects lock wherever possible for non-singleton factory performance
Issue: SPR-9819
2012-11-08 23:15:38 +01:00
Juergen Hoeller e1d11ec99d Do not cache PropertyDescriptors for autowireBean calls anymore, avoiding ClassLoader leaks
Issue: SPR-8956
2012-11-08 23:11:15 +01:00
Rossen Stoyanchev 9e22ac496d Remove a couple more dependencies on hamcrest-lib
Issue: SPR-9961
2012-11-07 17:13:20 -05:00
Rossen Stoyanchev 4812fcccc4 Remove dependency on hamcrest-lib from spring-mvc-test
The change removes the use of concrete Matcher implementations and thus
the dependency on hamcrest-lib leaving hamcrest-core as the only
(optional) hamcrest dependency.

Issue: SPR-9961
2012-11-07 17:06:56 -05:00
Sam Brannen 9a6ec1b4b5 Increase sleep time in ScheduledATAITests
This commit increases the sleep time in
ScheduledAndTransactionalAnnotationIntegrationTests with the hope of
improving the robustness of the test suite on the CI build server.
2012-11-06 18:33:21 +01:00
Sam Brannen 85ab789f2f Refactor & polish DateTimeFormatterFactory[Bean]
This commit refactors the logic in DateTimeFormatterFactory's
createDateTimeFormatter() method to ensure forward compatibility with
possible future changes to the ISO enum.

This commit also polishes the Javadoc for DateTimeFormatterFactoryBean.

Issue: SPR-9959
2012-11-06 18:07:32 +01:00
Rossen Stoyanchev c348be2511 Add RequestBuilder for async dispatches
This change enanbles performing async dispatches via Spring MVC Test.
2012-11-05 21:18:06 -05:00
Phillip Webb 6b82348511 Merge pull request #175 from ericweinberg/master
* pull175:
  Ensure LineNumberReader is always closed
2012-11-05 15:41:38 -08:00
Eric Weinberg 33abee2db2 Ensure LineNumberReader is always closed
Wrap ResourceDatabasePopulator.readScript() code in a try/finally
block to ensure that the LineNumberReader is always closed.

Issue: SPR-9912
2012-11-05 15:41:28 -08:00
Phillip Webb 073b627f4e Polish ResourceDatabasePopulator 2012-11-05 15:22:11 -08:00
Phillip Webb 583819ca5f Fix batch operations sample in reference docs
Remove superfluous code from the sample in section 13.4.3 of the
JDBC reference guide.

Issue: SPR-9937
2012-11-05 14:48:15 -08:00
Phillip Webb c92ef13979 Merge pull request #178 from EzequielB/master
* pull178:
  Create import-into-eclipse.bat for Windows users
2012-11-05 13:11:29 -08:00
Ezequiel Ballesi ccf3732cd8 Create import-into-eclipse.bat for Windows users
Port import-into-eclipse.sh to a Windows batch file.
2012-11-05 12:21:42 -08:00
Phillip Webb 432c6ebdae Refactor DateTimeFormatterFactory
Refactor DateTimeFormatterFactory into two distinct classes; a general
purpose factory and a specialized FactoryBean.  These changes are
modeled after the existing VelocityEngineFactory and
VelocityEngineFactoryBean classes.

Issue: SPR-9959
2012-11-05 11:30:25 -08:00
Rossen Stoyanchev 38cf91922c Fix intermittent test failure in AsyncTests 2012-11-05 11:51:02 -05:00
Chris Beams a64b04afa4 Prefix zip archives with 'spring-framework'
Prior to this change, zip archives were named

   spring-${version}-${classifier}.zip

e.g.:
 - spring-3.2.0.RC1-dist.zip
 - spring-3.2.0.RC1-docs.zip
 - spring-3.2.0.RC1-schema.zip

This commit updates the Gradle build script to ensure that the fully-
qualified 'spring-framework' name is used consistently, such that names
follow the pattern

   spring-framework-${version}-${classifier}.zip

This includes the naming of the root-level directory within the -dist
zip.

Issue: SPR-9954
2012-11-05 10:21:01 +01:00
Sam Brannen 85411be31f Update readme.txt regarding changelog location 2012-11-05 00:43:30 +01:00
Sam Brannen 93c01e0710 Fix timezone issue in DateTimeFormatterFactory
The DateTimeFormatterFactory introduced in SPR-7121 supports a timeZone
property; however, this property is currently not properly supported.

This commit addresses this issue by ensuring that the timeZone properly
is honored.

Issue: SPR-9953
2012-11-04 18:59:01 +01:00
Sam Brannen cef5f0222e Polish Javadoc and imports in datetime package
Issue: SPR-7121
2012-11-04 15:37:26 +01:00
Sam Brannen dc0a0df8d6 Polish Javadoc for ConcurrentReferenceHashMap
Issue: SPR-9796
2012-11-04 15:37:26 +01:00
Chris Beams d087e7fe0b Increment version to 3.2.0.BUILD-SNAPSHOT 2012-11-04 15:29:35 +01:00
Spring Buildmaster b3e3a37441 Release version 3.2.0.RC1 2012-11-04 05:19:58 -08:00
Chris Beams 08514e25db Update changelog 2012-11-04 13:32:42 +01:00
Phillip Webb e02c309b77 Update changelog 2012-11-03 17:25:56 -07:00
Phillip Webb 4e976435c7 Merge pull request #161 from philwebb/SPR-7121
* SPR-7121:
  Support for custom global Joda DateTimeFormatters
  Move JRuby dependency below Joda
  Support DateTimeFormat annotation without Joda
  Corrected date pattern in JavaDocs
  Polish whitespace and formatting
2012-11-03 17:12:14 -07:00
Phillip Webb 6660227d22 Support for custom global Joda DateTimeFormatters
Added dateFormatter, timeFormatter and dateTimeFormatter properties
to JodaTimeFormatterRegistrar allowing for custom global formatting.

DateTimeFormatterFactory can be used when configuring with XML.

Issue: SPR-7121
2012-11-03 16:55:23 -07:00
Phillip Webb 856fb2ccac Move JRuby dependency below Joda
JRuby includes a copy of joda classes with the same package names.
This commit changes the order of the loaded jars to load the original
joda classes first.
2012-11-03 16:55:22 -07:00
Phillip Webb a26059f94a Support DateTimeFormat annotation without Joda
Dependency on Joda Time when using the @DateTimeFormat annotation is
now optional. If Joda Time is not present the JDK SimpleDateFormat
will be used to parse and print date patterns. If Joda time is
present it will always be used in preference to SimpleDateFormat.

Issue: SPR-6508
2012-11-03 16:55:15 -07:00
Phillip Webb ddddec8719 Corrected date pattern in JavaDocs
The 'hh' pattern should be 'HH' as ISO dates use 24hr notation.
2012-11-03 15:52:31 -07:00
Phillip Webb a75b6ee5b6 Polish whitespace and formatting 2012-11-03 15:49:52 -07:00
Phillip Webb 409b533281 Merge pull request #146 from philwebb/SPR-9796
* SPR-9796:
  Update cache to support concurrent reads
  Cache and late resolve annotations for performance
  Polish Property class
  Develop ConcurrentReferenceHashMap
2012-11-03 15:46:30 -07:00
Phillip Webb 3aa9ac15a1 Update cache to support concurrent reads
Change the cache implementation from a synchronized weak hash map to
a concurrent implementation.

Issue: SPR-8701
2012-11-03 15:34:12 -07:00
Phillip Webb 02ce826ce4 Cache and late resolve annotations for performance
Annotations are no longer resolved in the constructor and are cached
for improved performance.

Issue: SPR-9166
2012-11-03 15:34:11 -07:00
Phillip Webb 6e0400db32 Polish Property class 2012-11-03 15:34:09 -07:00
Phillip Webb fac060f0af Develop ConcurrentReferenceHashMap
Develop a new ConcurrentMap implementation that support both weak and
soft entry references. Intended primarily to be used internally to
support fast concurrent caching.

Issue: SPR-9796
2012-11-03 15:33:59 -07:00
Phillip Webb 5a0c4a9841 Merge pull request #177 from EzequielB/master
* branched_master:
  Correct typo in GRADLE_OPTS for Windows
2012-11-02 11:43:16 -07:00
Ezequiel Ballesi 754af2118b Correct typo in GRADLE_OPTS for Windows
The -XX:MaxHeapSize option should include the 'm' postfix to signify
that the value is megabytes rather than bytes.
2012-11-02 11:40:24 -07:00
Rossen Stoyanchev f528c39456 Add UnknownHttpStatusCodeException
This is more specific exception raised instead of RestClientException
when the raw HTTP status code received from the server is not one of
the HttpStatus enum values.

Issue: SPR-9406
2012-11-02 13:47:24 -04:00
Rossen Stoyanchev de38c033e4 Make hamcrest dependency optional in spring-test
Users of Spring MVC Test will need to list a hamcrest dependency --
either hamcrest-library or hamcrest-all.

Issue: SPR-9940
2012-11-02 12:20:13 -04:00
Chris Beams c94bc2e709 Respect spring.profiles.active in #addActiveProfile
Prior to this commit, calls to ConfigurableEnvironment#addActiveProfile
would cause any active profile values provided via the
"spring.profiles.active" property to be ignored.

Now these two mechanisms can be used in conjunction and work as
expected.

Issue: SPR-9944
2012-11-02 15:02:13 +01:00
Chris Beams 74e86fe52f Support SQL exception translation for MSSQL 209
SQL Server error 209 [1] will now raise a BadSqlGrammarException.

[1]: http://www.sql-server-helper.com/error-messages/msg-1-500.aspx

Issue: SPR-9946
2012-11-02 14:18:37 +01:00
Chris Beams 1070e4d5c1 Initialize FrameworkServlet property sources eagerly
Prior to this change,
FrameworkServlet#configureAndRefreshWebApplicationContext called
 #postProcessWebApplicationContext(wac) and #applyInitializers(wac)
prior to #refresh, but because servlet-based property source stubs were
not replaced until #refresh, any post-processing or initialization
routines could not benefit from accessing the Environment to retrieve
properties from the ServletContext or ServletConfig.

The workaround to this problem is detailed in SPR-9610 - the user simply
needed to call WebApplicationContextUtils#initServletPropertySources
manually within their ApplicationContextInitializer (or overridden
 #postProcessWebApplicationContext method)

This commit ensures that
FrameworkServlet#configureAndRefreshWebApplicationContext calls
WebApplicationContextUtils#initServletPropertySources eagerly, prior to
invoking #postProcessWebApplicationContext and #applyInitializers.
Related Javadoc has also been updated throughout to clarify the behavior
of #initServletPropertySources, when it can be called and what the
effects are, etc.

Note also that a reproduction issue was added to demonstrate the problem
and verify its resolution [1].

[1]: https://github.com/SpringSource/spring-framework-issues/tree/master/SPR-9610

Issue: SPR-9610
2012-11-02 13:05:48 +01:00
Rossen Stoyanchev 242bf7c4e3 Refine hamcrest dependency in spring-test-mvc project
1) removed the hamcrest-all dependency requirement and replaced it with
the more focused hamcrest-library dependency

2) added MatcherAssertionErrors as a replacement of
org.hamcrest.MatcherAssert, which in hamcrest 1.1 is only available
through the hamcrest-all dependency (and not in hamcrest-core nor in
the hamcrest embedded in JUnit 4.4 through 4.8)

3) changed the required hamcrest version from 1.1 to 1.3 and made sure
the spring-test-mvc project does not rely on newer hamcrest
functionality without checking if it is available first

Applications that already depend on older versions of hamcrest
(in particular 1.1) via hamcrest-library, hamcrest-all or as part of
junit 4.4 through 4.8 should not be disrupted if they add spring-test
but may wish to exclude the hamcrest-library transitive dependency
from spring-test in order to avoid extra jars in the classpath

Applications that depend on hamcrest 1.3 should not have to do anything

Issue: SPR-9940
2012-11-01 23:58:50 -04:00
Phillip Webb 468f9c7814 Polish 2012-11-01 11:10:25 -07:00
Phillip Webb 15b64ba601 Restore -XX:MaxHeapSize=256m for gradlew.bat
Restore the MaxHeapSize setting for the Windows build only.
2012-11-01 10:29:07 -07:00
Chris Beams bbe1301d63 Remove -XX:MaxHeapSize=256m from default GRADLE_OPTS
This setting was causing failures in the CI build, and was not present
prior to the recent updates to gradle wrapper generation.

This commit also simplifies the gradle wrapper customizations by placing
the logic in a doLast block within the original 'wrapper' task, as
to creating a second wrapper task and extending from the first.
2012-11-01 11:04:58 +01:00
Rossen Stoyanchev c0baea58c0 Fix issue with generic @RequestBody arguments
The original commit c9b7b1 ensured the ability to read parameterized
type @RequestBody arguments via GenericHttpMessageConverter (e.g.
application/json and List<String>). However, it also affected the
ability to read @RequestBody arguments that happen are parameterized
but aren't treated as such (e.g. application/x-www-form-urlencoded and
MultiValueMap<String, String>). This commit corrects the issue.

Issue: SPR-9570
2012-10-31 21:15:16 -04:00
Rossen Stoyanchev 0e3aa0eec4 Peek into the content for @RequestBody(required=false)
For @RequestBody(required=false), it is not sufficient to check if the
InputStream is null. This change reads the first byte of the request
InputStream to determine if the request body is empty or not.

If the InputStream implementation supports mark(int) and reset(), then
we use those. Otherwise we use PushbackInputStream to read and unread
the first byte.

All of this is done only if the required flag of @RequestBody is set
to "false" (default is "true").

Issue: SPR-9942
2012-10-31 21:15:15 -04:00
Phillip Webb 742d5f6f38 Restore GRADLE_OPTS from wrappers
Run the updated build script to generate gradlew and gradlew.bat files
that have correct GRADLE_OPTS.
2012-10-31 17:30:52 -07:00
Phillip Webb 23b091b786 Remove need to manually set wrapper GRADLE_OPTS
Replace the wrapper task with a variant that automatically adds the
appropriate GRADLE_OPTS to the shell and bat files.
2012-10-31 17:29:00 -07:00
Sam Brannen 00220ebab0 Fix typo in changelog 2012-10-31 20:35:11 +01:00
Phillip Webb 6c63271f55 Update changelog 2012-10-31 12:08:44 -07:00
Sam Brannen 5b59a25a59 Update changelog
Added missing JIRA issue IDs.
2012-10-31 18:45:31 +01:00
Sam Brannen 462605987d Delete unused import 2012-10-31 17:46:24 +01:00
Sam Brannen 0b45daf5e9 Assess claims made in SPR-9799
This commit validates the claims made in SPR-9799.

 - Spr9799XmlConfigTests demonstrates that a WAC is not always necessary
   when integration testing with XML configuration that uses
   <mvc:annotation-driven />.

 - Spr9799AnnotationConfigTests demonstrates that a WAC is in fact
   necessary when integration testing with a configuration class that
   uses @EnableWebMvc.

Issue: SPR-9799
2012-10-31 17:41:25 +01:00
Phillip Webb 4cdf46f83c Polish @Imports search code
Issue: SPR-9925
2012-10-31 09:30:17 -07:00
Sam Brannen 8bb19f05ea Fix typos in Javadoc 2012-10-31 16:22:16 +01:00
Phillip Webb 3416e058a0 Ensure @Imports are processed in correct order
Issue: SPR-9925
2012-10-31 13:40:06 +01:00
Juergen Hoeller af56b3b7e3 Extended support for meta-annotations etc 2012-10-31 12:11:12 +01:00
Juergen Hoeller 914a1b2088 @Autowired, @Value and qualifiers may be used as meta-annotations for custom injection annotations 2012-10-31 12:10:17 +01:00
Chris Beams 985cb9df11 Merge pull request #176 from philwebb/SPR-9925
# By Phillip Webb
* SPR-9925:
  Prevent duplicate @Import processing
  Polish Javadoc for @Import
  Improve #toString for AnnotationAttributes
2012-10-31 09:59:10 +01:00
Phillip Webb 6d8b37d8bb Prevent duplicate @Import processing
Refactor ConfigurationClassParser to recursively find values from
all @Import annotations, combining them into a single unique set.

This change prevents ImportBeanDefinitionRegistrars from being
invoked twice.

Issue: SPR-9925
2012-10-31 09:42:27 +01:00
Phillip Webb e6c4840356 Polish Javadoc for @Import 2012-10-31 09:42:27 +01:00
Phillip Webb 4036ffc4d4 Improve #toString for AnnotationAttributes
Improve the #toString method for AnnotationAttributes to print array
values as a comma-separated list. This change is primarily to provide
better variable inspection when debugging code within an IDE.
2012-10-31 09:42:27 +01:00
Juergen Hoeller 2081521695 @Autowired and @Value may be used as meta-annotations for custom injection annotations 2012-10-31 09:38:13 +01:00
Juergen Hoeller 7fdb637df0 Clarified ServletConfigAware behavior in case of no ServletConfig being available
Issue: SPR-9855
2012-10-31 09:38:12 +01:00
Juergen Hoeller 54d083a6f8 Added proper synchronization and not-null check to SimpleMessageListenerContainer's doShutdown
Issue: SPR-9930
2012-10-31 09:38:11 +01:00
Rossen Stoyanchev 1acd5cff8f Polish methods to register async interceptors 2012-10-30 22:38:39 -04:00
Rossen Stoyanchev d701464517 Add onTimeout/onCompletion callbacks to DeferredResult
Issue: SPR-9914
2012-10-30 21:58:44 -04:00
Juergen Hoeller 3a09644843 Adapted PropertySourcesPropertyResolverTests for different error message format 2012-10-31 02:53:24 +01:00
Juergen Hoeller 5b93b14392 DateTimeFormat annotation supports use as a meta-annotation as well 2012-10-31 02:53:23 +01:00
Juergen Hoeller ee50d849a1 Polished "Could not resolve placeholder" error message 2012-10-31 02:53:22 +01:00
Juergen Hoeller 69763fe249 Added test for custom async annotation 2012-10-31 02:53:22 +01:00
Juergen Hoeller 0e0200769d ManagedResource annotation supports placeholders for String attributes
In particular, the specified object name may use a placeholder for its domain part now, allowing for several instances of the MBean to be registered against the same MBeanServer from different applications.

Issue: SPR-8244
2012-10-31 02:53:21 +01:00
Juergen Hoeller 8f8e517c0d Portlet mapping predicate compareTo implementations are transitive now
Also removed unused validateHandler code with dead cachedMappings HashMap.

Issue: SPR-9874
2012-10-31 02:53:20 +01:00
Juergen Hoeller 4ff765446e Added "jtaDataSource" property to JPA LocalContainerEntityManagerFactoryBean (for default units)
Issue: SPR-9883
2012-10-31 02:53:19 +01:00
Juergen Hoeller 88ef3ce51f DispatcherPortlet uses a forward for rendering a view as resource response
Issue: SPR-9876
2012-10-31 02:53:18 +01:00
Phillip Webb 1c7e8cfbf6 Merge pull request #99 from dsyer/SPR-4675
* SPR-4675:
  Throw on advise returning null for primitive type
  Upgrade to Hamcrest 1.3
2012-10-30 16:11:00 -07:00
Dave Syer 3e296974c4 Throw on advise returning null for primitive type
Throw an AopInvocationException when an AOP advisor returns null on
a method that should return a primitive type.

Issue: SPR-4675
2012-10-30 16:09:13 -07:00
Phillip Webb 39682b7d3f Upgrade to Hamcrest 1.3 2012-10-30 15:52:46 -07:00
Phillip Webb 22dfe93f2f Revert ConversionService SPI interface
Remove canBypassConvert() methods from the ConversionService SPI
interface, restoring it to the previous Spring 3.1 incarnation.

Bypassing conversion is now only supported when using a
GenericConversionService.

Issue: SPR-9566
2012-10-30 14:00:12 -07:00
Phillip Webb e9cdb3d24e Polish JavaDoc 2012-10-30 12:07:31 -07:00
Phillip Webb 31331e6ad3 Avoid NPE in ObjectToObjectConverter
Bypass ObjectToObject conversion when source and object types are
identical and protect against a null source object.

Prior to this commit the TypeDescriptor was used to determine if
conversion was necessary.  This caused issues when comparing a
descriptor with annotations to one without.  The updated code
now compares using TypeDescriptor.getType().

The ObjectToObject converter will now no longer attempt to convert
null source objects.

Issue: SPR-9933
2012-10-30 11:25:10 -07:00
Chris Beams 9055a7f810 Merge pull request #156 from philwebb/SPR-9257
# By Phillip Webb
* SPR-9257:
  Resolve Collection element types during conversion
2012-10-30 14:01:16 +01:00
Phillip Webb 5a1f924ac3 Resolve Collection element types during conversion
TypeDescriptor.valueOf now uses GenericCollectionTypeResolver to resolve
Collection and Map element types whereas previously this information was
simply not supported, i.e. null.

Issue: SPR-9257
2012-10-30 14:00:50 +01:00
Chris Beams 99b2f6a081 Merge pull request #163 from philwebb/SPR-9862
# By Phillip Webb
* SPR-9862:
  Allow SpEL reserved words in type package names
2012-10-30 13:39:20 +01:00
Phillip Webb edce2e7bca Allow SpEL reserved words in type package names
Expand the kinds of tokens considered when parsing qualified type names.
This allows previously reserved words (for example 'mod') to be used as
part of a package name.

Issue: SPR-9862
2012-10-30 13:38:37 +01:00
Chris Beams 7c399d795e Merge pull request #167 from philwebb/SPR-9707
# By Chris Beams (1) and Phillip Webb (1)
* SPR-9707:
  Introduce MessageCodeFormatter abstraction
  Provide alternative message code resolver styles
2012-10-30 12:21:37 +01:00
Chris Beams 38bfb2bd89 Introduce MessageCodeFormatter abstraction
This commit refactors changes introduced in 21760a8 as follows:

 - Introduce top-level MessageCodeFormatter interface and
   DefaultMessageCodesResolver#setMessageCodeFormatter property to allow
   for user-defined message code formatting strategies

 - Rename DefaultMessageCodesResolver.Style enum => DMCR.Format

 - Refactor DefaultMessageCodesResolver.Format to implement the new
   MessageCodeFormatter interface

The result is that users have convenient access to common formatting
strategies via the Format enum, while retaining the flexibility to
provide their own custom MessageCodeFormatter implementation if desired.

See DefaultMessageCodesResolverTests#shouldSupport*Format tests for
usage examples.

Issue: SPR-9707
2012-10-30 12:19:45 +01:00
Phillip Webb 21760a8b6b Provide alternative message code resolver styles
Introduce new 'style' property to DefaultMessageCodesResolver allowing
for alternative message styles. Current styles are PREFIX_ERROR_CODE
and POSTFIX_ERROR_CODE. The default style retains existing behavior.

Issue: SPR-9707
2012-10-30 10:09:36 +01:00
Chris Beams a57ff506f2 Merge pull request #132 from philwebb/SPR-9692
# By Phillip Webb (6) and Chris Beams (1)
* SPR-9692:
  Review and polish pull request #132
  Support conversion from Enum Interface
  Test SpEL unconditional argument conversion
  Bypass conversion when possible
  Extend conditional conversion support
  Refactor GenericConversionService
  Additional GenericConversionService Tests
2012-10-30 09:15:57 +01:00
Chris Beams 222eec58cd Review and polish pull request #132
Content:

 - Rename Conditional{Conversion=>Converter}
 - Add @since tags where appropriate
 - Update Apache date headers to read 2002-2012 (not just 2012)
 - Correct minor Javadoc typo

Style:

 - Polish line breaks / whitespace
 - Use wildcard static imports where appropriate

Issue: SPR-9566, SPR-9692, SPR-9928, SPR-9927
2012-10-30 09:14:28 +01:00
Phillip Webb f82c6ed7cc Support conversion from Enum Interface
EnumToStringConverter in now conditional and only matches Enums that
do not implement interfaces that can be converted.

Issue: SPR-9692
2012-10-30 09:14:24 +01:00
Phillip Webb 138957b148 Test SpEL unconditional argument conversion
Issue: SPR-9566
2012-10-30 09:14:18 +01:00
Phillip Webb a27d1a28ff Bypass conversion when possible
Prior to this commit conversion between like types would often result in
a copy of the object. This can be problematic in the case of large byte
arrays and objects that do not have a default constructor.

The ConversionService SPI now includes canBypassConvert methods that can
be used to deduce when conversion is not needed. Several existing
converters have been updated to ensure they only apply when source and
target types differ.

This change introduces new methods to the ConversionService that will
break existing implementations. However, it anticipated that most users
are consuming the ConversionService interface rather then extending it.

Issue: SPR-9566
2012-10-30 09:13:39 +01:00
Phillip Webb f13e3ad72b Extend conditional conversion support
Introduce new ConditionalConversion interface that can be applied to
Converter, ConverterFactory or GenericConverter interfaces to make
them conditional. Prior to this commit the only
ConditionalGenericConverter could be conditional.

Issue: SPR-9928
2012-10-30 09:13:36 +01:00
Phillip Webb 4dc289592d Refactor GenericConversionService
Refactor internal workings of GenericConversionService in order to
better support future enhancements. This commit should not affect
existing behavior.

Issue: SPR-9927
2012-10-30 09:13:22 +01:00
Phillip Webb 9bfe675761 Additional GenericConversionService Tests 2012-10-30 09:13:18 +01:00
Rossen Stoyanchev d8469d118b Fix issue with extracting matrix variables
The servlet spec recommends removing path parameters from the
contextPath, servletPath, and pathInfo but not from the requestURI.
This poses a challenge for the UrlPathHelper, which determines the
lookup path by comparing the above.

This change introduces a method that matches the requestURI to the
contextPath and servletPath ignoring path parameters (i.e. matrix
variables) for comparison purposes while also preserving them in the
resulting lookup path.
2012-10-29 19:09:00 -04:00
Rossen Stoyanchev 826057bcde Expose convenience method in MVC Java config
The new method allows modifying or overriding the
ConfigurableWebBindingInitializer instance used for data binder
initialization.

Issue: SPR-8984
2012-10-29 05:56:30 -04:00
Phillip Webb 3a1dd20de9 Upgrade to Gradle 1.2
Issue: SPR-9790
2012-10-28 12:11:43 -07:00
Phillip Webb 7fd18298d1 Update changelog 2012-10-28 12:01:39 -07:00
Sam Brannen 404ea7adcf Polish Javadoc in ContextLoaderUtils 2012-10-28 19:15:10 +01:00
Rossen Stoyanchev 5d04ef4c4a Support selective filtering of error dispatches
OncePerRequestFilter now allows sub-classes to choose whether they
should ever get involved in processing an error dispatch.

Issue: SPR-9895
2012-10-28 12:47:00 -04:00
Rossen Stoyanchev d952da2338 Polish (minor) async support in filters
Issue: SPR-9895
2012-10-28 12:10:38 -04:00
Rossen Stoyanchev f7ec738857 Sync up MockAsyncContext implementations in src/test 2012-10-28 12:10:38 -04:00
Sam Brannen d4e7d19237 Consistent class loading in ContextLoaderUtils 2012-10-28 16:23:49 +01:00
Sam Brannen c79c4c6e25 Fix typos and suppress warnings in JdbcTemplate 2012-10-28 15:43:16 +01:00
Phillip Webb e4158f91a4 Merge pull request #153 from gid79/SPR-9812
* SPR-9812:
  Allow 'arg-type' matches against element body
  Polish whitespace
2012-10-27 19:50:12 -07:00
Gareth Davis 0709c033a0 Allow 'arg-type' matches against element body
Allow the body of 'arg-type' XML elements to be used as an alternative to
'match' attribute when defining a 'replace-method' in XML configuration.

This change has been introduced primarily to support the samples printed
in the Apress 'Pro Spring' book.

Issue: SPR-9812
2012-10-27 19:49:54 -07:00
Phillip Webb 376eeed8b1 Polish whitespace 2012-10-27 19:49:54 -07:00
Sam Brannen 461d99af29 Fix package cycles in spring-test
Code introduced in conjunction with SPR-5243 introduced package cycles
between the ~.test.context and ~.test.context.web packages. This was
caused by the fact that ContextLoaderUtils worked directly with the
@WebAppConfiguration and WebMergedContextConfiguration types.

To address this, the following methods have been introduced in
ContextLoaderUtils. These methods use reflection to circumvent hard
dependencies on the @WebAppConfiguration and
WebMergedContextConfiguration types.

 - loadWebAppConfigurationClass()
 - buildWebMergedContextConfiguration()

Issue: SPR-9924
2012-10-28 00:13:01 +02:00
Sam Brannen 33d5b011d3 Reduce code duplication in ContextLoaderUtils
Prior to this commit, the following two methods in ContextLoaderUtils
contained almost identical loops for traversing the test class
hierarchy:

 - resolveContextLoaderClass(Class<?>, String)
 - resolveContextConfigurationAttributes(Class<?>)

With this commit, resolveContextLoaderClass() no longer traverses the
class hierarchy. Instead, it now works directly with the resolved list
of ContextConfigurationAttributes, thereby removing code duplication.

Issue: SPR-9918
2012-10-27 22:29:55 +02:00
Sam Brannen 397d20b55a Update changelog
Issue: SPR-9593
2012-10-27 21:10:15 +02:00
Sam Brannen 90c5f226b6 Fix package cycles in spring-test
Code introduced in conjunction with SPR-5243 introduced package cycles
between the ~.test.context.web and ~.test.context.support packages. This
was caused by the fact that ServletTestExecutionListener extended
AbstractTestExecutionListener.

To address this, ServletTestExecutionListener now implements
TestExecutionListener directly.

Issue: SPR-9924
2012-10-27 20:42:06 +02:00
Sam Brannen acc8364539 Update changelog
Issue: SPR-9724
2012-10-27 18:29:52 +02:00
Sam Brannen 591aa01741 Configurable locales in MockHttpServletRequest
Prior to this commit the MockHttpServletRequest constructor chain set
the preferred local to Locale.ENGLISH. Furthermore, it was possible to
add additional preferred locales "in front" of ENGLISH; however, it was
not possible to delete ENGLISH from the list of preferred locales.

This commit documents the fact that ENGLISH is the default preferred
locale and makes it possible to set the list of preferred locales via a
new setPreferredLocales(List<Locale> locales) method.

Issue: SPR-9724
2012-10-27 18:13:13 +02:00
Sam Brannen 7d9c823a15 Delete unused imports 2012-10-27 17:32:51 +02:00
Rossen Stoyanchev fe77c3d5fe Fix failing test 2012-10-26 22:01:35 -04:00
Rossen Stoyanchev e14ba9dec3 Add config options for MVC async interceptors
The MVC namespace and the MVC Java config now allow configuring
CallableProcessingInterceptor and DeferredResultProcessingInterceptor
instances.

Issue: SPR-9914
2012-10-26 21:29:54 -04:00
Rossen Stoyanchev e4a13cd4ad Polish (minor) RequestMappingHandlerAdapter
Revise order of fields reflecting configurable vs internal fields and
also grouping them accordingly.
2012-10-26 18:24:22 -04:00
Rossen Stoyanchev f036ed639f Polish (major) MVC async processing interceptors
New afterTimeout and afterCompletion callbacks

afterTimeout can provide a concurrent result to be used instead of the
one that could not be set or returned on time

Interceptor exceptions cause async processing to resume treating the
exception as the concurrent result

Adapter classes for convenient implementation of the interfaces

Issue: SPR-9914
2012-10-26 18:04:27 -04:00
Chris Beams 06e34f05a6 Allow PropertyResolvers to ignore unresolvable ${placeholders}
Prior to this commit, the PropertyResolver API (and therefore the
Environment API) allowed callers a choice between
 #resolvePlaceholders and #resolveRequiredPlaceholders for low-level
${placeholder} resolution. However, when calling the higher level
 #getProperty variants, users had no control over whether property
values returned with unresolvable ${placeholders} would result in an
exception or simply be passed through.

This commit introduces a #setIgnoreUnresolvableNestedPlaceholders
property via ConfigurablePropertyResolver, defaulting to false, the
value of which is respected by AbstractPropertyResolver#getProperty
method implementations. See the new test in
PropertySourcesPropertyResolverTests for usage examples.

Issue: SPR-9569, SPR-9473
2012-10-26 23:47:00 +02:00
Phillip Webb 01272fb0e6 Polish whitespace for conversion service packages 2012-10-26 14:09:26 -07:00
Chris Beams 61186b0b56 Rename ref doc PDF spring-{=>framework-}reference
- Upgrade to 0.1.6 snapshot of docbook plugin

 - Fully qualify PDF artifact name as 'spring-framework-reference.pdf'
   instead of former 'spring-reference.pdf'

Issue: SPR-9598
2012-10-26 17:56:00 +02:00
Chris Beams 0bd4dab4e3 Filter @Configuration classes out of LTW test
Moving @EnableMBeanExport and its MBeanExportConfiguration
@Configuration class into context.annotation caused a side effect with
ComponentScanningWithLTWTests, which component scans context.annotation
in order to test LTW behavior. Picking up MBeanExportConfiguration
without proper MBean configuration resulted in a NullPointerException
during test execution.

This commit simply filters out all @Configuration classes from the LTW
test's component-scanning directive.

Issue: SPR-8943
2012-10-26 15:47:11 +02:00
Chris Beams 5d4d1eaca4 Fix package cycle in @EnableMBeanExport
Prior to this commit, @EnableMBeanExport was declared in the
jmx.export.annotation package. This makes logical sense, but
nevertheless creates a package cycle, because @EnableMBeanExport depends
on MBeanExportConfiguration which in turn depends on context.annotation
types like @Configuration, @Bean, and @Role.

context.annotation.config.MBeanExportBeanDefinitionParser, on the other
hand already has dependencies on types in jmx.support. Together, this
means that a package cycle was introduced.

The solution to this is simple: move @EnableMBeanExport and friends from
jmx.export.annotation => context.annotation. This has been the strategy
for other @Enable annotations and for the same reasons. It also makes a
kind of logical sense: just like you find <context:mbean-export> and
<context:load-time-weaver> under the context: XML namespace, so too do
you find their @Enable* counterparts under the context.annotation
namespace.

Issue: SPR-8943
2012-10-26 15:08:14 +02:00
Chris Beams 54db7387de Fix split package introduced by @EnableSpringConfigured
Commit 5327a7a37d moved
@EnableSpringConfigured from beans.factory.aspectj =>
context.annotation within the spring-aspects module. This resolved a
package cycle but had the side-effect of causing a "split package" [1]
problem between spring-context and spring-aspects in OSGi-based
classloader environments because the context.annotation package now
exists in both modules.

The simplest and best solution from an OSGi perspective is to relocate
@EnableSpringConfigured and its supporting SpringConfiguredConfiguration
class into a new package. This commit moves both these types into
context.annotation.aspectj, following convention with other such
"aspectj"-qualified packages in the spring-aspects module.

As with the previous move, it is presumed this change will be low-impact
as the "spring-configured" approach to domain object injection is a
niche feature to begin with, and @EnableSpringConfigured has existed in
its current location only since 3.1.2 and this change is being made in
time for 3.1.3.

[1]: http://wiki.osgi.org/wiki/Split_Packages

Issue: SPR-9811, SPR-9441
2012-10-26 14:01:29 +02:00
Rossen Stoyanchev cb86712187 Provide method to set async TimeoutHandler
Issue: SPR-9914
2012-10-25 12:35:23 -04:00
Rossen Stoyanchev b093b30315 Polish DeferredResult
After this change a DeferredResult can be set before a
DeferredResultHandler has been set.
2012-10-25 11:29:05 -04:00
Chris Beams 788f298a35 Merge pull request #174 from mdeinum/SPR-9909
# By Marten Deinum
* SPR-9909:
  Allow setting WSDL document as a Resource
2012-10-25 15:05:12 +02:00
Marten Deinum 5a91d60788 Allow setting WSDL document as a Resource
Prior to this change, LocalJaxWsServiceFactory allowed specifying a WSDL
document URL. Now users may also specify a WSDL document represented as
a Spring Resource object for convenience.

Issue: SPR-9909
2012-10-25 15:04:24 +02:00
Chris Beams d52e868530 Merge pull request #171 from philwebb/SPR-8943
# By Phillip Webb
* SPR-8943:
  Introduce @EnableMBeanExport
  Polish whitespace
2012-10-25 14:26:30 +02:00
Phillip Webb cae08db6a9 Introduce @EnableMBeanExport
Add support for @EnableMBeanExport annotation allowing @Configuration
classes to easily export all MBeans and @ManagedResources from the
Spring application context. The annotation is functionally equivalent
to the XML <context:mbean-export/> element.

Issue: SPR-8943
2012-10-25 14:25:42 +02:00
Phillip Webb 6179261d58 Polish whitespace 2012-10-25 12:29:32 +02:00
Chris Beams 8a38891e15 Update Apache license header date
Issue: SPR-9853
2012-10-25 09:21:27 +02:00
Phillip Webb 91f6123167 Support SQL exception translation for ORA-06550
Oracle error ORA-06550 will now raise a BadSqlGrammarException.

Issue: SPR-9853
2012-10-24 10:39:11 -07:00
Phillip Webb ba5a148d8d Polish whitespace 2012-10-24 10:37:02 -07:00
Chris Beams 59fb67e38d Update SpEL test to reflect native float support
Issue: SPR-9486
2012-10-24 14:27:42 +02:00
Chris Beams 37babc5c82 Merge pull request #114 from satyapalreddy/master
# By Satyapal Reddy
* SPR-9486:
  Add SpEL support for float literals
2012-10-24 14:09:03 +02:00
Satyapal Reddy be8f23d756 Add SpEL support for float literals
This change ensures that SpEL expressions involving floats are
supported natively as opposed to the previous behavior which required
conversion to double, leading to potential downstream conversion
ambiguities.

Issue: SPR-9486
2012-10-24 14:06:53 +02:00
Chris Beams 2ab2c2e9ce Merge pull request #172 from aclement/SPR-9751
* SPR-9751:
  Add SpEL support for increment/decrement operators
2012-10-24 03:23:04 +02:00
Andy Clement f64325882d Add SpEL support for increment/decrement operators
With this commit the Spring Expression Language now supports
increment (++) and decrement (--) operators. These can be
used as either prefix or postfix operators. For example:
'somearray[index++]' and 'somearray[--index]' are valid.

In order to support this there are serious changes to the
evaluation process for expressions. The concept of a
value reference for an expression component has been introduced.
Value references can be passed around and at any time the actual
value can be retrieved (via a get) or set (where applicable). This
was needed to avoid double evaluation of expression components.
For example, in evaluating the expression 'somearray[index++]--'
without a value reference SpEL would need to evaluate the
'somearray[index++]' component twice, once to get the value and
then again to determine where to put the new value. If that
component is evaluated twice, index would be double incremented.
A value reference for 'somearray[index++]' avoids this problem.

Many new tests have been introduced into the EvaluationTests
to ensure not only that ++ and -- work but also that the
introduction of value references across the all of SpEL has
not caused regressions.

Issue: SPR-9751
2012-10-24 03:21:30 +02:00
Phillip Webb 33d37e8680 Polish 2012-10-23 07:07:59 -07:00
Rossen Stoyanchev 3bb515bec7 Improve async support in Spring MVC Test
When obtaining an async result, tests will now await concurrent
processing to complete for the exact amount of time equal to the
actual async timeout value.

Issue: SPR-9875
2012-10-22 21:28:43 -04:00
Rossen Stoyanchev 8270d82bda Fix failing test
Issue: SPR-7905
2012-10-22 20:09:38 -04:00
Rossen Stoyanchev c7e7e80a3a Update AbstractView with method to set content type
Before this change View implementations set the response content type
to the fixed value they were configured with.

This change makes it possible to configure a View implementation with
a more general media type, e.g. "application/*+xml", and then set the
response type to the more specific requested media type, e.g.
"application/vnd.example-v1+xml".

Issue: SPR-9807.
2012-10-22 17:23:57 -04:00
Rossen Stoyanchev 4f114a657f Merge pull request #130 from tmeighen/SPR-7905
* tmeighen-SPR-7905:
  Support wildcard style media types in JSON converters
2012-10-22 16:41:47 -04:00
Tim Meighen e16c40359a Support wildcard style media types in JSON converters
Add "application/*+json" to supported media types for both Jackson
message converters.

Issue: SPR-7905
2012-10-22 16:40:02 -04:00
Rossen Stoyanchev 2e1a68893d Update HttpHeaders.getAccept method
Some servlet containers (iPlanet) parse the Accept header and return
multiple values from request.getHeader("Accept"). The HttpHeaders
getAccept method has been updated to accommodate that hopefully
without causing any other issues.

The extra functionality is in effect only if we find only one
MediaType and there is more than one value for the 'Accept' header.

Issue: SPR-9655
2012-10-22 16:09:33 -04:00
Phillip Webb ae2d24808c Close 'beans' tag in MVC namespace documentation
Issue: SPR-9898
2012-10-22 09:56:07 -07:00
Rossen Stoyanchev e329698df5 Update changelog 2012-10-22 12:29:44 -04:00
Rossen Stoyanchev 0721146b14 Improve regex for parsing query params
Previously UriComponentsBuilder used a regular expression for parsing
query name-value pairs where both name and value were expected to not
contain neither '&', not '='. The idea is that the presence of reserved
characters makes it impossible to guess correctly how to parse the
query string (e.g. a=b&c).

This change relaxes the constraint on query param values, allowing them
to contain '='. In effect '&' is the ultimate separator of name-value
pairs, and any '=' in values is ignored. For example "q=1USD=?EUR" is
interpreted as "q equals '1USD=?EUR'".

Issue: SPR-9832
2012-10-22 11:04:48 -04:00
Rossen Stoyanchev 2f504dda3a Update remoting chapter (minor)
Issue: SPR-9822
2012-10-22 11:04:48 -04:00
Sam Brannen 4aaf014cc6 Support comments in SQL scripts in JdbcTestUtils
Prior to this commit, utility methods in JdbcTestUtils interpreted SQL
comments as separate statements, resulting in an exception when such a
script is executed.

This commit addresses this issue by introducing a
readScript(lineNumberReader, String) method that accepts a comment
prefix. Comment lines are therefore no longer returned in the parsed
script. Furthermore, the existing readScript(lineNumberReader) method
now delegates to this new readScript() method, supplying "--" as the
default comment prefix.

Issue: SPR-9593
2012-10-22 00:52:01 -04:00
Sam Brannen 7c538bd588 Rename WebTEL to ServletTEL
Renamed WebTestExecutionListener to ServletTestExecutionListener.
2012-10-19 20:29:20 -04:00
Sam Brannen ff8a6e8fdb Remove code duplication in ModelAndViewAssert
ModelAndViewAssert now uses assertion methods in the newly
introduced AssertionErrors class.
2012-10-19 20:19:03 -04:00
Rossen Stoyanchev 0a10f95e18 Shorten package name for Spring MVC Test framework 2012-10-18 14:20:45 -04:00
Rossen Stoyanchev caf2af077a Polish MockHttpServletRequestBuilder 2012-10-17 11:22:06 -04:00
Sam Brannen c579cd1ce9 Update changelog regarding major new testing features 2012-10-16 16:07:16 -04:00
Rossen Stoyanchev dbcbdace9e Parameterize AsyncTask type 2012-10-15 12:17:39 -04:00
Rossen Stoyanchev e98dc50f99 Fix issue in PatternsRequestCondition 2012-10-15 12:17:39 -04:00
Rossen Stoyanchev 300ab4537b Add Spring 32 methods to StandaloneMockMvcBuilder 2012-10-15 12:17:39 -04:00
Phillip Webb 9582085950 Add DefaultMessageCodesResolverTests
Add unit test for DefaultMessageCodesResolver
2012-10-15 10:06:34 -04:00
Sam Brannen 300d41840b Fix JDK7 method order-dependent issues in SRCCT
SpringRunnerContextCacheTests suffers from JDK7-related non-determinism
in values returned from Class#getDeclaredMethods(), which in turn
affects JUnit and its execution of @Test methods.

This commit addresses this issue by introducing an
OrderedMethodsSpringJUnit4ClassRunner that sorts the test methods
alphabetically, which is actually required for
SpringRunnerContextCacheTests to work properly.

Issue: SPR-9789
2012-10-13 20:29:59 +02:00
Sam Brannen 21ebbb9c02 Support session & request scoped beans in the TCF
This commit introduces RequestAndSessionScopedBeansWacTests which
verifies support for request and session scoped beans in the Spring
TestContext Framework (TCF).

This support was actually introduced as an intentional side effect of
the work performed for SPR-5243 through the addition of the new 
WebTestExecutionListener.

Issue: SPR-4588
2012-10-13 19:50:31 +02:00
Sam Brannen 0bb24f2922 Update documentation TODOs
Issue: SPR-9864
2012-10-13 18:43:50 +02:00
Phillip Webb 6adb49b7a9 Add StringToUUIDConverter
Conversion to and from UUID objects is now supported by the
DefaultConversionService.

Issue: SPR-9765
2012-10-12 14:47:19 -07:00
Phillip Webb c8c0e827b4 Polish trailing whitespace 2012-10-12 14:47:19 -07:00
Juergen Hoeller 29d60448cd Polishing 2012-10-12 23:34:23 +02:00
Juergen Hoeller a6ce821ad8 Made AutoProxyCreatorTests less dependent on container's own interrogation of FactoryBeans
Issue: SPR-9857
2012-10-12 23:34:22 +02:00
Juergen Hoeller 3cf5572ee8 LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Reverted change for @Bean methods that declare FactoryBean as their return type: The effects of trying to create the FactoryBean to find out about its implementation type are too far-reaching. It's better to recommend declaring a specific return type in the method signature if you want the container to specifically react to your implementation type.

Issue: SPR-9857
2012-10-12 23:34:22 +02:00
Juergen Hoeller 0af9244571 LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Includes a change for factory methods that declare their return type as FactoryBean: When asked for a specific type match (e.g. LoadTimeWeaverAware), we do check early singleton instances as well (reusing the instances that we create for getObjectType checks). This is necessary in order to make @Bean method introspection as capable as XML bean definition introspection, even in case of the @Bean method using a generic FactoryBean declaration for its return type (instead of the FactoryBean impl class).

Issue: SPR-9857
2012-10-12 23:34:21 +02:00
Juergen Hoeller 0f11920007 Only cache by-type lookups if configuration has been marked as frozen
Issue: SPR-9448
2012-10-12 23:34:20 +02:00
Juergen Hoeller d7e2de019f Mention matching bean names in exception message in case of non-unique EntityManagerFactory lookup 2012-10-12 23:34:19 +02:00
Juergen Hoeller 538ce4747d Only cache by-type lookups if configuration has been marked as frozen
Issue: SPR-9448
2012-10-12 23:34:18 +02:00
Juergen Hoeller 3c59725b94 LoadTimeWeaverAware beans are consistently being created early for JPA weaving to work reliably
Includes a change for factory methods that declare their return type as FactoryBean: When asked for a specific type match (e.g. LoadTimeWeaverAware), we do check early singleton instances as well (reusing the instances that we create for getObjectType checks). This is necessary in order to make @Bean method introspection as capable as XML bean definition introspection, even in case of the @Bean method using a generic FactoryBean declaration for its return type (instead of the FactoryBean impl class).

Issue: SPR-9857
2012-10-12 23:34:18 +02:00
Juergen Hoeller cfdcb54711 Jaxb2Marshaller has non-synchronized access to the JAXBContext once initialized
Issue: SPR-9867
2012-10-12 23:34:17 +02:00
Juergen Hoeller 138fa8af0e OpDivide does not return a TypedValue for its operate result (consistent with OpMultiply)
Issue: SPR-9869
2012-10-12 23:34:16 +02:00
Juergen Hoeller ff7dcec5f7 BeanWrapper does not fall back to String constructor if ConversionService attempt failed before
Issue: SPR-9865
2012-10-12 23:34:15 +02:00
Juergen Hoeller 65743936ff Provider injection into prototype beans works for method parameters as well
Issue: SPR-9630
2012-10-12 23:34:14 +02:00
Phillip Webb 3f1fb4eeea Merge pull request #155 from philwebb/SPR-9284
* SPR-9284:
  Allow MapToMap conversion to work when the target map does not have a default constructor (as long as a new map copy is not required).
  Polish trailing whitespace
2012-10-12 13:11:02 -07:00
Phillip Webb 38c4393592 Allow MapToMap conversion to work when the target map does not have a
default constructor (as long as a new map copy is not required).

Issue: SPR-9284
2012-10-12 13:10:07 -07:00
Phillip Webb 60afa5ead4 Polish trailing whitespace 2012-10-12 13:09:53 -07:00
Phillip Webb ea8b1327b4 Merge pull request #136 from philwebb/SPR-9017
* SPR-9017:
  SpEL support for methods and properties on class …
  Remove trailing whitespace
2012-10-12 13:00:56 -07:00
Phillip Webb d28592a6c6 SpEL support for methods and properties on class …
Update the ReflectiveMethodResolver and ReflectivePropertyAccessor
to allow methods and properties of java.lang.Class to be resolved
when the target object is a class.

Issue: SPR-9017
2012-10-12 13:00:56 -07:00
Phillip Webb 98808347ca Remove trailing whitespace 2012-10-12 13:00:55 -07:00
Chris Beams 27c83710b0 Merge pull request #166 from philwebb/SPR-9851
# By Phillip Webb
* SPR-9851:
  Prevent memory leaks with @Configuration beans
2012-10-12 12:56:25 -07:00
Phillip Webb c8061393fb Prevent memory leaks with @Configuration beans
Refactor ConfigurationClassEnhancer to allow cglib caching of
generated classes.  Prior to this commit each enhanced @Configuration
class would consume permgen space when created.

The CallbackFilter and Callback Types are now defined as static final
members so that they can be shared by all enhancers.  Only the
callbackInstances remain specific to a @Configuration class and
these are not used by cglib as part of the cache key.

Issue: SPR-9851
2012-10-12 12:33:42 -07:00
Rossen Stoyanchev 365a42da64 Add file upload test to Spring MVC Test 2012-10-12 09:17:27 -04:00
Rossen Stoyanchev dc01f088f7 Fix issue in message conversion
This change ensures that when the Accept and the Producible media types
are equally specific, we use the one from the Accept header, which may
for example carry a different charset.
2012-10-12 08:49:30 -04:00
Rossen Stoyanchev f7943786de Polish Spring MVC Test code
Remove use of UriTemplate in MockMvcRequestBuilders.
Rely on UriComponentsBuilder instead.

Decode query params before setting them on MockHttpServletRequest.

Add more options to model result matching for the count of errors.

Ignore white spaces and comments when comparing XML.
2012-10-11 22:18:22 -04:00
Phillip Webb 1858ef10ff Tests for DelegatingDataSource Wrappers 2012-10-10 15:49:03 -07:00
Juergen Hoeller 1a6940dd05 Fixed test failure on CI server (classpath search failing for some reason)
Issue: SPR-9797
2012-10-11 00:35:04 +02:00
Juergen Hoeller 15bf31a09e ResourceDatabasePopulator etc 2012-10-11 00:35:03 +02:00
Juergen Hoeller 84b3f7106d Polishing along with 3.1.3 backport
Issue: SPR-9761
Issue: SPR-9762
2012-10-11 00:35:02 +02:00
Phillip Webb 69b380583a Merge pull request #134 from philwebb/SPR-9744
* SPR-9744:
  Improve annotation methods in TypeDescriptor
  Polish code and JavaDoc formatting
2012-10-10 15:17:02 -07:00
Phillip Webb e543ffdfd7 Improve annotation methods in TypeDescriptor
- Use generic typing for getAnnotation()
- Add hasAnnoation() method
- Update existing code and tests to make use of changes

Issue: SPR-9744
2012-10-10 15:16:46 -07:00
Phillip Webb 23f089ff1e Polish code and JavaDoc formatting
- Remove trailing whitespace
- Apply consistent JavaDoc formatting
2012-10-10 15:16:46 -07:00
Juergen Hoeller efd872e35a JPA persistence.xml files may use jar-file entries relative to the unit root (as per the JPA spec)
Issue: SPR-9797
2012-10-10 23:34:24 +02:00
Juergen Hoeller 92a92b7937 Minor changes along with 3.1.3 backport
Issue: SPR-9781
Issue: SPR-9784
2012-10-10 23:34:23 +02:00
Juergen Hoeller 014f7f0242 Changes along with 3.1.3 backport
Aside from minor polishing, this change sets the "systemProperties" and "systemEnvironment" beans at each factory level as well.

Issue: SPR-9756
Issue: SPR-9764
2012-10-10 23:34:22 +02:00
Juergen Hoeller 9eeb6f15e5 Minor changes along with 3.1.3 backport
Issue: SPR-9798
Issue: SPR-9804
2012-10-10 23:34:21 +02:00
Phillip Webb e5cfe8a2c5 Merge pull request #154 from philwebb/SPR-9285
* SPR-9285:
  Chain exception cause on create failure
2012-10-10 14:05:56 -07:00
Phillip Webb 2e48656906 Chain exception cause on create failure
Propogate root cause of exceptions thrown from createCollection
and createMap.

Issue: SPR-9285
2012-10-10 14:03:02 -07:00
Rossen Stoyanchev 2748f2b8eb Remove deprecated methods in spring-test-mvc 2012-10-10 16:10:49 -04:00
Rossen Stoyanchev e7a7f751b6 Prefix REST client test support classes w/ "MockRest"
Add "MockRest-" prefix to RequestMatchers and ResponseCreators to
make it easy to find classes with static imports with
Ctrl+Shift+T "MockRest" - similar to the "MockMvc"
prefix on the server-side.
2012-10-10 15:44:51 -04:00
Rossen Stoyanchev d4fa5c0331 Fix NPE in AbstractMessageConverterMethodProcessor
Issue: SPR-9868
2012-10-10 09:00:43 -04:00
Juergen Hoeller c020096bbd Further changes for 3.2 RC1 2012-10-10 14:28:56 +02:00
Juergen Hoeller d15ca6277a Polishing 2012-10-10 14:28:55 +02:00
Juergen Hoeller fe16334dd4 Hibernate 4 LocalSessionFactoryBuilder sets thread context ClassLoader (for JBoss 7 compatibility)
Issue: SPR-9846
2012-10-10 14:28:54 +02:00
Juergen Hoeller 6445f09c36 Consistently upgraded Apache HttpComponents usage to 4.2
Issue: SPR-9475
2012-10-10 14:28:53 +02:00
Juergen Hoeller 8bdc6be074 Consistent "this." reference to local variable 2012-10-10 14:28:52 +02:00
Juergen Hoeller 9ff640a95d AbstractRoutingDataSource consistently implements JDBC 4.0's Wrapper interface as well
Issue: SPR-9856
2012-10-10 14:28:52 +02:00
Juergen Hoeller 93aa411886 HttpComponentsHttpInvokerRequestExecutor uses HttpComponents 4.2 to explicitly release connections
Issue: SPR-9833
2012-10-10 14:28:51 +02:00
Chris Beams 0c0a563a24 Avoid further 'type mismatch' errors in ExtendedBeanInfo
This change fixes further cases under JDK 6 in which setting a bridged
(e.g. String-returning) read method can conflict with an existing
corresponding bridge write method that accepts an Object parameter.

This appears to be a implementation difference between JDKs 6 and 7,
where the JDK 6 Introspector adds bridge methods and JDK 7 does not.

The solution here is to consistently null-out any existing write method
before setting the read method. We were doing this elsewhere in
ExtendedBeanInfo already, but these two changes make the approach
consistent throuhout.

Issue: SPR-8806
2012-10-09 20:10:50 -07:00
Rossen Stoyanchev 7b4bc08b14 Update context-based tests in spring-test-mvc
Added WebAppResourceTests
Removed unused config file TestContextTests-context.xml
Moved servlet-context.xml in package that matches the test classes
2012-10-08 12:41:09 -04:00
Sam Brannen 9937f840d5 Merge pull request #160 from sbrannen/SPR-5243
Support loading WebApplicationContexts in the TCF
2012-10-07 15:29:18 -07:00
Sam Brannen a73280ccc8 Support loading WebApplicationContexts in the TCF
Prior to this commit, the Spring TestContext Framework only supported
loading an ApplicationContext in integration tests from either XML or
Java Properties files (since Spring 2.5), and Spring 3.1 introduced
support for loading an ApplicationContext in integration tests from
annotated classes (e.g., @Configuration classes). All of the
ContextLoader implementations used to provide this support load a
GenericApplicationContext. However, a GenericApplicationContext is not
suitable for testing a web application since a web application relies on
an implementation of WebApplicationContext (WAC).

This commit makes it possible to integration test Spring-powered web
applications by adding the following functionality to the Spring
TestContext Framework.

 - Introduced AbstractGenericWebContextLoader and two concrete
   subclasses:
   - XmlWebContextLoader
   - AnnotationConfigWebContextLoader

 - Pulled up prepareContext(context, mergedConfig) from
   AbstractGenericContextLoader into AbstractContextLoader to allow it
   to be shared across web and non-web context loaders.

 - Introduced AnnotationConfigContextLoaderUtils and refactored
   AnnotationConfigContextLoader accordingly. These utils are also used
   by AnnotationConfigWebContextLoader.

 - Introduced a new @WebAppConfiguration annotation to denote that the
   ApplicationContext loaded for a test should be a WAC and to configure
   the base resource path for the root directory of a web application.

 - Introduced WebMergedContextConfiguration which extends
   MergedContextConfiguration with support for a baseResourcePath for
   the root directory of a web application.

 - ContextLoaderUtils.buildMergedContextConfiguration() now builds a
   WebMergedContextConfiguration instead of a standard
   MergedContextConfiguration if @WebAppConfiguration is present on the
   test class.

 - Introduced a configureWebResources() method in
   AbstractGenericWebContextLoader that is responsible for creating a
   MockServletContext with a proper ResourceLoader for the
   resourceBasePath configured in the WebMergedContextConfiguration. The
   resulting mock ServletContext is set in the WAC, and the WAC is
   stored as the Root WAC in the ServletContext.

 - Introduced a WebTestExecutionListener that sets up default thread
   local state via RequestContextHolder before each test method by using
   the MockServletContext already present in the WAC and by creating a
   MockHttpServletRequest, MockHttpServletResponse, and
   ServletWebRequest that is set in the RequestContextHolder. WTEL also
   ensures that the MockHttpServletResponse and ServletWebRequest can be
   injected into the test instance (e.g., via @Autowired) and cleans up
   thread locals after each test method.

 - WebTestExecutionListener is configured as a default
   TestExecutionListener before DependencyInjectionTestExecutionListener

 - Extracted AbstractDelegatingSmartContextLoader from
   DelegatingSmartContextLoader and introduced a new
   WebDelegatingSmartContextLoader.

 - ContextLoaderUtils now selects the default delegating ContextLoader
   class name based on the presence of @WebAppConfiguration on the test
   class.

 - Tests in the spring-test-mvc module no longer use a custom
   ContextLoader to load a WebApplicationContext. Instead, they now
   rely on new core functionality provided in this commit.

Issue: SPR-5243
2012-10-08 00:23:19 +02:00
Rossen Stoyanchev 3552173b81 Fix issue in AnnotationMethodHandlerExceptionResolver
Caching of resovled exceptions introduced in SPR-7703 also introduced a
side effect whereby if exactly one exception was previously cached, any
other exception would appear as a match to the previously matched
@ExceptionHandler method.

This change ensures use of a fresh map when determining matching
@ExceptionHandler methods while also updating the cache.

Issue: SPR-9209
2012-10-06 21:58:34 -04:00
Rossen Stoyanchev 3eda02d1b4 Update MediaType's includes method
An additional update (after the last commit) of the "includes" and
"isCompatibleWith" methods of MediaType to accomodate wildcards
in media types with a suffix.

Issue: SPR-9841
2012-10-06 10:56:32 -04:00
Rossen Stoyanchev 7718936158 Recognize wildcards in media types with a suffix
The "includes" and "isCompatibleWith" methods of MediaType take into
account media types with suffices (e.g. application/soap+xml) including
wildcards with suffices (e.g. application/*+xml). However before this
change, the isWildcardSubtype() method returned true only for subtype
"*". Now a media type such as application/*+xml is also recognized as
having a wildcard subtype.

Issue: SPR-9841
2012-10-06 10:01:56 -04:00
Rob Winch 2638dd5a05 merge-dist.gradle disables artifactoryPublish
Previously the project that was getting merged from would try to
execute the artifactoryPublish on the build box. This caused issues
since the mavenDescriptor did not exist.

The merge-dist.gradle now disables the artifactoryPublish task if it
exists (it will only exist on the build box).

Issue: SPR-9859, SPR-7951
2012-10-05 11:40:42 -05:00
Rob Winch 22bcb54ab6 Add Spring MVC Test framework
This commit adds the spring-test-mvc project [1] to the Spring
Framework as part of the spring-test module.

The sources are added as a root-level project called "spring-test-mvc"
instead of under "spring-test" because the new sources need to be
compiled with Servlet 3 while the current "spring-test" sources require
Servlet 2.5 and the Eclipse IDE does not support having different
classpaths for the same project.

The Gradle build produces a single spring-test jar that contains
sources from both "spring-test" and "spring-test-mvc". This merge is
made possible through merge-dist.gradle as follows:

- jar tasks of the "from" project execute tasks of the "to" project
- "to" project is added to the classpath of the "from" project
- "to" project pom is updated with entries from the "from" project

For further details see documentation in merge-dist.gradle.

Special thanks to everyone who contributed to the initial development
of the Spring MVC Test framework:

 Arjen Poutsma <poutsma@mac.com>
 Craig Walls <cwalls@vmware.com>
 Frans Flippo <fransflippo@utopia.orange11.nl>
 Harry Lascelles <harry@firstbanco.com>
 Irfan <mail.urfi@gmail.com>
 Jörg Rathlev <joerg.rathlev@s24.com>
 Keesun Baik <whiteship2000@gmail.com>
 Keesun Baik <whiteship@epril.com>
 Matthew Reid <matthew.reid@nakedwines.com>
 Nils-Helge Garli Hegvik <Nils-Helge.Hegvik@telenor.com>
 Rob Winch <rwinch@vmware.com>
 Scott Frederick <sfrederick@vmware.com>
 Sven Filatov <sven.filatov@gmail.com>
 Thomas Bruyelle <thomas.bruyelle@gmail.com>
 youngm <youngm@gmail.com>

[1]: https://github.com/SpringSource/spring-test-mvc

Issue: SPR-9859, SPR-7951
2012-10-05 12:02:25 -04:00
Sam Brannen 4812c181d4 Polish LiveBeansView Javadoc and suppress warnings 2012-10-04 14:10:52 +02:00
Rossen Stoyanchev 7513e2124a Sync up MockHttpServletResponse copies in test sources 2012-10-02 15:57:22 -04:00
Rossen Stoyanchev 5c13739afa Add mock implementations of Http[Input|Output]Message 2012-09-27 17:07:14 -04:00
Rossen Stoyanchev 4566db82f5 Polish MockFilterChain
A reset method now allows it to be invoked more than once each time
storing the request and response with which it was invoked.
2012-09-27 12:06:35 -04:00
Juergen Hoeller 49294c9d00 ClassUtils.getMostSpecificMethod uses Class.getMethod code path in case of a public method
This should be significantly faster than our standard algorithm, for a very common case. Motivated by SPR-9802, even if the fix there uses a different approach, with transaction name determination not calling getMostSpecificMethod at all anymore.

Issue: SPR-9802
2012-09-26 20:03:30 +02:00
Juergen Hoeller 89b365120a TransactionInterceptor avoids reflective method search for method identification
As of Spring 3.0.4, we were trying to expose the target method signature as transaction name. Unfortunately, the algorithm called the ClassUtils.getMostSpecificMethod helper method which performs a quite expensive reflective search. As of this commit, we're simply concatenating the target class name with the method name, accepting the use of the concrete target class (which is arguably more meaningful for monitoring anyway) even when the method implementation actually sits on a base class.

Issue: SPR-9802
2012-09-26 19:30:42 +02:00
Juergen Hoeller abf341c33a ResourceBundleMessageSource supports "defaultEncoding", "fallbackToSystemLocale", "cacheSeconds"
These features require Java 6 or higher due to their dependency on the ResourceBundle.Control class. To some degree, ResourceBundleMessageSource catches up with ReloadableResourceBundleMessageSource now. However, as noted in the javadoc, there are still severe limitations in the standard ResourceBundle class that justify an ongoing investment in our own ReloadableResourceBundleMessageSource (based on the Spring resource abstraction, with manual parsing of properties files).

Issue: SPR-7392
2012-09-26 16:55:14 +02:00
Juergen Hoeller 3c557bfbc3 LiveBeansView produces a well-defined (and valid) JSON document now
Issue: SPR-9662
2012-09-26 16:55:13 +02:00
Rossen Stoyanchev 7b30ffd522 Work around Servlet dependency in content negotiation
Before this change the PathExtensionContentNegotiationStrategy accessed
the ServletContext via request.getServletContext, which is Servlet 3
specific. To work around it, there is now a Servlet-specific sub-class
that accepts a ServletContext as a constructor argument.

The ContentNegotiationManagerFactoryBean is now ServletContextAware and
if it has a ServletContext it creates the Servlet-specific sub-class
of PathExtensionContentNegotiationStrategy.

The ContentNegotiationManagerFactoryBean is now also used in several
places internally -- MVC namespace, MVC Java config, and the
ContentNegotiatingViewResolver -- to reduce duplication.

Issue: SPR-9826
2012-09-26 09:28:43 -04:00
Rossen Stoyanchev 2bb0104556 Polish ObjectToStringHttpMessageConverter
Issue: SPR-9738
2012-09-25 19:32:26 -04:00
Rossen Stoyanchev 8a082e6e3b Merge pull request #148 from poutsma/SPR-9798
* poutsma-SPR-9798:
  Support opaque URIs in UriComponentsBuilder
2012-09-25 10:20:10 -04:00
Arjen Poutsma 6e45a79ecb Support opaque URIs in UriComponentsBuilder
Before this commit, UriComponentsBuilder did not handle opaque URIs at
all. After this commit it does.

Support is introduced by making UriComponents an abstract base class,
and having two concrete subclasses: HierarchicalUriComponents and
OpaqueUriComponents. The former is more or less the same as the old
UriComponents class.

Issue: SPR-9798
2012-09-25 10:18:49 -04:00
Dmitry Katsubo b2037c8316 Add ObjectToStringHttpMessageConverter
This new converter uses StringHttpMessageConverter internally combined
with a ConversionService for converting String content to and from the
target object type.

Issue: SPR-9738
2012-09-25 09:02:27 -04:00
Juergen Hoeller 0d88c73523 Calling cancel on a Future returned by a TaskScheduler works reliably now
Issue: SPR-9821
2012-09-25 13:53:07 +02:00
Juergen Hoeller 7fc16298e6 Fixed potential race condition in concurrent calling of autowired methods on a prototype bean
Autowired methods might have been skipped on subsequent creation of further bean instances due to the 'skip' flag set to false outside of the synchronized block, with another thread entering the block and setting the flag to true in the meantime.

Issue: SPR-9806
2012-09-25 12:49:38 +02:00
Juergen Hoeller e0bec678da Calling cancel on a Future returned by a TaskScheduler works reliably now
Issue: SPR-9821
2012-09-25 12:06:43 +02:00
Rossen Stoyanchev ef9d35c473 Add PATCH to "Allow" header for OPTIONS requests 2012-09-24 19:57:04 -04:00
Rossen Stoyanchev ce0ae84d95 Merge pull request #82 from rcrathore/master
* pull82-rcrathore-master:
  Add URI and method name on ResourceAccess
2012-09-24 19:38:09 -04:00
Ritesh Rathore 0baa1a56c2 Add URI and method name on ResourceAccess
Issue: SPR-9325
2012-09-24 19:36:45 -04:00
Rossen Stoyanchev e54fb60180 Merge pull request #129 from dmak/SPR-9739
* pull129-dmak-SPR-9739-jackson2-mapper:
  Add Jackson2ObjectMapperBeanFactory
2012-09-24 19:23:49 -04:00
Dmitry Katsubo 950786a8cc Add Jackson2ObjectMapperBeanFactory
Issue: SPR-9739
2012-09-24 19:22:33 -04:00
Juergen Hoeller 76e28cb08b Initial changelog for 3.2 RC1 2012-09-24 23:16:49 +02:00
Juergen Hoeller e5f3669804 Introduced beta version of LiveBeansView for STS 3.1
LiveBeansView includes MBean exposure as well as Servlet exposure, with JSON as the initial output format. In order to identify an MBean per application, a new "getApplicationName()" method got introduced on the ApplicationContext interface, returning the Servlet container context path in case of a web application and defaulting to the empty String. MBean exposure can be driven by the "spring.liveBeansView.mbeanDomain" property, e.g. specifying "liveBeansView" as its value, leading to "liveBeansView:application=" or "liveBeansView:application=/myapp" style names for the per-application MBean.

Issue: SPR-9662
2012-09-24 23:15:58 +02:00
Juergen Hoeller 53ae345a88 Moved JacksonObjectMapperFactoryBean from web.context.support to http.converter.json
Issue: SPR-9125
2012-09-24 11:39:09 +02:00
Juergen Hoeller dc4e0683ae ImportAwareBeanPostProcessor registered with ROLE_INFRASTRUCTURE 2012-09-24 11:26:47 +02:00
Juergen Hoeller aa4d9c48ab CookieGenerator supports "cookieHttpOnly" flag for Servlet 3.0
Issue: SPR-9794
2012-09-23 19:50:04 +02:00
Rossen Stoyanchev e26da7c2ab Merge pull request #150 from philwebb/SPR-9815
* philwebb-SPR-9815:
  Protect RequestCondition against unkown HTTP methods
  Polish trailing whitespace
2012-09-21 11:10:05 -04:00
Phillip Webb c0729756d7 Protect RequestCondition against unkown HTTP methods
The RequestMethodsRequestCondition is now protected against HTTP
request method values not present in the RequestMethod enumeration
(e.g. PROPFIND).

Issue: SPR-9815
2012-09-21 11:05:45 -04:00
Phillip Webb b0153ada19 Polish trailing whitespace 2012-09-21 10:55:17 -04:00
Rossen Stoyanchev d1d9e118b7 Merge pull request #151 from philwebb/SPR-9814
Delete CopyOfRequestMappingHandlerMapping class
2012-09-21 07:52:48 -07:00
Phillip Webb 4767f44671 Delete CopyOfRequestMappingHandlerMapping class
Previously committed in error.

Issue: SPR-9814
2012-09-20 17:25:00 -07:00
Rossen Stoyanchev 57c36dd395 Add interceptors for async processing
This change introduces two new interceptors with callback methods
for concurrent request handling. These interfaces are
CallableProcessingInterceptor and DeferredResultProcessingInterceptor.

Unlike a HandlerInterceptor, and its AsyncHandlerInterceptor sub-type,
which intercepts the invocation of a handler in he main request
processing thread, the two new interfaces are aimed at intercepting the
asynchronous execution of a Callable or a DeferredResult.

This allows for the registration of thread initialization logic in the
case of Callable executed with an AsyncTaskExecutor, or for centralized
tracking of the completion and/or expiration of a DeferredResult.
2012-09-19 09:25:50 -04:00
Chris Beams 30bce7fa16 Add CONTRIBUTING.md
Copied from the Contributor Guidelines wiki document [1] in order to
take advantage of GitHub's new integrated support for displaying a link
to contributor guidelines when issuing a pull request [2].

The wiki document has been updated to link to this document.

[1]: https://github.com/SpringSource/spring-framework/wiki/Contributor-guidelines
[2]: https://github.com/blog/1184-contributing-guidelines
2012-09-18 13:28:00 +01:00
Rossen Stoyanchev 97f97c4e9f Polish async support
Added handler argument to the signature of
AsyncHandlerInterceptor.afterConcurrentHandlingStarted(..).

Renamed AsyncWebUtils to WebAsyncUtils.
2012-09-17 14:58:56 -04:00
Chris Beams ccd7b10237 Merge pull request #147 from poutsma/SPR-9768
# By Arjen Poutsma
* SPR-9768:
  Preserve comments when using JibxMarshaller
2012-09-17 14:11:22 +01:00
Arjen Poutsma f191a55b8f Preserve comments when using JibxMarshaller
Prior to this commit, JibxMarshaller used a SAX ContentHandler to
marshal to StAX XMLEventWriters, which inadvertently resulted in the
deletion of XML comments.

After this commit, JibxMarshaller adapts the XMLEventWriter into an
XMLStreamWriter and comments are preserved.

Issue: SPR-9768
2012-09-17 14:07:02 +01:00
Chris Beams 17c6515c0a Increment version to 3.2.0.BUILD-SNAPSHOT 2012-09-12 04:08:39 +02:00
Spring Buildmaster 323ac6ad01 Release version 3.2.0.M2 2012-09-11 18:41:07 -07:00
Chris Beams c4aa14f343 Ignore SpringRunnerContextCacheTests
Avoid order-dependent test method failures on JDK7

Issue: SPR-9789
2012-09-11 23:54:35 +02:00
Chris Beams 6c8f795122 Add Created-By attribute to jar manifests
This commit ensures that the 'Created-By:' attribute [1] is added to
each jar's META-INF/MANIFEST.MF in order to identify clearly the vendor
and version of Java used during the build process.

[1]: http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html
2012-09-11 22:20:20 +02:00
Chris Beams 0af04910f9 Update STS version used to test Eclipse setup script 2012-09-11 17:32:30 +02:00
Chris Beams 3bebb23f64 Update changelog 2012-09-11 16:56:49 +02:00
Phillip Webb 73832f8c6e Support inferred base package for @ComponentScan
Prior to this change, @ComponentScan required the declaration of
exactly one of the #value, #basePackage or #basePackageClasses
attributes in order to determine which package(s) to scan.

This commit introduces support for base package inference, relaxing the
above requirement and falling back to scanning the package in which the
@ComponentScan-annotated class is declared.

Issue: SPR-9586
2012-09-11 16:50:01 +02:00
Chris Beams 512ffbb273 Update PortletRequestUtilsTests float test timeout
Float parameter handling appears to be marginally more expensive under
JDK7, with the testGetFloatParameterWithDefaultValueHandlingIsFastEnough
test clocking in anywhere from 250 to 315 ms. This violates the current
test threshold of 250 ms, so this commit ups the timeout value to 350 ms
with the assumption that this is indeed a marginal and therefore overall
negligible performance degradation.
2012-09-11 16:00:18 +02:00
Chris Beams ec2df7d229 Merge pull request #143 from olivergierke/SPR-9781
# By Oliver Gierke
* SPR-9781:
  Work around JDK7 String#substring performance regression
2012-09-11 15:06:48 +02:00
Oliver Gierke 3fb3b7d67a Work around JDK7 String#substring performance regression
String#substring has become significantly slower as of JDK 1.7.0_06 [1],
such that there are performance degradations by a factor of 100-1000 in
ResourceDatabasePopulator, especially for large SQL files.

This commit works around this problem by minimizing the substring scope
to the least amount possible to prevent unnecessary internal copying of
strings (which seems to cause the issue).

[1]: http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-May/010257.html

Issue: SPR-9781
2012-09-11 15:06:40 +02:00
Chris Beams dfe05305e2 Upgrade to JUnit 4.11 snapshot in support of JDK7
Class#getDeclaredMembers returns arbitrary results under JDK7. This
results in non-deterministic execution of JUnit test methods, often
revealing unintended dependencies between methods that rely on a
specific order to succeed.

JUnit 4.11 contains support for predictable test ordering [1], but at
the time of this commit, JUnit 4.11 has not yet been released.
Therefore we are testing against a snapshot version [2], which has been
uploaded to repo.springsource.org [3] for easy access. Note that this
artifact may be removed when JUnit 4.11 goes GA.

 - Care has been taken to ensure that spring-test's compile-time
   dependency on JUnit remains at 4.10. This means that the spring-test
   pom.xml will continue to have an optional <dependency> on JUnit
   4.10, instead of the 4.11 snapshot.

 - For reasons not fully understood, the upgrade to the 4.11 snapshot
   of junit-dep caused NoSuchMethodErrors around certain Hamcrest
   types, particularly CoreMatchers and Matchers. import statements
   have been updated accordingly throughout affected test cases.

 - Runtime errors also occurred around uses of JUnit @Rule and
   ExpectedException. These have been reverted to use simpler
   mechanisms like @Test(expected) in the meantime.

 - Some test methods with order-based dependencies on one another have
   been renamed in order to fall in line with JUnit 4.11's new method
   ordering (as opposed to actually fixing the inter-test
   dependencies). In other areas, the fix was as simple as adding a
   tearDown method and cleaning up state.

 - For no apparent reason, the timeout in AspectJAutoProxyCreatorTests'
   testAspectsAndAdvisorNotAppliedToPrototypeIsFastEnough method begins
   to be exceeded. Prior to this commit the timeout value was 3000 ms;
   on the CI server under Linux/JDK6 and JDK7, the test begins taking
   anywhere from 3500-5500 ms with this commit. It is presumed that
   this is an incidental artifact of the upgrade to JUnit 4.11. In any
   case, there are no changes to src/main in this commit, so this
   should not actually represent a performance risk for Spring
   Framework users. The timeout has been increased to 6000 ms to
   accommodate this situation.

[1]: https://github.com/KentBeck/junit/pull/293
[2]: https://github.com/downloads/KentBeck/junit/junit-dep-4.11-SNAPSHOT-20120805-1225.jar
[3]: https://repo.springsource.org/simple/ext-release-local/junit/junit-dep/4.11.20120805.1225

Issue: SPR-9783
2012-09-11 15:04:56 +02:00
Phillip Webb a9a90cabad Protect against non-deterministic method order in JDK7
- Allow reset of GlobalAdvisorAdapterRegistry

   Provide a reset() method allowing the GlobalAdvisorAdapterRegistry
   instance to be replaced with a fresh instance. This method has
   primarily been added to allow unit tests to leave the registry
   in a known state.

 - Protect against the fact that calls to configuration class methods
   my occur in a random order.

Issue: SPR-9779
2012-09-11 15:04:55 +02:00
Phillip Webb 8e7622bb8a Fix Windows-related build issues
- Increase max heap size in gradle wrapper.
- Use MockProperties implementation to protect against security
  exceptions.
- Replace windows CRLF with LF in various tests.
- Increase Thread.sleep times to account for lack of precision on
  Windows.

Issue: SPR-9717
2012-09-11 15:04:55 +02:00
Chris Beams 94bb036269 Polish PortletRequestUtilsTests
Update PortletRequestUtilsTests to use Assert#assertThat and Hamcrest's
Matchers#lessThan in order to output more useful messages when tests
fail.
2012-09-11 15:04:55 +02:00
Rossen Stoyanchev 2ff3d53962 Ignore parse errors in HttpPutFormContentFilter
Errors when parsing the request content-type, in order to find out if
the request has form content, are translated to false.

Issue: SPR-9769
2012-09-10 20:06:10 -04:00
Rossen Stoyanchev 48b963aaa5 Add error request attribute for 500 reponses
DefaultHandlerExceptionResolver and ResponseEntityExceptionHandler now
both set the "javax.servlet.error.exception" request attribute to the
raised exception, allowing custom error pages configured via web.xml.

Issue: SPR-9653
2012-09-10 18:26:43 -04:00
Juergen Hoeller 787d8f5916 SpringFactoriesLoader as the simplest possible mechanism for BeanInfoFactory loading 2012-09-10 23:16:21 +02:00
Juergen Hoeller 0a42c80c11 @Import'ed configuration classes get properly registered in case of same class name (second try)
Issue: SPR-9243
2012-09-10 23:16:20 +02:00
Rossen Stoyanchev 34c3e821dd Cache AntPathStringMatcher instances
AntPathMatcher now caches AntPathStringMatcher instances by pattern
thus avoiding java.util.regex.Pattern recompilation.

Issue: SPR-9749
2012-09-10 16:57:10 -04:00
Rossen Stoyanchev 0a877afa06 Optimize use of HandlerMethod and sub-classes
While HandlerMethod instances are cached for lookup purposes, a new
ServletInvocableHandlerMethod instance has to be created prior to each
invocation since handlers may have non-singleton scope semantics.

This change reduces the overhead of creating per request instances
by using a logger with a fixed name rather than relying on getClass()
and also by copying introspected method parameters from the cached
HandlerMethod instance.

Issue: SPR-9747, SPR-9748
2012-09-10 14:01:01 -04:00
Juergen Hoeller 228a77552d @Import'ed configuration classes get properly registered in case of same class name
Issue: SPR-9243
2012-09-10 15:44:12 +02:00
Juergen Hoeller 430db261e7 BeanFactoryAnnotationUtils throws NoSuchBeanDefinitionExceptions instead of IllegalStateExceptions
Issue: SPR-9652
2012-09-10 15:26:43 +02:00
Juergen Hoeller 7d8843d069 Expression detection properly handles cached String literals
Issue: SPR-9670
2012-09-10 15:14:14 +02:00
Juergen Hoeller f29b791c85 MutablePropertySources log statements guarded by isDebugEnabled
Issue: SPR-9670
2012-09-10 15:14:13 +02:00
Juergen Hoeller a90f25668b Spring-backed DataSources consistently implement JDBC 4.0's Wrapper interface
Issue: SPR-9770
2012-09-10 15:14:12 +02:00
Juergen Hoeller f32e4077fa same-named unit from persistence.xml overrides in case of conflict with default unit
Issue: SPR-9741
2012-09-10 15:14:11 +02:00
Juergen Hoeller 10a4e88e0a polishing 2012-09-10 15:14:10 +02:00
Juergen Hoeller 282d961b2e @Import'ed configuration classes get properly registered in case of same class name
Issue: SPR-9243
2012-09-10 15:14:10 +02:00
Juergen Hoeller 8f12d98a99 LinkedCaseInsensitiveMap checks for uniqueness of case-insensitive keys now
Issue: SPR-9754
2012-09-10 15:14:09 +02:00
Arjen Poutsma 82739dd4ac Refactor BeanInfoFactory
This commit refactors the BeanInfoFactory so that:

 - supports() and getBeanInfo() are folded into one, so that getBeanInfo()
    returns null if a given class is not supported.
 - CachedIntrospectionResults now uses SpringFactoriesLoader
2012-09-10 14:28:53 +02:00
Arjen Poutsma aeff91c1da Moved SpringFactoriesLoader to io.support in order to resolve tangle. 2012-09-10 11:28:45 +02:00
Sam Brannen fc859ffd6e Update Javadoc in ExtendedBeanInfo
- updated the link to the "indexed properties" section of the JavaBeans
   tutorial
2012-09-09 21:57:51 +02:00
Sam Brannen 3925f6a428 Polish Javadoc for ExtendedBeanInfoFactory 2012-09-09 21:47:02 +02:00
Chris Beams 5bcf68e25a Use ExtendedBeanInfo on an as-needed basis only
Prior to this change, CachedIntrospectionResults delegated to
ExtendedBeanInfo by default in order to inspect JavaBean
PropertyDescriptor information for bean classes.

Originally introduced with SPR-8079, ExtendedBeanInfo was designed to
go beyond the capabilities of the default JavaBeans Introspector in
order to support non-void returning setter methods, principally to
support use of builder-style APIs within Spring XML. This is a complex
affair, and the non-trivial logic in ExtendedBeanInfo has led to various
bugs including regressions for bean classes that do not declare
non-void returning setters.

This commit takes advantage of the new BeanInfoFactory mechanism
introduced in SPR-9677 to take ExtendedBeanInfo out of the default code
path for CachedIntrospectionResults. Now, the new
ExtendedBeanInfoFactory class will be detected and instantiated (per its
entry in the META-INF/spring.beanInfoFactories properties file shipped
with the spring-beans jar). ExtendedBeanInfoFactory#supports is invoked
for all bean classes in order to determine whether they are candidates
for ExtendedBeanInfo introspection, i.e. whether they declare non-void
returning setter methods.

If a class does not declare any such non-standard setter methods (the
99% case), then CachedIntrospectionResults will fall back to the
default JavaBeans Introspector. While efforts have been made to fix any
bugs with ExtendedBeanInfo, this change means that EBI will not pose
any future risk for bean classes that do not declare non-standard
setter methods, and also means greater efficiency in general.

Issue: SPR-9723, SPR-9677, SPR-8079
2012-09-09 16:45:28 +02:00
Chris Beams b50bb5071a Address various ExtendedBeanInfo bugs
- Ensure that ExtendedBeanInfoTests succeeds when building under JDK 7

 - Improve handling of read and write method registration where
   generic interfaces are involved, per SPR-9453

 - Add repro test for SPR-9702, in which EBI fails to register
   an indexed read method under certain circumstances

Issue: SPR-9702, SPR-9414, SPR-9453
2012-09-09 16:44:54 +02:00
Sam Brannen c795c1b362 Polishing 2012-09-08 18:16:33 +02:00
Rossen Stoyanchev 70b0b97b54 Fix cyclical package dependency 2012-09-07 22:14:49 -04:00
Rossen Stoyanchev 6e85dd8917 Polish async request processing
This change fixes a cyclical package dependency.

The change also improves the implementation of
WebAsyncManager.hasConcurrentResult() following the resolution of
Apache issue id=53632 and the release of Apache Tomcat 7.0.30 that
contains the fix.
2012-09-07 21:30:11 -04:00
Arjen Poutsma 988f376752 Added SpringFactoriesLoader 2012-09-07 17:00:22 +02:00
Phillip Webb 77c9321967 Sort candidate @AspectJ methods deterministically
Update the ReflectiveAspectJAdvisorFactory class to sort candidate
AOP methods based on their annotation first and method name second.

Prior to this the order of aspects created from annotated methods
could differ depending on the underling JVM, as first noticed under
JDK7 in SPR-9729.

 - ConvertingComparator and InstanceComparator have been introduced in
   support of this change, per SPR-9730.

 - A shared static INSTANCE field has been added to ComparableComparator
   to avoid unnecessary instantiation costs within ConvertingComparator
   as well as to prevent generics warnings during certain caller
   scenarios.

Issue: SPR-9729, SPR-9730
2012-09-06 16:06:16 +02:00
Phillip Webb 719a9e120d Refactor ComparatorTests into separate classes 2012-09-06 16:06:16 +02:00
Phillip Webb 9821868707 Refactor and polish various Comparator impls
- Refactor CompoundComparator constructor to use varargs
 - Refactor MediaType to consume new varargs constructor
 - Add notNull assertions where appropriate
 - Add generic typing where appropriate
 - Suppress generics warnings elsewhere
 - Fix whitespace errors
2012-09-06 16:06:16 +02:00
Arjen Poutsma bd018fc9d7 Optional @XmlRootElement check in Jaxb2Marshaller
Before this commit, the Jaxb2Marshaller required all supported classes
to be annotated with @XmlRootElement. This commit adds a property
'checkForXmlRootElement' (default is true) which allows for un-annotated
classes.

This is especially useful for JAXB2 implementations that can use
external binding files, such as EclipseLink MOXy.

Issue: SPR-9757
2012-09-06 13:12:03 +02:00
Chris Beams 6517517ca9 Refactor to lazy Environment creation where possible
This commit avoids eager creation of Environment instances, favoring
delegation of already existing Environment objects where possible. For
example, FrameworkServlet creates an ApplicationContext; both require
a StandardServletEnvironment instance, and prior to this change, two
instances were created where one would suffice - indeed these two
instances may reasonably be expected to be the same. Now, the
FrameworkServlet defers creation of its Environment, allowing users to
supply a custom instance via its #setEnvironment method (e.g. within a
WebApplicationInitializer); the FrameworkServlet then takes care to
delegate that instance to the ApplicationContext created
in #createWebApplicationContext.

This behavior produces more consistent behavior with regard to
delegation of the environment, saves unnecessary cycles by avoiding
needless instantiation and calls to methods like
StandardServletEnvironment#initPropertySources and leads to better
logging output, as the user sees only one Environment created and
initialized when working with the FrameworkServlet/DispatcherServlet.

This commit also mirrors these changes across the corresponding
Portlet* classes.

Issue: SPR-9763
2012-09-05 22:33:55 +02:00
Chris Beams 9f8d219146 Remove default profile during environment merge
This change fixes a minor bug with the implementation of
ConfigurableEnvironment#merge, introduced in SPR-9444. During a merge
of two environments A and B, where A has default profiles [prod] and B
has default profiles [default] (the so-called 'reserved default
profile'), B would complete the merge process having a collection of
profiles reading [default, prod], which is incorrect.

This commit explicitly ensure's that B's reserved default profile is
removed if A has a set of default profiles greater than zero. If A
consists only of [default], B will inherit it during the merge
correctly; if A consists of [p1, p2], B will result in [p1, p2] as
well; if B consists of [p1] and A of [p2, p3], B will result in
[p1, p2, p3] post-merge.

Issue: SPR-9761, SPR-9444
2012-09-05 22:33:14 +02:00
Chris Beams f963d0f190 Register environment in all bean factories in a hierarchy
Prior to this change, AbstractApplicationContext#prepareBeanFactory
registered a bean named 'environment' once and only once within a given
ApplicationContext hierarchy. This worked fine with the expectation
that the Environment object is always delegated downward to children of
that hierarchy. However, with SPR-9444 and the introduction of
ConfigurableEnvironment#merge, this expectation was violated; each
member of an application context hierarchy now maintains its own
distinct Environment instance, which means that by extension that each
application context's underlying BeanFactory should have its own
'environment' bean pointing to that context's environment instance.

This problem could manifest in getting the wrong environment instance
when calling #getBean(Environment) or when @Autowiring an Environment
instance, for example into a @Configuration class. As reported in
SPR-9756, this could result in false negative property lookups or
incorrect results when checking whether a profile is active.

This commit ensures that every bean factory in an application
hierarchy has an 'environment' bean referring to the object returned
from the enclosing ApplicationContext#getEnvironment method.

Issue: SPR-9756, SPR-9444
2012-09-05 22:22:05 +02:00
Rob Winch c92a06f003 Support Filters/Servlet invocation in MockFilterChain
This commit adds the ability to allow the MockFilterChain to invoke
a List of Filter's and/or a Servlet.

Issue: SPR-9745
2012-09-05 01:30:46 -04:00
Juergen Hoeller 6bce098310 refined TypeConverterDelegate's ConversionService exception handling
Issue: SPR-9498
2012-09-05 00:59:46 +02:00
Juergen Hoeller 15e384dfd3 updated changelog 2012-09-04 22:40:00 +02:00
Juergen Hoeller e904589bd1 added Field context variant to TypeConverter interface in beans module; @Value injection works in combination with formatting rules such as @DateTimeFormat
Issue: SPR-9637
2012-09-04 22:36:12 +02:00
Juergen Hoeller 780a259c70 re-added JDBC 4.1 getParentLogger method 2012-09-04 22:10:00 +02:00
Juergen Hoeller 931ea5cdf4 polishing 2012-09-04 18:05:11 +02:00
jhoeller db4cc9562f Merge pull request #94 from dsyer/SPR-9498
SPR-9498: relax logic detecting successful property editor after conversion exception
2012-09-04 08:54:01 -07:00
Juergen Hoeller 50df4d08c2 adapted to deprecation backport in 3.1.3
Issue: SPR-9664
2012-08-31 16:52:28 +02:00
Juergen Hoeller 1bd775f828 @Autowired-driven ObjectFactory/Provider resolution works in non-singleton beans as well
Issue: SPR-9181
2012-08-31 15:59:09 +02:00
Juergen Hoeller 68c5f20bc7 aligned with recent changes in CommonAnnotationBeanPostProcessor
Issue: SPR-9176
Issue: SPR-9627
2012-08-31 11:52:24 +02:00
Juergen Hoeller 04af54ad4c @Resource processing properly works with scoped beans and prototypes again
Issue: SPR-9627
2012-08-31 11:49:52 +02:00
Juergen Hoeller cec30a7a2d MessageSourceSupport uses locale-specific MessageFormat cache for default messages
Issue: SPR-9607
2012-08-30 16:30:18 +02:00
Juergen Hoeller 95adf1dbee fixed Portlet request mapping priorities in cross-controller case
Issue: SPR-9303
Issue: SPR-9605
2012-08-29 22:02:45 +02:00
Juergen Hoeller 049b944434 polishing (at the occasion of a backport) 2012-08-29 22:00:27 +02:00
Juergen Hoeller 30de87a51e StaxEventContentHandler uses static inner class for Location adapter, in order to avoid leaks when caching events
Issue: SPR-9305
2012-08-29 22:00:26 +02:00
Juergen Hoeller 7ff30d0043 Sybase lock wait timeout error code missing
Issue: SPR-9681
2012-08-29 22:00:25 +02:00
Juergen Hoeller 769753dac4 ResourceUtils.useCachesIfNecessary() not correct handle JNLP connections
Issue: SPR-9547
2012-08-29 22:00:25 +02:00
Juergen Hoeller bd7a6f658a Typo in ApplicationContextAware and BeanNameAware section
Issue: SPR-9609
2012-08-29 22:00:24 +02:00
Rossen Stoyanchev cb564b287f Provide support for filter registrations
The AbstractDispatcherServletInitializer now provides support for
the registration of filters to be mapped to the DispatcherServlet.
It also sets the asyncSupported flag by default on the
DispatcherServlet and all registered filters.

Issue: SPR-9696
2012-08-28 22:29:23 -04:00
Rossen Stoyanchev a49851d5eb Add equals/hashcode to ResponseEntity
Issue: SPR-9714
2012-08-28 17:24:31 -04:00
Rossen Stoyanchev 473de081b8 Improve no-match handling for @RequestMapping methods
Issue: SPR-9603
2012-08-28 15:56:02 -04:00
Rossen Stoyanchev 2201dd8c45 Add support for matrix variables
A new @MatrixVariable annotation allows injecting matrix variables
into @RequestMapping methods. The matrix variables may appear in any
path segment and should be wrapped in a URI template for request
mapping purposes to ensure request matching is not affected by the
order or the presence/absence of such variables. The @MatrixVariable
annotation has an optional "pathVar" attribute that can be used to
refer to the URI template where a matrix variable is located.

Previously, ";" (semicolon) delimited content was removed from the
path used for request mapping purposes. To preserve backwards
compatibility that continues to be the case (except for the MVC
namespace and Java config) and may be changed by setting the
"removeSemicolonContent" property of RequestMappingHandlerMapping to
"false". Applications using the  MVC namespace and Java config do not
need to do anything further to extract and use matrix variables.

Issue: SPR-5499, SPR-7818
2012-08-28 13:21:12 -04:00
Rossen Stoyanchev da05b094f5 Polish standard Spring MVC exception handling
Rename ExceptionHandlerSupport to ResponseEntityExceptionHandler and
emphasize the contrast to DefaultHandlerExceptionResovler -- i.e.
one returns a ResponseEntity and relies on message converters while
the other returns a ModelAndView and relies on view resolution.

Issue: SPR-9290
2012-08-27 14:06:06 -04:00
Arjen Poutsma 0a6b1167a7 Improved Javadoc 2012-08-27 15:04:11 +02:00
Arjen Poutsma d37e7878e6 Improved Javadoc 2012-08-27 12:40:08 +02:00
Sam Brannen 3794f995ba Avoid and/or suppress warnings in spring-test 2012-08-25 15:34:26 +02:00
Arjen Poutsma 5ce20fdd73 Improved Javadoc 2012-08-24 16:26:20 +02:00
Chris Beams 29613f1c21 Merge pull request #120 from poutsma/SPR-9677
* SPR-9677:
  Introduce strategy for BeanInfo creation
2012-08-24 11:31:00 +02:00
Arjen Poutsma ca017a4880 Introduce strategy for BeanInfo creation
Before this commit, the CachedIntrospectionResults was hard-coded to
create ExtendedBeanInfos for bean classes. The ExtendedBeanInfo support
the JavaBeans property contract only.

This commit introduces the BeanInfoFactory, a strategy for creating
BeanInfos. Through this strategy, it is possible to support
beans that do not necessarily implement the JavaBeans contract (i.e.
have a different getter or setter style).

BeanInfoFactories are are instantiated by the
CachedIntrospectionResults, which looks for
'META-INF/spring.beanInfoFactories' files on the class path. These files
contain one or more BeanInfoFactory class names. When a BeanInfo is to
be created, the CachedIntrospectionResults will iterate through the
factories, asking it to create a BeanInfo for the given bean class. If
none of the factories support it, an ExtendedBeanInfo is created as a
default.

This commit also contains a change to Property, allowing BeanWrapperImpl
to specify the property name at construction time (as opposed to using
Property#resolveName(), which supports the JavaBeans contract only).

Issue: SPR-9677
2012-08-24 10:23:16 +02:00
Rossen Stoyanchev b95550489b Add "New in Spring 3.2" section to reference docs 2012-08-23 13:31:32 -04:00
Rossen Stoyanchev c9b7b132fb Support generic types in @RequestBody arguments
This change makes it possible to declare an @RequestBody argument with
a generic type (e.g. List<Foo>). If a GenericHttpMessageConverter
implementation supports the method argument, then the request will be
converted to the apropiate target type.

The new GenericHttpMessageConverter is implemented by the
MappingJacksonHttpMessageConverter and also by a new
Jaxb2CollectionHttpMessageConverter that can read read a generic
Collection where the generic type is a JAXB type annotated with
@XmlRootElement or @XmlType.

Issue: SPR-9570
2012-08-23 09:58:45 -04:00
Arjen Poutsma ed3823b045 Support generic target types in the RestTemplate
This change makes it possible to use the RestTemplate to read an HTTP
response into a target generic type object. The RestTemplate has three
new exchange(...) methods that accept ParameterizedTypeReference -- a
new class that enables capturing and passing generic type info.
See the Javadoc of the three new methods in RestOperations for a
short example.

To support this feature, the HttpMessageConverter is now extended by
GenericHttpMessageConverter, which adds a method for reading an
HttpInputMessage to a specific generic type. The new interface
is implemented by the MappingJacksonHttpMessageConverter and also by a
new Jaxb2CollectionHttpMessageConverter that can read read a generic
Collection where the generic type is a JAXB type annotated with
@XmlRootElement or @XmlType.

Issue: SPR-7023
2012-08-22 16:20:36 -04:00
Rossen Stoyanchev 789e12a0c7 Use OS-specific newline in Jackon pretty print tests 2012-08-22 14:24:53 -04:00
Rossen Stoyanchev 2965df6bee Update Javadoc of UriComponentsBuilder
Issue: SPR-9474
2012-08-22 12:23:23 -04:00
Rossen Stoyanchev de6f74fa40 Encode UTF-8 characters used in Java test sources
A pass-through the native2ascii tool.

Issue: SPR-9657
2012-08-22 11:43:48 -04:00
Rossen Stoyanchev b3f0b6e2d6 Fix links in MVC chapter
Issue: SPR-9344
2012-08-22 11:25:29 -04:00
Rossen Stoyanchev 888835445c Update error message in DispatcherServlet
Issue: SPR-8338
2012-08-21 15:35:06 -04:00
Rossen Stoyanchev 364bb696e0 Decode target parameters prior to saving a FlashMap
The target parameters for a FlashMap must be decoded to be able to
match them to the parameters of incoming requests given that the
HttpServletRequest returns decoded request parameters.

SPR-9657
2012-08-21 15:27:21 -04:00
Rossen Stoyanchev af1561634c Allow Errors after @RequestBody and @RequestPart
An @RequestBody or an @RequestPart argument can now be followed by an
Errors/BindingResult argument making it possible to handle validation
errors (as a result of an @Valid annotation) locally within the
@RequestMapping method.

Issue: SPR-7114
2012-08-21 14:34:05 -04:00
Rossen Stoyanchev 06d95915a0 Add error message for missing servlet request param.
The DefaultHandlerExceptionResolver now provides an error message in
addition to setting the status of the response.

Issue: SPR-9312
2012-08-21 12:35:17 -04:00
Rossen Stoyanchev 1cf4a2facd Add ExceptionHandlerSupport class
The new class is functionally equivalent to the
DefaultHandlerExceptionResolver (i.e. it translates Spring MVC
exceptions to various status codes) but uses an @ExceptionHandler
returning a ResponseEntity<Object>, which means it can be customized to
write error content to the body of the response.

Issue: SPR-9290
2012-08-21 11:32:11 -04:00
Sam Brannen 58daeea1e2 Merge pull request #121 from sbrannen/SPR-9011
* SPR-9011:
  Support ApplicationContextInitializers in the TCF
2012-08-20 15:33:17 +02:00
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
Rossen Stoyanchev 9c8c967caa Add async options to MVC namespace and Java config
The MVC Java config method to implement is
WebMvcConfigurer.configureAsyncSupport(AsyncSupportConfigurer)

The MVC namespace element is:
<mvc:annotation-driven>
  <mvc:async-support default-timeout="2500" task-executor="myExecutor" />
</mvc:annotation-driven>

Issue: SPR-9694
2012-08-17 17:05:16 -04:00
Rossen Stoyanchev 4f55518290 Update remaining filter with async support
Issue: SPR-9433
2012-08-17 13:09:52 -04:00
Rossen Stoyanchev cdab04a032 Set timeout value and task executor per async request
Methods returning DeferredResult can now specify a timeout value
through constructor arg while methods returning a Callable can wrap it
in an AsyncTask that also accepts a timeout and a specific task
executor.

Issue: SPR-9399
2012-08-17 13:09:51 -04:00
Rossen Stoyanchev 4407f6a4c0 Make DeferredResult more usable and testable
DeferredResult now has a setErrorResult method that can be set to an
Exception or an error object, error view, etc.

The new isSetOrExpired() method can be used to check pro-actively if
the DeferredResult is still usable or not.

The setDeferredResultHandler method is now public so tests may use it.

Issue: SPR-9690, SPR-9689
2012-08-17 13:09:51 -04:00
Sam Brannen 3b9833c538 Update MockHttpSession across the test suite 2012-08-16 13:38:51 +02:00
Sam Brannen 8059625670 Implement invalidate() properly in MockHttpSession
The invalidate() method in MockHttpSession is currently implemented
incorrectly. According to the Servlet specification, the method should
throw an IllegalStateException if it is invoked on an already
invalidated session. However, invoking invalidate() on the same
MockHttpSession instance multiple times does not throw an exception.

This commits addresses this issue by checking the invalid field and
throwing an IllegalStateException if it has already been set to true.

Issue: SPR-9686
2012-08-16 13:14:35 +02:00
Rossen Stoyanchev e65b930e7a Introduced ControllerAdvice annotation
Classes with this annotation can contain @ExceptionHandler,
@InitBinder, and @ModelAttribute methods that apply to all controllers.
The new annotation is also a component annotation allowing
implementations to be discovered through component scanning.

Issue: SPR-9112
2012-08-14 16:35:37 -04:00
Sam Brannen f1105812af Polish Spring MVC ContextLoader
This commit polishes the exception message thrown by customizeContext()
for greater readability.
2012-08-14 00:36:59 +02:00
Chris Beams 81128871be Add optional AspectJ dependencies where appropriate
spring-core, spring-aop and spring-context each have compile-time
dependencies on classes in the aspectjweaver jar. Prior to this commit,
only spring-core declared an optional dependency on it; now all three
do.

Issue: SPR-9683
2012-08-13 15:24:52 +02:00
Chris Beams d986585be8 Make spring-orm dependency on spring-web optional
Historically spring-orm has had an optional dependency on spring-web,
primarily in support of OpenSessionInView functionality. This optional
dependency was inadvertently made required when porting the build to
Gradle. This commit simply reintroduces the optional setting.

Issue: SPR-9632
2012-08-13 13:58:41 +02:00
Arjen Poutsma 7187a2435e XStreamMarshaller supports stream directly
XStreamMarshaller now supports writing to OutputStreams and reading from
InputStreams directly, as opposed to wrapping streams in a
OutputStreamWriter or InputStreamReader.

Issue: SPR-9663
2012-08-13 13:48:16 +02:00
Chris Beams 4e0977ccdd Expand repackaged asm/cglib jars into spring-core
Prior to this change, the repackaged spring-asm and spring-cglib jars
were being included wholesale in the spring-core jar, whereas the
intention was to include the unzipped classfiles.

This change ensures that spring-asm and spring-cglib jars are unzipped
on the fly when creating the spring-core jar.

Issue: SPR-9669
2012-08-11 12:48:45 +02:00
Sam Brannen df961a938e RTU.setField() shouldn't call toString() on target
ReflectionTestUtils.setField() implicitly calls toString() on the target
object when arguments for a call to Assert.notNull() are built. This can
have undesirable side effects, for example if the toString() invocation
results in a thrown exception or access to an external system (e.g., a
database).

This commit addresses this issue by inlining the Assert.notNull() code,
thereby avoiding accidental invocation of toString() on a non-null
target.

Issue: SPR-9571
2012-08-10 16:44:55 +02:00
Sam Brannen 5710cf5ed2 Reduce log level to DEBUG when @TELs isn't present
The default set of TestExecutionListeners is sufficient in most
integration testing scenarios; however, the TestContextManager
nonetheless logs an INFO message if the @TestExecutionListeners
annotation is not present on an integration test class.

In order to avoid flooding the logs with messages about the absence of
@TestExecutionListeners, this commit reduces the log level for such
messages from INFO to DEBUG.

Issue: SPR-8645
2012-08-10 15:16:27 +02:00
Chris Beams ff3dbac4b9 Eliminate spring-asm .gitignore files
Issue: SPR-9669
2012-08-10 01:21:57 +02:00
Chris Beams 4691243fb0 Merge branch cbeams/SPR-9669
* SPR-9669:
  Upgrade to CGLIB 3 and inline into spring-core
  Remove spring-asm and inline ASM 4 into spring-core
  Upgrade JarJar to version 1.3
2012-08-10 00:53:23 +02:00
Chris Beams 92500ab902 Upgrade to CGLIB 3 and inline into spring-core
CGLIB 3 has been released in order to depend on ASM 4, which Spring now
depends on internally (see previous commit).

This commit eliminates spring-beans' optional dependency on cglib-nodep
v2.2 and instead repackages net.sf.cglib => org.springframework.cglib
much in the same way we have historically done with ASM.

This change is beneficial to users in several ways:

 - Eliminates the need to manually add CGLIB to the application
   classpath; especially important for the growing number of
   @Configuration class users. Java-based configuration functionality,
   along with proxy-target-class and method injection features now
   work 'out of the box' in Spring 3.2.

 - Eliminates the possibility of conflicts with other libraries that
   may dependend on differing versions of CGLIB, e.g. Hibernate
   3.3.1.ga and its dependency on CGLIB 2.1.3 would easily cause a
   conflict if the application were depending on CGLIB 3 for
   Spring-related purposes.

 - Picks up CGLIB 3's changes to support ASM 4, meaning that CGLIB is
   that much less likely to work well in a Java 7 environment due to
   ASM 4's support for transforming classes with invokedynamic
   bytecode instructions.

On CGLIB and ASM:

  CGLIB's own dependency on ASM is also transformed along the way to
  depend on Spring's repackaged org.springframework.asm, primarily to
  eliminate unnecessary duplication of ASM classfiles in spring-core and
  in the process save around 100K in the final spring-core JAR file size.

  It is coincidental that spring-core and CGLIB currently depend on the
  exact same version of ASM (4.0), but it is also unlikely to change any
  time soon. If this change does occur and versions of ASM drift, then
  the size optimization mentioned above will have to be abandoned. This
  would have no compatibility impact, however, so this is a reasonable
  solution now and for the forseeable future.

On a mysterious NoClassDefFoundError:

  During the upgrade to CGLIB 3.0, Spring test cases began failing due to
  NoClassDefFoundErrors being thrown from CGLIB's DebuggingClassWriter
  regarding its use of asm-util's TraceClassVisitor type. previous
  versions of cglib-nodep, particularly 2.2, did not cause this behavior,
  even though cglib-nodep has never actually repackaged and bundled
  asm-util classes. The reason for these NoClassDefFoundErrors occurring
  now is still not fully understood, but appears to be due to subtle JVM
  bytecode preverification rules. The hypothesis is that due to minor
  changes in DebuggingClassWriter such as additional casts, access to
  instance variables declared in the superclass, and indeed a change in
  the superclass hierarchy, preverification may be kicking in on the
  toByteArray method body, at which point the reference to the missing
  TraceClassVisitor type is noticed and the NCDFE is thrown. For this
  reason, a dummy implementation of TraceClassVisitor has been added to
  spring-core in the org.springframework.asm.util package. This class
  simply ensures that Spring's own tests never result in the NCDFE
  described above, and more importantly that Spring's users never
  encounter the same.

Other changes include:

 - rename package-private Cglib2AopProxy => CglibAopProxy
 - eliminate all 'cglibAvailable' checks, warnings and errors
 - eliminate all 'CGLIB2' language in favor of 'CGLIB'
 - eliminate all mention in reference and java docs of needing to add
   cglib(-nodep) to one's application classpath

Issue: SPR-9669
2012-08-10 00:38:49 +02:00
Chris Beams c16f18a5fd Remove spring-asm and inline ASM 4 into spring-core
ASM 4.0 is generally compatibile with Java 7 classfiles, particularly
including 'invokedynamic' instructions. This is important when
considering that Spring's component-scanning support is internally
ASM-based and it is increasingly likely that component classes having
invokedynamic instructions may be encountered and read by ASM.
This upgrade, then, is primarily preventive in nature.

Changes include:

 - upgrade from ASM 2.2.3 to ASM 4.0

 - adapt to ASM API changes as necessary throughout spring-core,
   resulting in no impact to the public Spring API.

 - remove dedicated spring-asm module

 - use new :spring-core:asmRepackJar task to repackage
   org.objectweb.asm => org.springframework.asm as per usual and write
   repackaged classes directly into spring-core jar

The choice to eliminate the spring-asm module altogether and instead
inline the repackaged classes directly into spring-core is first to
eliminate an otherwise unnecessary second jar. spring-core has a
non-optional dependency on spring-asm meaning it is always on the
application classpath. This change simplifies that situation by
consoliding two jars into one. The second reason for this choice is in
anticipation of upgrading CGLIB to version 3 and inlining it into
spring-core as well. See subsequent commit for details.

Issue: SPR-9669
2012-08-10 00:36:49 +02:00
Chris Beams 69a392981e Upgrade JarJar to version 1.3
JarJar 1.3 now uses ASM 4 in order to be compatible with Java 7
'invokedynamic' instructions. This is not an immediate concern for
the classes that we use JarJar to repackage and transform, but is a
timely upgrade in anticipation of the subsequent commits in which we
upgrade Spring's own dependency on ASM from 2.2.3 to 4.0 and Spring's
dependency on CGLIB from 2.2 to 3.0 (which in turn depends on ASM 4.0).

See https://code.google.com/p/jarjar/wiki/ChangeLog

Issue: SPR-9669
2012-08-10 00:30:54 +02:00
Sam Brannen 3e8b5575c1 Merge pull request #117 from aclement/SPR-9621
* SPR-9621:
  Avoid NPE when registering a SpEL MethodFilter
2012-08-09 23:05:50 +02:00
Andy Clement f5d3cd07e7 Avoid NPE when registering a SpEL MethodFilter
Attempting to register a custom MethodFilter with a
StandardEvaluationContext after invoking setMethodResolvers() with a
custom list of MethodResolver instances results in a
NullPointerException. Based on the current documentation in
StandardEvaluationContext it is unclear what the expected behavior
should be, but either the implementation is broken, or the use case is
unsupported. In either case, allowing a NullPointerException to be
thrown is inappropriate.

This commit documents the fact that the SpEL MethodFilter is intended to
be used with the ReflectiveMethodResolver. Furthermore,
StandardEvaluationContext.registerMethodFilter() now throws an
IllegalStateException if the user attempts to set a filter after having
registered a custom set of resolvers.

Issue: SPR-9621
2012-08-09 23:05:08 +02:00
Sam Brannen 51bac37d9b Merge pull request #116 from aclement/SPR-9620
* SPR-9620:
  Support nested double quotes in SpEL expressions
2012-08-09 22:13:21 +02:00
Andy Clement 75944cc88f Support nested double quotes in SpEL expressions
The Spring Expression Language currently supports nested single quotes
within expressions but not nested double quotes.

The SpEL tokenizer has been modified to support nested double quotes in
the same way it supports single quotes. A sequence of two double quotes
will now be replaced by one when evaluated.

Extra error handling has also been added to report when invalid escaping
is encountered, since SpEL does not support escaping with backslash.

Issue: SPR-9620
2012-08-09 22:12:06 +02:00
Sam Brannen 0d963a690b Merge pull request #115 from aclement/SPR-9614
* SPR-9614:
  Support symbolic boolean operators for OR and AND
2012-08-09 21:05:37 +02:00
Andy Clement 58e6214b7b Support symbolic boolean operators for OR and AND
SpEL typically supports logical operators for boolean expressions
consistent with standard Java language syntax. However, the operators
for logical AND and logical OR are currently only supported as textual
operators. In other words, SpEL does not support the use of && and || as
logical operators.

The SpEL tokenizer has now been modified to recognize && and || as
symbolic boolean operators. The parser has been modified to allow the
use of either the textual or symbolic operators.

Issue: SPR-9614
2012-08-09 21:02:58 +02:00
Chris Beams 6249539426 Upgrade to Gradle 1.1 GA
Issue: SPR-9660
2012-08-08 08:46:04 +02:00
Sam Brannen 826e565b7c Polish GenericTypeResolver
- renamed resolveParameterizedReturnType() to
   resolveReturnTypeForGenericMethod()
 - fleshed out Javadoc for resolveReturnType() and
   resolveReturnTypeForGenericMethod() regarding declaration of formal
   type variables
 - improved wording in log statements and naming of local variables
   within resolveReturnTypeForGenericMethod()

Issue: SPR-9493
2012-08-05 19:09:38 +02:00
Sam Brannen 3fbcebb82e Merge pull request #113 from aclement/SPR-9613
* SPR-9613:
  Support case-insensitive null literals in SpEL
2012-08-04 01:50:36 +02:00
Andy Clement a7418f480c Support case-insensitive null literals in SpEL
Prior to this commit null literals in SpEL expressions had to be
specified as "null" (i.e., all lowercase).

With this commit null literals in SpEL expressions are interpreted in a
case-insensitive manner, analogous to the current support for boolean
literals.

Issue: SPR-9613
2012-08-04 01:47:49 +02:00
Rossen Stoyanchev 529e62921d Refactor Servlet 3 async support
As a result of the refactoring, the AsyncContext dispatch mechanism is
used much more centrally. Effectively every asynchronously processed
request involves one initial (container) thread, a second thread to
produce the handler return value asynchronously, and a third thread
as a result of a dispatch back to the container to resume processing
of the asynchronous resuilt.

Other updates include the addition of a MockAsyncContext and support
of related request method in the test packages of spring-web and
spring-webmvc. Also an upgrade of a Jetty test dependency required
to make tests pass.

Issue: SPR-9433
2012-08-03 19:15:53 -04:00
Sam Brannen 026ee846c7 Merge pull request #112 from aclement/SPR-9612
* SPR-9612:
  Modify SpEL Tokenizer to support methods on numbers
2012-08-04 01:06:50 +02:00
Andy Clement e4a926ea3c Modify SpEL Tokenizer to support methods on numbers
When attempting to parse an Integer literal expression such as
42.toString(), SpEL currently throws a SpelParseException with a message
similar to: "EL1041E:(pos 3): After parsing a valid expression, there is
still more data in the expression: 'toString'". The problem here is that
'3.' is currently considered a valid number (including the dot).
However, SpEL succeeds at parsing an equivalent expression for a Double
literal such as 3.14.isInfinite().

To address this issue, the SpEL Tokenizer no longer consumes the
trailing '.' on an integer as part of the integer. So '3.foo()' will now
be parsed as '3' '.' 'foo()' and not '3.' 'foo()' -- which was what
prevented parsing of method invocations on integers. To keep the change
simple, the parser will no longer handle real numbers of the form
'3.e4'. From now on they must include the extra 0 (i.e., '3.0e4').

Issue: SPR-9612
2012-08-04 01:04:29 +02:00
Sam Brannen 015086cb9c Introduce new methods in tx base test classes
Recently new utility methods were added to JdbcTestUtils, and a
JdbcTemplate was introduced in abstract transactional base classes in
the TestContext framework. This presents an easy opportunity to make
these new utility methods available as convenience methods in the base
test classes.

This commit introduces new countRowsInTableWhere() and dropTables()
convenience methods in the abstract transactional base classes in the
TestContext framework. These new methods internally delegate to methods
of the same names in JdbcTestUtils.

Issue: SPR-9665
2012-08-03 22:50:39 +02:00
Sam Brannen 8d9637ada6 Provide JdbcTemplate in tx base classes in the TCF
Since Spring 2.5, the abstract transactional base classes in the
TestContext framework have defined and delegated to a protected
SimpleJdbcTemplate instance variable; however, SimpleJdbcTemplate has
deprecated since Spring 3.1. Consequently, subclasses of
AbstractTransactionalJUnit4SpringContextTests and
AbstractTransactionalTestNGSpringContextTests that use this instance
variable suffer from seemingly unnecessary deprecation warnings.

This commit addresses this issue by introducing a protected JdbcTemplate
instance variable in abstract transactional base classes to replace the
use of the existing SimpleJdbcTemplate. Furthermore, the existing
simpleJdbcTemplate instance variable has been deprecated, and utility
methods in the affected base classes now delegate to JdbcTestUtils
instead of the now deprecated SimpleJdbcTestUtils.

Issue: SPR-8990
2012-08-03 21:59:05 +02:00
Sam Brannen a7d43773e8 Merge pull request #90 from ianbrandt/SPR-9235
* SPR-9235:
  Deprecate SimpleJdbcTestUtils in favor of JdbcTestUtils
2012-08-03 20:56:17 +02:00
Ian Brandt bd0c4b4d99 Deprecate SimpleJdbcTestUtils in favor of JdbcTestUtils
Several static utility methods in SimpleJdbcTestUtils accept an instance
of SimpleJdbcTemplate as an argument; however, SimpleJdbcTemplate has
been deprecated since Spring 3.1 in favor of simply using JdbcTemplate
which now also supports Java 5 language constructs such as var-args.
Consequently, use of such methods from SimpleJdbcTestUtils results in
deprecation warnings without an equivalent API to migrate to.

This commit addresses this issue by migrating all existing methods in
SimpleJdbcTestUtils to JdbcTestUtils. The migrated methods now accept an
instance of JdbcTemplate as an argument, thereby avoiding the
deprecation warnings but maintaining semantic compatibility with the
functionality previous available in SimpleJdbcTestUtils.

In addition, this commit also introduces two new methods:

 - countRowsInTableWhere(): counts the rows in a given table, using
   a provided `WHERE` clause
 - dropTables(): drops the tables with the specified names

Issue: SPR-9235
2012-08-03 20:55:09 +02:00
Sam Brannen 04bfc802db Use consistent HSQLDB version in Gradle build 2012-08-02 18:30:08 +02:00
Sam Brannen d2178552c3 Merge pull request #111 from sbrannen/SPR-9492
Introduce MockEnvironment in the spring-test module
2012-07-28 11:23:34 -07:00
Sam Brannen f49b22c78f Introduce MockEnvironment in the spring-test module
For legacy reasons, a MockEnvironment implementation already exists in multiple places within Spring's test suite; however, it is not available to the general public.

This commit promotes MockEnvironment to a first-class citizen in the spring-test module, alongside the existing MockPropertySource.

In addition, the following house cleaning has been performed.

 - deleted MockPropertySource from the spring-expression module
 - deleted MockEnvironment from the "spring" integration testing module
 - updated test copies of MockPropertySource and MockEnvironment
 - documented MockEnvironment and MockPropertySource in the testing
   chapter of the reference manual

Issue: SPR-9492
2012-07-28 20:10:21 +02:00
Sam Brannen 0329df218e Polish error message in BeanFactoryAnnotationUtils 2012-07-28 18:37:22 +02:00
Sam Brannen 1fd9975e21 Polish Javadoc for NoSuchBeanDefinitionException 2012-07-28 18:36:15 +02:00
Sam Brannen 2b7a629068 Support TransactionManagementConfigurer in the TCF
Currently the Spring TestContext Framework looks up a
PlatformTransactionManager bean named "transactionManager". The exact
name of the bean can be overridden via @TransactionConfiguration or
@Transactional; however, the bean will always be looked up 'by name'.

The TransactionManagementConfigurer interface that was introduced in
Spring 3.1 provides a programmatic approach to specifying the
PlatformTransactionManager bean to be used for annotation-driven
transaction management, and that bean is not required to be named
"transactionManager". However, as of Spring 3.1.2, using the
TransactionManagementConfigurer on a @Configuration class has no effect
on how the TestContext framework looks up the transaction manager.
Consequently, if an explicit name or qualifier has not been specified,
the bean must be named "transactionManager" in order for a transactional
integration test to work.

This commit addresses this issue by refactoring the
TransactionalTestExecutionListener so that it looks up and delegates to
a single TransactionManagementConfigurer as part of the algorithm for
determining the transaction manager.

Issue: SPR-9604
2012-07-28 01:24:32 +02:00
Sam Brannen f21fe33e74 Support single, unqualified tx manager in the TCF
TransactionalTestExecutionListener currently requires that the
PlatformTransactionManager bean be named "transactionManager" by
default. Otherwise, the bean name can only be overridden via the
transactionManager attribute of @TransactionConfiguration or the value
attribute of @Transactional.

However, if there is only a single PlatformTransactionManager in the
test's ApplicationContext, then the requirement to specify the exact
name of that bean (or to name it exactly "transactionManager") is often
superfluous.

This commit addresses this issue by refactoring the
TransactionalTestExecutionListener so that it is comparable to the
algorithm for determining the transaction manager used in
TransactionAspectSupport for "production" code. Specifically, the TTEL
now uses the following algorithm to retrieve the transaction manager.

 - look up by type and qualifier from @Transactional
 - else, look up by type and explicit name from
   @TransactionConfiguration
 - else, look up single bean by type
 - else, look up by type and default name from @TransactionConfiguration

Issue: SPR-9645
2012-07-28 00:06:46 +02:00
Sam Brannen c0b4e368dc Fix typo in TransactionManagementConfigurer Javadoc 2012-07-27 00:04:55 +02:00
Sam Brannen 37dc211f58 Support named dispatchers in MockServletContext
Currently the getNamedDispatcher(String) method of MockServletContext
always returns null. This poses a problem in certain testing scenarios
since one would always expect at least a default Servlet to be present.
This is specifically important for web application tests that involve
the DefaultServletHttpRequestHandler which attempts to forward to the
default Servlet after retrieving it by name. Furthermore, there is no
way to register a named RequestDispatcher with the MockServletContext.

This commit addresses these issues by introducing the following in
MockServletContext.

 - a new defaultServletName property for configuring the name of the
   default Servlet, which defaults to "default"
 - named RequestDispatchers can be registered and unregistered
 - a MockRequestDispatcher is registered for the "default" Servlet
   automatically in the constructor
 - when the defaultServletName property is set to a new value the
   the current default RequestDispatcher is unregistered and replaced
   with a MockRequestDispatcher for the new defaultServletName

Issue: SPR-9587
2012-07-26 03:06:07 +02:00
Rossen Stoyanchev 914557b975 Use a default for INTROSPECT_TYPE_LEVEL_MAPPING
Usually this request attribute is set for all sub-classes of
AbstractUrlHandlerMapping and therefore whenever
AnnotationMethodHandlerAdapter is used. However, having a
default value to fall back on in AnnotationMethodHandlerAdapter
is still appropriate in general and also considering the Javadoc
of HandlerMapping.INTROSPECT_TYPE_LEVEL_MAPPING.

Issue: SPR-9629
2012-07-25 19:22:15 -04:00
Rossen Stoyanchev 7c6a1a1bf0 Improve tests for detection of @MVC annotations
Issue: SPR-9601
2012-07-25 19:10:46 -04:00
Sam Brannen 060b37ca8d Fix typo in MockFilterChain 2012-07-25 01:03:33 +02:00
Rossen Stoyanchev 64d939bb16 Add ContentNegotiationManagerFactoryBean
The new FactoryBean facilitates the creation of a
ContentNegotiationManager in XML configuration.

Issue: SPR-8420
2012-07-21 06:16:42 -04:00
Rossen Stoyanchev 028e15faa3 Add options to configure content negotiation
The MVC Java config and the MVC namespace now support options to
configure content negotiation. By default both support checking path
extensions first and the "Accept" header second. For path extensions
.json, .xml, .atom, and .rss are recognized out of the box if the
Jackson, JAXB2, or Rome libraries are available. The ServletContext
and the Java Activation Framework may be used as fallback options
for path extension lookups.

Issue: SPR-8420
2012-07-20 21:32:02 -04:00
Rossen Stoyanchev 92759ed1f8 Add exclude patterns for mapped interceptors
Add the ability provide exclude patterns for mapped interceptors in the
MVC namespace and in the MVC Java config.

Issue: SPR-6570
2012-07-20 14:47:46 -04:00
Rossen Stoyanchev 5a365074c2 Fix issue with failing test from previous commit
Issue: SPR-9611
2012-07-20 14:46:52 -04:00
Rossen Stoyanchev 6cc512b51c Ensure async Callables are in sync with the call stack
After this change each call stack level pushes and pops an async
Callable to ensure the AsyncExecutionChain is in sync with the
call stack. Before this change, a controller returning a "forward:"
prefixed string caused the AsyncExecutionChain to contain a
extra Callables that did not match the actual call stack.

Issue: SPR-9611
2012-07-20 12:50:01 -04:00
Sam Brannen 33a3681975 Fix DeferredResult typo in changelog 2012-07-18 13:08:59 -04:00
Rossen Stoyanchev d3d00696a4 Create StandardServletAsyncWebRequest via reflection
Issue: SPR-9500
2012-07-18 10:02:15 -04:00
Rossen Stoyanchev eab6e1d134 Parameterize DeferredResult
Issue: SPR-9579
2012-07-18 09:43:03 -04:00
Rossen Stoyanchev 55bd99fa16 Fix typos in Spring MVC chapter of reference docs 2012-07-17 16:46:50 -04:00
Sam Brannen 35a423a858 Merge pull request #108 from rwinch/SPR-9594
* SPR-9594:
  Fix minor issue in MockHttpServletRequest
2012-07-16 12:26:25 -04:00
Rob Winch 59d80ec19e Fix minor issue in MockHttpServletRequest
Previously MockHttpServletRequest#sendRedirect did not set the HTTP status
or the Location header. This does not conform to the HttpServletRequest
interface.

MockHttpServletRequest will now:

  - Set the HTTP status to 302 on sendRedirect
  - Set the Location header on sendRedirect
  - Ensure the Location header and getRedirectedUrl are kept in synch

Issue: SPR-9594
2012-07-16 12:23:28 -04:00
Rossen Stoyanchev 67a05e4185 Update section on exception handling MVC chapter
Update section on exception handling in Spring MVC chapter to include
more guidance on exception handling when implementing a REST API.

Issue: SPR-9290
2012-07-10 19:13:10 -04:00
Rossen Stoyanchev a1b7a314c1 Add BindException to DefaultHandlerExceptionResolver
Previously DefaultHandlerExceptionResolver did not handle BindException
but after this change it does. A BindException is raised when an
@ModelAttribute annotated argument is not followed by a BindingResult
argument. Hence this is unlikely to affect browser rendering.
For programmatic clients however this change ensures an unhandled
BindException is at least turned into a 400 error.

Issue: SPR-9310
2012-07-10 17:32:13 -04:00
Rossen Stoyanchev e860fa9a8b Move feed message converters ahead of jackson/jaxb2
The Atom/RSS message converters are now registered ahead of the
Jackson and the JAXB2 message converters by default. Since the Atom
and RSS converters convert to and from very specific object types
Feed and Channel respectively, that shouldn't introduce any regressions
and will work more intuitively when the requested media type is "*/*".

Issue: SPR-9054
2012-07-10 17:12:06 -04:00
Chris Beams 2b4a516980 Merge pull request #104 from poutsma/SPR-9536
* SPR-9576:
  Include **/*.aj files in *-sources.jar files
2012-07-10 13:22:32 +02:00
Rob Winch a681e574c3 Include **/*.aj files in *-sources.jar files
Previously only **/*.java sources files were included in the sources
jars. This is not ideal for the spring-aspects jar nor does it match
prior versions of the sources jars.

Now **/*.aj files are included in addition to the **/*.java files.

Issue: SPR-9576
2012-07-10 13:17:28 +02:00
Rossen Stoyanchev cf147a82ef Fix issue with incorrect class import
Issue: SPR-9112
2012-07-09 20:34:05 -04:00
Rossen Stoyanchev c846198e46 Add support for global @ExceptionHandler methods
Before this change @ExceptionHandler methods could be located in and
apply locally within a controller. The change makes it possible to have
such methods applicable globally regardless of the controller that
raised the exception.

The easiest way to do that is to add them to a class annotated with
`@ExceptionResolver`, a new annotation that is also an `@Component`
annotation (and therefore works with component scanning). It is also
possible to register classes containing `@ExceptionHandler` methods
directly with the ExceptionHandlerExceptionResolver.

When multiple `@ExceptionResolver` classes are detected, or registered
directly, the order in which they're used depends on the the `@Order`
annotation (if present) or on the value of the order field (if the
Ordered interface is implemented).

Issue: SPR-9112
2012-07-09 17:27:03 -04:00
Juergen Hoeller ccd2da37ce preparations for 3.2 M2 2012-07-06 22:47:46 +02:00
Juergen Hoeller dda3197c77 added "jtaTransactionManager" property to Hibernate 4 LocalSessionFactoryBean/Builder
Issue: SPR-9480
2012-07-06 22:43:36 +02:00
Juergen Hoeller 9aa43fcef6 reintroduced static DEFAULT_CHARSET field
Issue: SPR-9487
2012-07-06 22:43:35 +02:00
Chris Beams 2ec7834124 Resolve nested placeholders via PropertyResolver
Prior to this change, PropertySourcesPropertyResolver (and therefore
all AbstractEnvironment) implementations failed to resolve nested
placeholders as in the following example:

    p1=v1
    p2=v2
    p3=${v1}:{$v2}

Calls to PropertySource#getProperty for keys 'p1' and 'v1' would
successfully return their respective values, but for 'p3' the return
value would be the unresolved placeholders. This behavior is
inconsistent with that of PropertyPlaceholderConfigurer.

PropertySourcesPropertyResolver #getProperty variants now resolve any
nested placeholders recursively, throwing IllegalArgumentException for
any unresolvable placeholders (as is the default behavior for
PropertyPlaceholderConfigurer). See SPR-9569 for an enhancement that
will intoduce an 'ignoreUnresolvablePlaceholders' switch to make this
behavior configurable.

This commit also improves error output in
PropertyPlaceholderHelper#parseStringValue by including the original
string in which an unresolvable placeholder was found.

Issue: SPR-9473, SPR-9569
2012-07-06 15:45:40 +02:00
Rossen Stoyanchev b9786ccaca Fix minor issue in HandlerMethod
Before this change HandlerMethod used ClassUtils.getUserClass(Class<?>)
to get the real user class, and not one generated by CGlib. However it
failed to that under all circumstances. This change fixes that.

Issue: SPR-9490
2012-07-05 16:02:36 -04:00
Rossen Stoyanchev a4240d2864 Add defaultCharset field to StringHttpMessageConverter
Before this change the StringHttpMessageConverter used a fixed charset
"ISO-8859-1" if the requested content type did not specify one. This
change adds a defaultCharset field and a constructor to configure it in
StringHttpMessageConverter.

Issue: SPR-9487
2012-07-05 15:53:49 -04:00
Juergen Hoeller 4d297b475c preparations for 3.2 M2 2012-07-05 00:50:35 +02:00
Juergen Hoeller d97a4b5b3c polishing 2012-07-05 00:31:51 +02:00
Juergen Hoeller 596571059e DispatcherPortlet does not forward event exceptions to the render phase by default
Issue: SPR-9287
2012-07-05 00:19:01 +02:00
Juergen Hoeller 8bd1fd3715 moved getInputStream() not-null requirement to InputStreamSource itself; removed misleading "throws IllegalStateException" declaration
Issue: SPR-9561
2012-07-04 23:32:49 +02:00
Juergen Hoeller 5a7b3f65ec added "repeatCount" bean property to Quartz SimpleTriggerFactoryBean
Issue: SPR-9521
2012-07-04 23:22:01 +02:00
Juergen Hoeller fdb9de1445 Use BufferedInputStream in SimpleMetaDataReader to double performance
Issue: SPR-9528
2012-07-04 22:58:58 +02:00
Juergen Hoeller 309e51ba5b refined fix so that XStreamMarshaller does not wrap IllegalArgumentException
Issue: SPR-9536
2012-07-04 22:58:57 +02:00
Rossen Stoyanchev e870c9a392 Reduce logging in HandlerExecutionChain
Before this change the HandlerExecitionChain logged errors each time a
an AsyncHandlerInterceptor returned a null async Callable, a condition
which is acceptable.

SPR-9524
2012-07-02 17:56:39 -04:00
Rossen Stoyanchev 8fbfe9b502 Merge pull request #101 from philwebb/SPR-9530
* SPR-9530:
  Improve SimpleStreamingClientHttpRequest performance
2012-07-02 17:05:44 -04:00
Phillip Webb ecc6a5aed2 Improve SimpleStreamingClientHttpRequest performance
Ensure that NonClosingOutputStream calls with a byte array call the
corresponding methods of the underlying OutputStream rather than
relying on the default NonClosingOutputStream implementation, which
writes one bte at a time. This significantly improves performance.

Issues: SPR-9530
2012-07-02 17:03:07 -04:00
Chris Beams dc822cdca0 Reflect 3.2=>3.1.2 backports in @since tags etc
Issue: SPR-9443, SPR-6847, SPR-9446, SPR-9444, SPR-9439, SPR-9302,
       SPR-9507, SPR-9238, SPR-9397, SPR-9406, SPR-9502
2012-06-27 23:07:48 +02:00
Chris Beams f6de5d4360 Reflect @Async executor qual. 3.2=>3.1.2 backport
@Async executor qualification has been backported to 3.1.2. This commit
updates all @since tags appropriately, as well as carrying over the
changes backported to the spring-task-3.1 schema.

Issue: SPR-6847, SPR-9443
2012-06-27 23:04:25 +02:00
Rossen Stoyanchev 7dff02b2c1 Fix import issue introduced in prior commit
Issue: SPR-9289
2012-06-26 18:07:12 -04:00
Rossen Stoyanchev 3f5fa44d32 Polish PathVariableMapMethodArgumentResolver
Return an empty map when there are no path variables, rather than
raising an exception. This is consistent with similar resolvers for
extracting headers and request parameters.

Issue: SPR-9289
2012-06-26 10:23:01 -04:00
Rossen Stoyanchev 4fd7645efd Enable smart suffix pattern match for request mapping
Following the introduction of ContentNegotiationManager that allows,
among other things, to configure the file extensions to use for content
negotiation, this change adds "smart" suffix pattern match that matches
against the configured file extensions only rather than against any
extension.

Given the request mapping "/jobs/{jobName}" and one configured file
extension ("json"), a request for "/jobs/my.job" will select the
pattern "/jobs/{jobName}" while a request for "/jobs/my.job.json" will
select the pattern "/jobs/{jobName}.json". Previously, both requests
would have resulted in the pattern "/jobs/{jobName}.*".

Issue: SPR-7632, SPR-8474
2012-06-25 21:30:10 -04:00
Rossen Stoyanchev f94aed8386 Polish ContentNegotiationStrategy support
Issue: SPR-8410, SPR-8417, SPR-8418,SPR-8416, SPR-8419,SPR-7722
2012-06-25 15:24:05 -04:00
Rossen Stoyanchev 4623568bce Polish client support for HTTP PATCH
Issue: SPR-7985
2012-06-25 14:13:35 -04:00
Chris Beams 8e568466dc Work around apparent bug in README markdown parsing
The exact text above the "Staying in touch" section caused "Staying in
touch" to lose it's formatting as a second-level heading.  Adding
" for details" to the sentence above works around the problem.
2012-06-25 19:42:22 +02:00
Chris Beams c85b611600 Update copyright header for XStreamMarshaller
Issue: SPR-9536
2012-06-25 14:27:05 +02:00
Arjen Poutsma 4c29ad76e0 XStreamMarshaller wraps exception for empty stream
XStreamMarshaller should convert XStream StreamException to Spring
exception in case of unmarshalling an empty stream.

Issue: SPR-9536
2012-06-25 11:34:51 +02:00
Rossen Stoyanchev a0747458e7 Add support for HTTP PATCH method
The HTTP PATCH method is now supported whereever HTTP methods are used.
Annotated controllers can be mapped to RequestMethod.PATCH.

On the client side the RestTemplate execute(..) and exchange(..)
methods can be used with HttpMethod.PATCH. In terms of HTTP client
libraries, Apache HttpComponents HttpClient version 4.2 or later is
required (see HTTPCLIENT-1191). The JDK HttpURLConnection does not
support the HTTP PATCH method.

Issue: SPR-7985
2012-06-22 16:57:22 -04:00
Rossen Stoyanchev f05e2bc56f Add abstractions for content negotiation
Introduced ContentNeogtiationStrategy for resolving the requested
media types from an incoming request. The available implementations
are based on path extension, request parameter, 'Accept' header,
and a fixed default content type. The logic for these implementations
is based on equivalent options, previously available only in the
ContentNegotiatingViewResolver.

Also in this commit is ContentNegotiationManager, the central class to
use when configuring content negotiation options. It accepts one or
more ContentNeogtiationStrategy instances and delegates to them.

The ContentNeogiationManager can now be used to configure the
following classes:

- RequestMappingHandlerMappingm
- RequestMappingHandlerAdapter
- ExceptionHandlerExceptionResolver
- ContentNegotiatingViewResolver

Issue: SPR-8410, SPR-8417, SPR-8418,SPR-8416, SPR-8419,SPR-7722
2012-06-22 11:55:46 -04:00
Chris Beams 35055fd866 Refactor PropertyResolver impl for consistency
PropertySourcesPropertyResolver#containsProperty now
calls #containsProperty on each underlying PropertySource instead of
calling #getProperty and checking for null.

Issue: SPR-9529
2012-06-21 12:53:51 +02:00
Sam Brannen 027e49c58a Document default scripts for embedded databases
The reference manual currently documents the wrong file name for the
default data SQL script used by EmbeddedDatabaseBuilder. In addition,
the testing chapter of the reference manual does not link to the testing
section of the JDBC chapter.

 - Updated the "Testing data access logic with an embedded database"
   section of the reference manual appropriately.
 - Added a new paragraph to the "JDBC Testing Support" section of the
   testing chapter which cross references the "Testing data access logic
   with an embedded database" section.

Issue: SPR-9467
2012-06-19 20:48:07 +02:00
Sam Brannen 5eae22abb8 Document SPR-9493 in the changelog
Issue: SPR-9493
2012-06-19 20:13:46 +02:00
Sam Brannen e3d8ab2088 Fix Javadoc typo in ConfigurableWebEnvironment 2012-06-19 19:34:38 +02:00
Chris Beams 08498d57dd Fix line endings in new JacksonObjectMapper classes
Commit aa415d7c0c introduced
JacksonObjectMapperFactoryBean and associated tests, but with Windows
(CRLF) line endings instead of the conventional Unix (LF) line endings.

This commit converts these files to LF endings using the handy
`dos2unix` utility.

Issue: SPR-9125
2012-06-19 18:14:56 +02:00
Sam Brannen 64d6605974 Merge pull request #97 from sbrannen/SPR-9493
* SPR-9493:
  Infer return type of parametrized factory methods
2012-06-19 18:07:28 +02:00
Sam Brannen c461455c7c Infer return type of parametrized factory methods
Currently, if a factory method is parameterized and the corresponding
variable types are declared on the method itself instead of on the
enclosing class or interface, Spring always predicts the return type to
be Object, even if the return type can be explicitly inferred from the
method signature and supplied arguments (which are available in the bean
definition).

This commit introduces a new resolveParameterizedReturnType() method in
GenericTypeResolver that attempts to infer the concrete type for the
generic return type of a given parameterized method, falling back to the
standard return type if necessary. Furthermore,
AbstractAutowireCapableBeanFactory now delegates to
resolveParameterizedReturnType() when predicting the return type for
factory methods.

resolveParameterizedReturnType() is capable of inferring the concrete
type for return type T for method signatures similar to the following.
Such methods may potentially be static. Also, the formal argument list
for such methods is not limited to a single argument.

 - public <T> T foo(Class<T> clazz)
 - public <T> T foo(Object obj, Class<T> clazz)
 - public <V, T> T foo(V obj, Class<T> clazz)
 - public <T> T foo(T obj)

Issue: SPR-9493
2012-06-19 18:05:41 +02:00
Chris Beams 9fc05a80d0 Reformat and add links to README
The readme is heavy on links and hard to read in source form when using
typical inline Markdown links. The following changes have been made to
increase readability.

 - Wrap lines at 80 characters
 - Use 'implicit link name' shortcut syntax as described at [1]
 - Add link to 'spring-mvc' Stack Overflow tag as well
 - Add link to new 'lifecycle of an issue' wiki doc

[1]: http://daringfireball.net/projects/markdown/syntax
2012-06-19 17:56:18 +02:00
Chris Beams e5bbec7e2b Add Gradle task for building zip with dependencies
Some Spring Framework users and teams cannot use transitive dependency
management tools like Maven, Gradle and Ivy. For them, a `distZip` task
has been added to allow for creating a Spring Framework distribution
from source that includes all optional and required runtime
dependencies for all modules of the framework.

This 'dist-with-deps' zip is not published to the SpringSource
repository nor to the SpringSource community download page. It is
strictly an optional task introduced as a convenience to the users
mentioned above.

Detailed instructions for building this zip locally have been added to
the wiki and the README has been updated with a link to that new doc.

Issue: SPR-6575
2012-06-19 16:49:31 +02:00
Sam Brannen 726655af50 Fix outdated Javadoc in the TestContext framework
Fixed outdated Javadoc regarding support for 'annotated classes' in
the TestContext Framework.
2012-06-19 12:52:24 +02:00
Chris Beams de04d9c654 Fix typo in MessageSource reference docs
Issue: SPR-5022
2012-06-19 11:56:05 +02:00
Rossen Stoyanchev 7dcca4bcfb Merge pull reqest #88 from dmak/SPR-9125
* SPR-9125:
  BeanFactory for configuring a Jackson ObjectMapper
2012-06-18 17:13:35 -04:00
Dmitry Katsubo aa415d7c0c BeanFactory for configuring a Jackson ObjectMapper
The BeanFactory makes it easier to configure a customized Jackson
ObjectMapper (for example enable/disable certain features).
This bean factory is usually used with
MappingJacksonHttpMessageConverter or MappingJacksonJsonView.
See JavaDoc for examples.

Issue: SPR-9125
2012-06-18 17:12:09 -04:00
Rossen Stoyanchev 5959de5d9e Merge pull reqest #92 from DavidBiesack/master
* DavidBiesack-master:
  Minor fix in Javadoc for RequestMapping
2012-06-18 07:22:45 -04:00
David J. Biesack 7cd0b16403 Minor fix in Javadoc for RequestMapping
Issue: SPR-9483
2012-06-18 07:20:03 -04:00
Rossen Stoyanchev 277a115f8b Minor Javadoc fix
Issue: SPR-9513
2012-06-18 06:30:34 -04:00
Chris Beams e8bf25ba9d Merge pull request #95 from rstoyanchev/SPR-4984
* rstoyanchev/SPR-4984:
  Add splitIndex Javadoc option to the root project
2012-06-15 11:01:18 +02:00
Rossen Stoyanchev b0f80d6358 Add splitIndex Javadoc option to the root project
Splits the very large index page with all classes into individual pages
organized by first letter.

Issue: SPR-4984
2012-06-14 12:17:54 -04:00
Rossen Stoyanchev 2abcdaab1e Merge pull request #93 from maxcom/SPR-8917
* SPR-8917:
  Allow parsing of media types with single-quotes
2012-06-14 08:55:18 -04:00
Maxim Valyanskiy 7cdc53487d Allow parsing of media types with single-quotes
Previously MediaType could only parse double-quoted parameters without
raising an IllegalArgumentException. Now parameters can also be
single-quoted.

Issue: SPR-8917
2012-06-14 08:51:52 -04:00
Dave Syer cd6f7de408 SPR-9498: Add support for MultiValueMap to CollectionFactory
This turns out not to be the main problem exposed in SPR-9498
but it seems like a sensible addition anyway.
2012-06-14 11:42:23 +01:00
Dave Syer 8e754e9065 SPR-9498: don't make assumptions about equality if ConversionService has failed
The failure of the conversion service is not fatal, but the check that
was in there (line 248) was inadequate to detect the cases that could
already be handled by the default property editors.  This code path
was also not tested anywhere in spring-beans tests until now.
2012-06-14 11:40:28 +01:00
Dave Syer 3ba4bb31fa Add Maven artifacts to .gitignore 2012-06-14 11:39:16 +01:00
Rossen Stoyanchev ab4952a959 Raise RestClientException for unknown status codes
HttpStatus cannot be created with an unknown status code. If a server
returns a status code that's not in the HttpStatus enum values, an
IllegalArgumentException is raised. Rather than allowing it to
propagate as such, this change ensures the actual exception raised is
a RestClientException.

Issue: SPR-9406
2012-06-13 08:27:16 -04:00
Chris Beams 0e3a1d8176 Require aopalliance dependency for spring-aop
A recent commit made aopalliance optional for spring-aop, while
continuing to require it for spring-tx. On review, this is probably
overly aggressive, and for convenience aopalliance should remain
required for spring-aop. There are use cases for which aopalliance is
indeed optional, but core functionality such as <aop:scoped-proxy>
should never result in a ClassNotFoundException.

This commit returns the aopalliance dependency for spring-aop to
required status, and also explicitly notes the same dependency in other
modules that compile directly against aopalliance types.

Issue: SPR-9501
2012-06-13 13:47:47 +02:00
Chris Beams 49fd20319d Upgrade to Gradle 1.0 GA
Issue: SPR-9494
2012-06-12 11:16:08 +02:00
Sam Brannen 369d77bdf0 spring-test module now depends on junit:junit-dep
The junit:junit Maven artifact includes a bundled version of hamcrest
core. For projects that depend on later versions of hamcrest this causes
significant issues in terms of dependency management.

The spring-test module now depends on junit:junit-dep, thus allowing
developers to better manage their test dependencies on a more fine
grained level.

Also tidied up dependency issues regarding hamcrest-core and
hamcrest-all across the build.

Issue: SPR-6966
2012-06-10 02:39:27 +02:00
Sam Brannen 04a6827290 Reproduce claims raised in SPR-8849
This commit introduces a test suite (Spr8849Tests) that demonstrates
the claims made in SPR-8849.

Specifically, if <jdbc:embedded-database id="xyz" /> is used to create
an embedded HSQL database in an XML configuration file and that
configuration file is imported in different sets of configuration files
that are used to load ApplicationContexts for different integration
tests, the embedded database will be initialized multiple times using
any nested <jdbc:script /> elements. If such a script is used to create
a table, for example, subsequent attempts to initialize the database
named "xyz" will fail since an embedded database named "xyz" already
exists in the JVM.

As a work-around, this test suite uses a SpEL expression to generate a
random string for each embedded database instance:

  id="#{T(java.util.UUID).randomUUID().toString()}"

See the Javadoc in Spr8849Tests for further information.

Issue: SPR-8849
2012-06-10 00:31:05 +02:00
Chris Beams 67d5a1238f Merge pull request #87 from olivergierke/SPR-9457
* SPR-9457:
  Use transactional connection during db population
2012-06-04 16:37:44 +02:00
Oliver Gierke 49c9a2a915 Use transactional connection during db population
Previously, DatabasePopulatorUtils#execute looked up a Connection from
the given DataSource directly which resulted in the executed statements
not being executed against a transactional connection (if any) which in
turn resulted in the statements executed by the populator potentially
not being rolled back.

Now DataSourceUtils#getConnection is used to transparently take part in
any active transaction and #releaseConnection is used to ensure the
connection is closed if appropriate.

Issue: SPR-9457
2012-06-04 16:36:45 +02:00
Chris Beams c471bdde85 Merge pull request #86 from scothis/SPR-7938
* SPR-7938:
  Include response headers in RestTemplate exceptions
  Polish web.client exceptions and related classes
2012-06-01 16:40:06 +02:00
Scott Andrews b992c3d3f2 Include response headers in RestTemplate exceptions
Default HTTP error exceptions thrown from RestTemplate now include
response headers in addition to the response body. In particular, this
enables inspection of the Content-Type header allowing manual
deserialization of the response body without guessing as to the content
type.

 - introduce HttpStatusCodeException#getResponseHeaders
 - add constructor with headers param for HttpStatusCodeException,
   HttpClientErrorException and HttpServerErrorException
 - preserve exsisting constructor signatures
 - mark HttpHeaders as Serializable
 - generate new serialVersionUID where needed

Issue: SPR-7938
2012-06-01 16:38:50 +02:00
Chris Beams bca2357be7 Polish web.client exceptions and related classes
The following style updates have been made in anticipation of
substantive changes in subsequent commits:

 - organize imports
 - correct whitespace errors (leading spaces in code, tabs in Javadoc)
 - wrap Javadoc at 90 chars; make imperative ("Return" vs. "Returns")
 - use conventional constructor argument wrapping

A serialVersionUID has also been added to RestClientException and its
ResourceAccessException subclass for consistency with the rest of that
same exception hierarchy.

Issue: SPR-7938
2012-06-01 16:38:38 +02:00
Chris Beams b8ff6c1f86 Update dependencies for spring-aspects
- Explicitly specify compile-time dependencies on other spring-*
   modules, primarily for accuracy in pom generation and ensuring
   minimal dependencies for users of spring-aspects.

 - Remove use of p: namespace from annotation-cache-aspectj.xml to
   avoid parser-related test failures under Eclipse (likely due to
   classpath differences between Gradle and Eclipse).
2012-06-01 15:35:29 +02:00
Chris Beams 706da4f7c2 Fix missing spring-instrument jar manifest entry
The spring-intstrument jar should have a 'Premain-Class:' manifest
entry in order to enable use as a Java agent. This entry was present in
versions 3.1.1 and earlier, but due to build infrastructure changes
starting in 3.2.x this entry was missed. It is now back in place as
expected.

Issue: SPR-9458
2012-06-01 09:58:02 +02:00
Chris Beams 94f839329e Increment version to 3.2.0.BUILD-SNAPSHOT 2012-05-28 23:52:17 +03:00
Spring Buildmaster eec2be05af Release version 3.2.0.M1 2012-05-28 13:22:36 -07:00
Chris Beams da2aa3d35c Test pom generation and update optional deps
Gradle-generated poms thoroughly tested against 3.1.1 versions, with an
eye toward making as many spring-* dependencies optional as possible.

All spring-* modules now declare a Gradle dependency on any other
spring-* module where there is a direct compile-time usage of the
sources in that module. Previously, dependency declarations were
minimal, letting transitive resolution do most of the work. However,
this creates less than ideal poms and is generally not very
informative.

So for example, spring-jdbc uses spring-core, spring-beans and
spring-tx classes directly. Therefore it has the following declarations:

  compile project(":spring-core")
  compile project(":spring-beans")
  compile project(":spring-tx")

spring-core depends on spring-asm, but spring-jdbc does not use
spring-asm classes directly. Therefore spring-jdbc does not declare a
dependency on spring-asm. Transitive resolution is fine in such a case.

As for optional dependencies, it is a matter of degrees what
constitutes optional. A rule of thumb is whether there are legitimate
and likely use cases in which the module can be used without needing
the dependency. spring-jdbc has only one compile-time dependency on
spring-context classes, and that's in JndiDataSourceLookup. It is
certainly reasonable to imagine using spring-jdbc without JNDI,
therefore the spring-context dependency is declared optional as
follows:

  compile(project(":spring-context"), optional) // for JndiDataSourceLookup
2012-05-28 18:16:27 +03:00
Chris Beams b5b46156b1 Rename test versions of @Qualified and @Autowired
Avoid Eclipse classpath conflicts between test versions of @Qualified
and @Autowired living in spring-core and actual versions living in
spring-beans.
2012-05-28 15:04:47 +03:00
Chris Beams f582974b0c Update 3.2 M1 changelog 2012-05-28 11:08:41 +03:00
Sam Brannen 155b88ffce Improve dependency management for spring-test
In Spring 3.1 the spring-test Maven artifact did not have a required
dependency on spring-core, but there is practically no part of
spring-test that can be used without spring-core. Most test utilities
that are intended to be stand-alone utilities in fact use utility
classes from spring-core (e.g., ReflectionTestUtils). Even some of the
web mocks/stubs use spring-core (e.g., DelegatingServletInputStream).

In addition, the current Gradle build configuration for the spring-test
module is very simplistic -- in that it does not explicitly list any
optional dependencies such as the Servlet and Portlet APIs -- and it
defines a 'compile' dependency on spring-webmvc-portlet.

The resulting Maven dependencies in the generated POM are therefore not
what a typical consumer of the spring-test artifact would reasonably
expect.

To address these issues, the Gradle build configuration for the
spring-test module now explicitly defines the following 'compile'
dependencies:

 - spring-core
 - spring-webmvc, optional
 - spring-webmvc-portlet, optional
 - junit, optional
 - testng, optional
 - servlet-api, optional
 - jsp-api, optional
 - portlet-api, optional
 - activation, provided

The only required dependency is now spring-core; all other dependencies
are 'optional'.

Issue: SPR-8861
2012-05-28 11:08:41 +03:00
Juergen Hoeller 9b10d38e41 Fix window state comparison in DAHandlerMapping 2012-05-28 11:08:41 +03:00
Juergen Hoeller 08784f3ba9 Apply cache settings consistently in EhCacheFactoryBean
EhCacheFactoryBean now applies listeners and enabled/disabled flags to
existing cache regions as well.

Issue: SPR-9392
2012-05-28 11:08:41 +03:00
Juergen Hoeller 83fa8e12f0 Add initial support for JCache-compliant providers
Issue: SPR-8774
2012-05-28 11:08:40 +03:00
Sam Brannen 86fabb266a Polish CacheOperationSource 2012-05-28 11:08:40 +03:00
Juergen Hoeller 54f82cd540 Polish caching components 2012-05-28 11:08:40 +03:00
Juergen Hoeller 7ea85a959c Fix MultipartResolver Resin compatibility
StandardServletMultipartResolver#cleanupMultipart now takes care to
delete only actual file parts for Resin compatibility.

Issue: SPR-9299
2012-05-28 11:08:40 +03:00
Juergen Hoeller 2c7d2f7063 Handle non-existent files in ServletContextResource
ServletContextResource#getFile now falls back to #getRealPath for
non-existent files

Issue: SPR-8461
2012-05-28 11:08:40 +03:00
Sam Brannen c8e693b878 Polish SmartValidator and SpringValidatorAdapter
- Improve wording & grammar in SmartValidator Javadoc
 - Suppress 'rawtypes' warnings in SpringValidatorAdapter
2012-05-28 11:08:25 +03:00
Chris Beams f75c01d191 Merge branch cbeams/SPR-6870
* SPR-6870:
  Cache by-type lookups in DefaultListableBeanFactory
  Polish
2012-05-27 18:34:27 +03:00
Chris Beams 4c7a1c0a54 Cache by-type lookups in DefaultListableBeanFactory
Prior to this change, by-type lookups using DLBF#getBeanNamesForType
required traversal of all bean definitions within the bean factory
in order to inspect their bean class for assignability to the target
type. These operations are comparatively expensive and when there are a
large number of beans registered within the container coupled with a
large number of by-type lookups at runtime, the performance impact can
be severe. The test introduced here demonstrates such a scenario clearly.

This performance problem is likely to manifest in large Spring-based
applications using non-singleton beans, particularly request-scoped
beans that may be created and wired many thousands of times per second.

This commit introduces a simple ConcurrentHashMap-based caching strategy
for by-type lookups; container-wide assignability checks happen only
once on the first by-type lookup and are afterwards cached by type
with the values in the map being an array of all bean names assignable
to that type. This means that at runtime when creating and autowiring
non-singleton beans, the cost of by-type lookups is reduced to that of
ConcurrentHashMap#get.

Issue: SPR-6870
2012-05-27 18:09:38 +03:00
Chris Beams db1cb13448 Polish
Issue: SPR-6870
2012-05-27 18:08:14 +03:00
Chris Beams f55a4a1ac5 Reduce log level for message re: missing annotation
Previously (since Spring 3.1.1) RecursiveAnnotationAttributesVisitor
logs at level WARN when ASM parsing encounters an annotation or an (enum
used within an annotation) that cannot be classloaded. This is not
necessarily indicative of an error, e.g. JSR-305 annotations such as
@Nonnull may be used only for static analysis purposes, but because
these annotations have runtime retention, they remain present in the
bytecode. Per section 9.6.1.2 of the JLS, "An annotation that is present
in the binary may or may not be available at run-time via the reflective
libraries of the Java platform."

This commit lowers the log level of these messages from warn to debug,
but leaves at warn level other messages dealing with the ability
reflectively read enum values from within annotations.

Issue: SPR-9233
2012-05-27 15:04:42 +03:00
Chris Beams bcd44f3798 Support not (!) operator for profile selection
The following syntax is now supported

  <beans profile="p1,!p2">

  @Profile("p1", "!p2")

indicating that the <beans> element or annotated component should
be processed only if profile 'p1' is active or profile 'p2' is not
active.

Issue: SPR-8728
2012-05-27 10:18:11 +03:00
Chris Beams e72c49f4cf Merge branch cbeams/SPR-9439
* SPR-9439:
  Introduce ConfigurableWebEnvironment
  Introduce ConfigurableEnvironment#merge
  Polish
2012-05-26 14:39:53 +03:00
Chris Beams 2a2b6eef91 Introduce ConfigurableWebEnvironment
Changes introduced in Spring 3.1 for Environment support inadvertently
established a cyclic dependency between the
org.springframework.web.context and
org.springframework.web.context.support packages, specifically through
web.context.ContextLoader's invocation of
web.context.support.WebApplicationContextUtils#initServletPropertySources.

This commit introduces ConfigurableWebEnvironment to break this cyclic
dependency. All web.context.ConfigurableWebApplicationContext types now
return web.context.ConfigurableWebEnvironment from their #getEnvironment
methods; web.context.support.StandardServletEnvironment now implements
ConfigurableWebEnvironment and makes the call to
web.context.support.WebApplicationContextUtils#initServletPropertySources
within its implementation of #initPropertySources. This means that
web.context.ContextLoader now invokes
web.context.ConfigurableWebEnvironment#initPropertySources instead of
web.context.support.WebApplicationContextUtils#initServletPropertySources
and thus the cycle is broken.

Issue: SPR-9439
2012-05-26 14:35:57 +03:00
Chris Beams 9fcfd7e827 Introduce ConfigurableEnvironment#merge
Prior to this change, AbstractApplicationContext#setParent replaced the
child context's Environment with the parent's Environment if available.
This has the negative effect of potentially changing the type of the
child context's Environment, and in any case causes property sources
added directly against the child environment to be ignored. This
situation could easily occur if a WebApplicationContext child had a
non-web ApplicationContext set as its parent. In this case the parent
Environment type would (likely) be StandardEnvironment, while the child
Environment type would (likely) be StandardServletEnvironment. By
directly inheriting the parent environment, critical property sources
such as ServletContextPropertySource are lost entirely.

This commit introduces the concept of merging an environment through
the new ConfigurableEnvironment#merge method. Instead of replacing the
child's environment with the parent's,
AbstractApplicationContext#setParent now merges property sources as
well as active and default profile names from the parent into the
child. In this way, distinct environment objects are maintained with
specific types and property sources preserved. See #merge Javadoc for
additional details.

Issue: SPR-9444, SPR-9439
2012-05-26 14:33:53 +03:00
Chris Beams 5874383ef0 Polish
Issue: SPR-9439
2012-05-26 14:33:52 +03:00
Chris Beams 5327a7a37d Fix package cycle in @EnableSpringConfigured
@EnableSpringConfigured and its @Import'ed
SpringConfiguredConfiguration @Configuration class inadvertently
established a package cycle between beans.factory.aspectj and
context.annotation due to SpringConfiguredConfiguration's
dependency on annotations such as @Configuration, @Bean and @Role.

This commit fixes this architecture bug by moving
@EnableSpringConfigured and SpringConfiguredConfiguration from the
beans.factory.aspectj package to the context.annotation package where
they belong.

This change is assumed to be very low impact as @EnableSpringConfigured
was introduced in 3.1.0 and relocation is happening as quickly as
possible in 3.1.2. @EnableSpringConfigured is assumed to be infrequently
used at this point, and for those that are the migration path
is straightforward. When upgrading from Spring 3.1.0 or 3.1.1, update
import statements in any affected @Configuration classes to reflect the
new packaging.

Issue: SPR-9441
2012-05-26 14:23:11 +03:00
Chris Beams a4b00c732b Introduce BeanFactoryAnnotationUtils
Commit 096693c46f refactored and
deprecated TransactionAspectUtils, moving its #qualifiedBeanOfType
and related methods into BeanFactoryUtils. This created a package cycle
between beans.factory and beans.factory.annotation due to use of the
beans.factory.annotation.Qualifier annotation in these methods.

This commit breaks the package cycle by introducing
beans.factory.annotation.BeanFactoryAnnotationUtils and moving these
@Qualifier-related methods to it. It is intentionally similar in name
and style to the familiar BeanFactoryUtils class for purposes of
discoverability.

There are no backward-compatibilty concerns associated with this change
as the cycle was introduced, caught and now fixed before a release.

Issue: SPR-6847
2012-05-26 14:22:57 +03:00
Rossen Stoyanchev 4027b38903 Merge rather than add URI vars to data binding values
As of Spring 3.1 URI variables can be used for data binding purposes in
addition to request parameters (including query string and form params)

In some cases URI variables and request params can overlap (e.g. form
contains a child entity with an entityId as hidden form input while the
URI contains the entityId of the parent entity) and that can lead to
surprises if the application already exists.

This change ensures that request parameters are used first and URI
vars are added only if they don't overlap. Ideally however an
application should not use the same uri variable name as the name of
a request parameter where they don't refer to the same value.

Issue: SPR-9349
2012-05-23 18:50:43 -04:00
Chris Beams 5330c52ebf Merge branch cbeams/SPR-7022
* SPR-7022:
  Support initial delay attribute for scheduled tasks
  Polish scheduled task execution infrastructure
2012-05-22 17:48:17 +03:00
Chris Beams 53673d6c59 Support initial delay attribute for scheduled tasks
java.util.concurrent's ScheduledExecutorService and its #schedule*
methods allow for an 'initialDelay' parameter in milliseconds.
Similarly, Spring's TaskExecutor abstraction allows for a concrete
'startTime' expressed as a Date. However, Spring's <task:scheduled> XML
element and @Scheduled annotation have, to date, not allowed for an
initial delay parameter that can be propagated down to the underlying
TaskScheduler/ScheduledExecutorService.

This commit introduces initial-delay and #initialDelay attributes to
task:scheduled and @Scheduled respectively, both indicating the number
of milliseconds to wait before the first invocation of the method in
question. Specifying a delay in this fashion is only valid in
conjunction with fixed-rate and fixed-delay tasks (i.e. not with cron
or trigger tasks).

The principal changes required to support these new attributes lie in
ScheduledTaskRegistrar, which previously supported registration of
tasks in the form of a Runnable and a Long parameter indicating (in the
case of fixed-rate and fixed-delay tasks), the interval with which the
task should be executed. In order to accommodate a third (and optional)
'initialDelay' parameter, the IntervalTask class has been added as a
holder for the Runnable to be executed, the interval in which to run
it, and the optional initial delay. For symmetry, a TriggerTask and
CronTask have also been added, the latter subclassing the former. And a
'Task' class has been added as a common ancestor for all the above.

One oddity of the implementation is in the naming of the new
setters in ScheduledTaskRegistrar. Prior to this commit, the setters
were named #setFixedDelayTasks, #setFixedRateTasks, etc, each accepting
a Map<Runnable, long>. In adding new setters for each task type, each
accepting a List<IntervalTask>, List<CronTask> etc, naturally the
approach would be to use method overloading and to introduce methods
of the same name but with differing parameter types. Unfortunately
however, Spring does not support injection against overloaded methods
(due to fundamental limitations of the underlying JDK Introspector).
This is not a problem when working with the ScheduledTaskRegistrar
directly, e.g. from within a @Configuration class that implements
SchedulingConfigurer, but is a problem from the point of view of the
ScheduledTasksBeanDefinitionParser which parses the <task:scheduled>
element - here the ScheduledTaskRegistrar is treated as a Spring bean
and is thus subject to these limitations. The solution to this problem
was simply to avoid overloading altogether, thus the naming of the new
methods ending in "List", e.g. #setFixedDelayTasksList, etc. These
methods exist primarily for use by the BeanDefinitionParser and are
not really intended for use by application developers. The Javadoc for
each of the new methods makes note of this.

Issue: SPR-7022
2012-05-22 17:48:00 +03:00
Chris Beams 4d5fe57a08 Polish scheduled task execution infrastructure
In anticipation of substantive changes required to implement "initial
delay" support in the <task:scheduled> element and @Scheduled
annotation, the following updates have been made to the components and
infrastructure supporting scheduled task execution:

 - Fix code style violations
 - Fix compiler warnings
 - Add Javadoc where missing, update to use {@code} tags, etc.
 - Organize imports to follow conventions
2012-05-22 17:47:43 +03:00
Chris Beams e2fbaa8470 Merge pull request #62 from poutsma/SPR-9300
* SPR-9300:
  Add convenient WebAppInitializer base classes
2012-05-22 17:44:25 +03:00
Arjen Poutsma f64c13ad2e Add convenient WebAppInitializer base classes
This commit introduces three abstract WebApplicationInitializers, to be
used in the typical setup of a Spring-based web application.

 - AbstractContextLoaderInitializer provides an abstract base class for
   registering a ContextLoaderListener.

 - AbstractDispatcherServletInitializer provides an abstract base class
   for registering a DispatcherServlet, with an optional root context.

 - AbstractAnnotationConfigDispatcherServletInitializer provides an
   abstract base class for registering a DispatcherServlet and optional
   ContextLoaderListener based on annotated (e.g. @Configuration)
   classes.

Issue: SPR-9300
2012-05-22 17:31:55 +03:00
Chris Beams 37e024c6eb Test meta-@Async executor qualification
Prove that Async#value is respected even when using @Async as a meta
annotation.

Issue: SPR-6847
2012-05-20 19:44:06 +03:00
Chris Beams 1d06001359 Merge branch cbeams/SPR-6847
* SPR-6847:
  Support executor qualification with @Async#value
  Polish async method execution infrastructure
  Refactor and deprecate TransactionAspectUtils
2012-05-20 15:20:54 +03:00
Chris Beams ed0576c181 Support executor qualification with @Async#value
Prior to this change, Spring's @Async annotation support was tied to a
single AsyncTaskExecutor bean, meaning that all methods marked with
@Async were forced to use the same executor. This is an undesirable
limitation, given that certain methods may have different priorities,
etc. This leads to the need to (optionally) qualify which executor
should handle each method.

This is similar to the way that Spring's @Transactional annotation was
originally tied to a single PlatformTransactionManager, but in Spring
3.0 was enhanced to allow for a qualifier via the #value attribute, e.g.

  @Transactional("ptm1")
  public void m() { ... }

where "ptm1" is either the name of a PlatformTransactionManager bean or
a qualifier value associated with a PlatformTransactionManager bean,
e.g. via the <qualifier> element in XML or the @Qualifier annotation.

This commit introduces the same approach to @Async and its relationship
to underlying executor beans. As always, the following syntax remains
supported

  @Async
  public void m() { ... }

indicating that calls to #m will be delegated to the "default" executor,
i.e. the executor provided to

  <task:annotation-driven executor="..."/>

or the executor specified when authoring a @Configuration class that
implements AsyncConfigurer and its #getAsyncExecutor method.

However, it now also possible to qualify which executor should be used
on a method-by-method basis, e.g.

  @Async("e1")
  public void m() { ... }

indicating that calls to #m will be delegated to the executor bean
named or otherwise qualified as "e1". Unlike the default executor
which is specified up front at configuration time as described above,
the "e1" executor bean is looked up within the container on the first
execution of #m and then cached in association with that method for the
lifetime of the container.

Class-level use of Async#value behaves as expected, indicating that all
methods within the annotated class should be executed with the named
executor. In the case of both method- and class-level annotations, any
method-level #value overrides any class level #value.

This commit introduces the following major changes:

 - Add @Async#value attribute for executor qualification

 - Introduce AsyncExecutionAspectSupport as a common base class for
   both MethodInterceptor- and AspectJ-based async aspects. This base
   class provides common structure for specifying the default executor
   (#setExecutor) as well as logic for determining (and caching) which
   executor should execute a given method (#determineAsyncExecutor) and
   an abstract method to allow subclasses to provide specific strategies
   for executor qualification (#getExecutorQualifier).

 - Introduce AnnotationAsyncExecutionInterceptor as a specialization of
   the existing AsyncExecutionInterceptor to allow for introspection of
   the @Async annotation and its #value attribute for a given method.
   Note that this new subclass was necessary for packaging reasons -
   the original AsyncExecutionInterceptor lives in
   org.springframework.aop and therefore does not have visibility to
   the @Async annotation in org.springframework.scheduling.annotation.
   This new subclass replaces usage of AsyncExecutionInterceptor
   throughout the framework, though the latter remains usable and
   undeprecated for compatibility with any existing third-party
   extensions.

 - Add documentation to spring-task-3.2.xsd and reference manual
   explaining @Async executor qualification

 - Add tests covering all new functionality

Note that the public API of all affected components remains backward-
compatible.

Issue: SPR-6847
2012-05-20 15:18:10 +03:00
Chris Beams 3fb11870d9 Polish async method execution infrastructure
In anticipation of substantive changes required to implement @Async
executor qualification, the following updates have been made to the
components and infrastructure supporting @Async functionality:

 - Fix trailing whitespace and indentation errors
 - Fix generics warnings
 - Add Javadoc where missing, update to use {@code} tags, etc.
 - Avoid NPE in AopUtils#canApply
 - Organize imports to follow conventions
 - Remove System.out.println statements from tests
 - Correct various punctuation and grammar problems
2012-05-20 15:17:28 +03:00
Chris Beams 096693c46f Refactor and deprecate TransactionAspectUtils
TransactionAspectUtils contains a number of methods useful in
retrieving a bean by type+qualifier. These methods are functionally
general-purpose save for the hard coding of PlatformTransactionManager
class literals throughout.

This commit generifies these methods and moves them into
BeanFactoryUtils primarily in anticipation of their use by async method
execution interceptors and aspects when performing lookups for qualified
executor beans e.g. via @Async("qualifier").

The public API of TransactionAspectUtils remains backward compatible;
all methods within have been deprecated, and all calls to those methods
throughout the framework refactored to use the new BeanFactoryUtils
variants instead.
2012-05-20 15:15:13 +03:00
Sam Brannen e71cd06a46 Doc. usage of JSR-250 lifecycle annotations in TCF
The reference manual previously did not mention the applicability of
JSR-250 lifecycle annotations within the TestContext framework. The
lacking documentation here has lead to misunderstandings of the support
provided for @PostConstruct and @PreDestroy in test classes.

The testing chapter of the reference manual has therefore been updated
to explicitly define the limited support for these annotations.

Also introduced Jsr250LifecycleTests for empirical verification of the 
expected behavior.

Issue: SPR-4868
2012-05-19 04:03:40 +02:00
Rossen Stoyanchev 03d6350e4b Fix issue with resolution of WebDataBinder argument
There is usually not need to put annotations on a WebDataBinder
argument in an `@InitBinder` method. However, the presence of any
annotation prevented the successful resolution of the argument.
This fix addresses the issue.

Issue: SPR-8946
2012-05-18 18:35:49 -04:00
Sam Brannen 5cd6543d83 Update @Bean Javadoc re: 'lite' mode, scope, etc.
Updated the "@Bean Lite Mode" section in order to properly document 
scoping and lifecycle semantics.

Also fleshed out the discussion of the non-applicability of 'inter-bean 
references' in lite mode.

Issue: SPR-9425
2012-05-19 00:05:29 +02:00
Sam Brannen dc6b2abe46 Verify scope support for 'lite' @Beans in the TCF
Introduced AtBeanLiteModeScopeTests integration tests to verify proper 
scoping of beans created in 'lite' mode.

Updated comments in TACCWithoutACTests to better reflect the runtime 
behavior for 'lite' @Bean methods.

Issue: SPR-9401
2012-05-18 21:54:17 +02:00
Sam Brannen 49966258f1 Polish doc for 'annotated class' support in TCF
Revised the content in the @ContextConfiguration annotation section.

Issue: SPR-9401
2012-05-18 17:15:38 +02:00
Chris Beams 6a01ca6d35 Merge branch garyrussell/SPR-9249
* SPR-9249:
  Add value-type attrib to beans->map->entry element
2012-05-18 14:48:39 +03:00
Gary Russell 183ac0c1ff Add value-type attrib to beans->map->entry element
Previously, the <value> subelement of a map <entry> allowed one to
specify the type of a specific map entry value. This patch allows a
value-type attribute as well, such that instead of the following
syntax

    <entry key="x-message-ttl">
        <value type="java.lang.Long">100</value>
    </entry>
    <entry key="x-ha-policy" value="all" />

one can now use the more concise form

    <entry key="x-message-ttl" value="100" value-type="java.lang.Long"/>
    <entry key="x-ha-policy" value="all"/>

The new value-type attribute may be used at the <map> level as well,
indicating that all elements are of the same type.

Appropriate tests have been added exercising value-type at the <map> and
<entry> levels.

Issue: SPR-9249
2012-05-18 14:43:28 +03:00
Chris Beams f3bcb6e2e4 Update spring.schemas to reflect 3.2 schemas
Commit 180c5b2ef6 introduced 3.2 versions
of all spring-* schemas; this commit updates spring.schemas mapping
files to include these new versions.
2012-05-18 14:31:33 +03:00
Sam Brannen 504cdf498e Update documentation of 'annotated class' support in the TCF
Updated the testing chapter of the reference manual to refer to 
'annotated classes' instead of 'configuration classes' where 
appropriate.

Also revised the content and examples in the @ContextConfiguration 
annotation section, mentioned Gradle, and reformatted the entire text.

Issue: SPR-9401
2012-05-18 04:33:40 +02:00
Sam Brannen 09d98fd3ae Delete superfluous fail() invocations in RequestResponseBodyMethodProcessorTests
Several test methods in RequestResponseBodyMethodProcessorTests
are currently annotated with @Test(expected=…) and additionally contain:

    fail("Expected exception");

This combination is superfluous, and the unnecessary fail() invocations
have therefore been removed.
2012-05-18 03:10:13 +02:00
Rossen Stoyanchev 77ae101402 Add required flag to @RequestBody
If true and there is no body => HttpMessageNotReadableException
If false and there is no body, the argument resolves to null.

Issue: SPR-9239
2012-05-17 17:48:48 -04:00
Rossen Stoyanchev 0105c5ebb9 Decode path vars in pre-3.1 @MVC support clases too
See the commit comments for:
https://github.com/SpringSource/spring-framework/commit/57307a0b2e5bce8f70d5deddf8df11d034dc8c5a

This commit also applies the change to pre-3.1 `@MVC` suppor classes.

Issue: SPR-6951
2012-05-17 16:35:55 -04:00
Rossen Stoyanchev 57307a0b2e Decode path vars when url decoding is turned off
When URL decoding is turned off in AbstractHandlerMapping, the
extracted path variables are also not encoded. Turning off URL decoding
may be necessary for request mapping to work correctly when the path
may contain the (encoded) special character '/'. At the same time there
is no good reason not to leave path variables encoded. This change
ensures path variables are encoded when URL decoding is turned off.

Issue: SPR-9098
2012-05-17 16:01:20 -04:00
Sam Brannen 36e7cb2d31 Improve documentation of annotated class support in the TCF
Updated all Javadoc in the Spring TestContext Framework (TCF) to explain
and refer to 'annotated classes' instead of 'configuration classes'.

Specifically, @ContextConfiguration now explicitly defines what is meant
by 'annotated classes', and various other classes now refer to this
definition. Otherwise, the term 'configuration class' has simply been
replaced with 'annotated class'.

Also deleted cross references to deprecated JUnit 3.8 classes and
formatted Javadoc in general for greater readability.

Issue: SPR-9401
2012-05-17 20:17:48 +02:00
Sam Brannen 59e3223c84 Polish recent changes to Log4jWebConfigurer
Reordered inline comments so that they now apply to current
state of the code.

Added logger entry in testlog4j.properties to avoid console
warning.

Issue: SPR-9417
2012-05-17 18:05:38 +02:00
Chris Beams 98bf01adfb Merge pull request #42 from sslavic/SPR-5369
* SPR-5369:
  Fix circular placeholder prevention
2012-05-17 14:50:41 +03:00
Stevo Slavic 18006c72b0 Fix circular placeholder prevention
A set of resolved placeholder references is used for circular
placeholder prevention. For complex property definitions this mechanism
would put property values with unresolved inner placeholder references
in the set, but would try to remove property values with placeholders
resolved, leaving the set in an invalid state and the mechanism broken.

This fix makes sure that the value that is put in the set is same one
that is removed from it, and by doing so avoids false positives in
reporting circular placeholders.

Issue: SPR-5369
2012-05-17 14:48:18 +03:00
Chris Beams f667db56b1 Merge pull request #34 from marschall/warnings
* warnings:
  Fix compiler warnings
2012-05-17 14:38:49 +03:00
Philippe Marschall 13239a0c3d Fix compiler warnings
This patch fixes several compiler warnings that do not point to code
problems. Two kinds of warnings are fixed. First in a lot of cases
@SuppressWarnings("unchecked") is used although there are no unchecked
casts happening. This seems to be a leftover from when the code base
was on Java 1.4, now that the code base was moved to Java 1.5 these are
no longer necessary. Secondly there some places where the raw types of
List and Class are used where there wildcard types (List<?> and
Class<?>) would work just as well without causing any raw type warnings.

These changes are beneficial particularly when working in Eclipse or
other IDEs because it reduces 'noise', helping to isolate actual
potential problems in the code.

The following changes have been made:

 - remove @SuppressWarnings where no longer needed

 - use wildcard types instead of raw types where possible
2012-05-17 14:32:34 +03:00
Chris Beams e68b563626 Merge pull request #53 from aclement/SPR-9203
* SPR-9203:
  Eliminate trailing whitespace in SpEL classes
  Support [] array ref syntax in SpEL T() construct
2012-05-17 13:46:16 +03:00
Chris Beams de2d808212 Eliminate trailing whitespace in SpEL classes 2012-05-17 13:46:00 +03:00
Andy Clement 916e9d6efa Support [] array ref syntax in SpEL T() construct
Prior to this change, SpEL would not allow the use of '[]' in
expressions like the following:

    T(foo.Bar[])

This commit updates TypeReference and InternalSpelExpressionParser to
support this syntax, avoiding the need for workarounds like:

    new foo.bar[0].class

Issue: SPR-9203
2012-05-17 13:45:30 +03:00
Chris Beams 0e8f5d877a Merge pull request #57 from sslavic/SPR-8278
* SPR-8278:
  Fix compiler warnings in Constants/ConstantsTests
  Allow null params as advertised in Constants#toCode*
2012-05-17 13:00:26 +03:00
Chris Beams 1f4b33c4ad Fix compiler warnings in Constants/ConstantsTests 2012-05-17 12:59:21 +03:00
Stevo Slavic 6ffb0436fa Allow null params as advertised in Constants#toCode*
Even though the Javadoc for Constants#toCode and #toCodeForSuffix
specifies that a null value for the 'namePrefix' and 'nameSuffix'
parameters are respectively allowed, before this change passing a null
to either would result in a NullPointerException.

This change fixes constant name lookup for null values of these params
as if an empty string had been passed instead. This way of handling a
null value is consistent with the rest of Constants class API.

Issue: SPR-8278
2012-05-17 12:53:32 +03:00
Chris Beams 95e99fe2a3 Merge pull request #59 from sslavic/SPR-8360
* SPR-8360:
  Fix JibxMarshallerTests failing on Windows
2012-05-17 10:54:56 +03:00
Stevo Slavic 51ae6845ad Fix JibxMarshallerTests failing on Windows
Before this change JibxMarshallerTests would fail on Windows with an
error message explaining that JiBX compiler generated classes are not
found on the classpath for binding with name 'binding'. Tests would
execute well on Linux and OS X.

Actual root cause of this bug is found to be in JiBX 1.1.5 release that
is used to build Spring. The binding name can be explicitly specified in
JiBX binding file. If omitted, when generating classes the JiBX compiler
as fall-back mechanism tries to derive the binding name from the binding
file name. That logic had a bug which gets manifested when configured
binding file path has mixed Windows and *nix style file separators, as
in case of JibxMarshallerTests being executed on a Windows platform.

This commit resolves this issue by upgrading Spring's build from JiBX
1.1.5 to 1.2.3, as the bug mentioned was fixed in JiBX 1.2. See JIBX-441
for more details.

Issue: SPR-8360
2012-05-17 10:53:42 +03:00
Chris Beams 0ca11d2296 Merge pull request #49 from sslavic/SPR-9123
* SPR-9123:
  Fix SpEL JavaBean compliance
2012-05-17 10:28:39 +03:00
Stevo Slavic 1f28bdfbfa Fix SpEL JavaBean compliance
Before this fix ReflectivePropertyAccessor was not able to find write
method for valid property name that has first character in lower case
and second character in upper case. Write method lookup would always
convert first character of property name to upper case which is not
compliant with JavaBean specification. As consequence this caused an
unwanted behavior in SpEL when obtaining values of expressions that
reference such JavaBean properties.

As of this change, write method lookup skips conversion of property
name first character to upper case when property name is longer than
one character and second character is in upper case. This also fixes
mentioned bug in SpEL value resolution.

Issue: SPR-9123
2012-05-17 10:27:52 +03:00
Chris Beams 2503b7eb89 Fix property replacement bug in Log4jWebConfigurer
Previously, if the resolution of a ${...} placeholder resulted in a
valid URL for the location of a log4j properties/XML file, the URL
would ultimately be malformed by an unnecessary call to to
WebUtils#getRealPath.

The implementation of Log4jWebConfigurer#initLogging now eagerly
attempts SystemPropertyUtils#resolvePlaceholders before checking to see
if the location is a valid URL, and bypassing the call to
WebUtils#getRealPath if so.

Issue: SPR-9417
2012-05-17 10:11:46 +03:00
Chris Beams f1246a4317 Fix locale parsing error with en_en, tr_tr, etc
Previously, StringUtils#parseLocaleString would parse locale strings
having the same lowercase token for both language and country
incorrectly, e.g. 'tr_tr' would parse to 'tr_TR_tr' as opposed to the
expected 'tr_TR'.

This commit fixes this behavior by using using String#lastIndexOf
instead of String#indexOf when determining the location of the country
code token.

Issue: SPR-9420
2012-05-17 09:42:42 +03:00
Sam Brannen e8f8559a2e Improve documentation of @Bean 'lite' mode
Removed misleading mention of "configuration classes" in the
"@Bean Lite Mode" section.

Issue: SPR-9401
2012-05-17 00:47:07 +02:00
Sam Brannen 94c9f96449 Improve documentation of @Bean 'lite' mode
Updated the class-level JavaDoc for @Bean to better explain the
semantics of 'lite' mode.

Renamed "Configuration Class Lite Mode" to "@Bean Lite Mode".

Added discussion of @DependsOn to the class-level JavaDoc.

Issue: SPR-9401
2012-05-17 00:32:36 +02:00
Chris Beams dfd2b77b8a Merge pull request #81 from JanecekPetr/SPR-9342
* SPR-9342:
  Fix annotation search ending too early
2012-05-17 00:46:55 +03:00
Petr Janecek ef7e728bb8 Fix annotation search ending too early
In AnnotationUtils#findAnnotation(Method, Class), the search for a
method annotation fails if:

 - the original method does not have the annotation

 - an abstract superclass does not have an equivalent method declared

 - an interface implemented by the superclass has the method and
   the annotation -> this should be found, but is not!

This happens because the try-catch block in #findAnnotation is too wide:
cl.getDeclaredMethod() can throw NoSuchMethodException and skip the
'#searchOnInterfaces' call prematurely.

The try-catch block was made narrower to allow #searchOnInterfaces to
be called even if the abstract class does not have the method declared
at all.

Issue: SPR-9342
2012-05-17 00:45:21 +03:00
Sam Brannen 6023b2060b Fix minor grammatical errors in AbstractBeanDefinition 2012-05-16 23:09:49 +02:00
Sam Brannen 98050268c5 Improve documentation for configuration class 'lite' mode
Overhauled the class-level JavaDoc in @Bean:

 - added h3 headers for greater clarity and readability
 - mentioned 'prototype' semantics for lite mode

Issue: SPR-9401
2012-05-16 23:08:06 +02:00
Rossen Stoyanchev cf5d55173b Pattern suffix issue in AnnotationMethodHandlerAdapter
SPR-9333
2012-05-16 13:22:50 -04:00
Chris Beams ae216fbbb5 Merge pull request #63 from dukehoops/SPR-9298
* SPR-9298:
  Cache MethodParameter annotation lookup results
2012-05-16 16:39:10 +03:00
Nikita Tovstoles c10d63dc01 Cache MethodParameter annotation lookup results
Prior to this change, Spring's MethodParameter#getParameterAnnotations
called java.lang.Method#getParameterAnnotations on every invocation.
The latter ends up contending for a monitor inside (Sun) JDK code. This
is problematic when dealing with the high number of @RequestMapping
invocations that can occur in a Spring MVC @Controller.

This commit eliminates this contention by caching values returned by
java.lang.Method#getParameterAnnotations in a static ConcurrentMap.

Note that only Method parameter annotations are cached, while
Constructor parameter annotations are not. This is because the
issue of primary concern is, as mentioned above, @RequestMapping
methods. By nature, constructors are called much more infrequently, and
in most cases in a single-threaded fashion.

Issue: SPR-9298
2012-05-16 16:22:38 +03:00
Chris Beams 39f74b2374 Merge pull request #37 from marschall/small-memory-fixes
* small-memory-fixes:
  Optimize memory usage in factory *Metadata classes
2012-05-16 13:06:03 +03:00
Philippe Marschall cdb6d7447e Optimize memory usage in factory *Metadata classes
InjectionMetadata and LifecycleMetadata can end up having mostly empty
instance variables. In such cases memory usage can be improved a little
bit.

This patch addresses this in two ways:

 - Creating a LinkedHashSet of the "right" size, the default capacity
   is 16 but the exact capacity needed is known in advance.

 - If the argument is empty then use Collections#emptySet which is a
   constant so no additional memory is used. Since it's immutable there
   is no need for the Collections#synchronizedSet wrapper.

Issue: SPR-9264
2012-05-16 13:01:08 +03:00
Chris Beams 46bdb2de07 Merge pull request #64 from marschall/SPR-9316
* SPR-9316:
  Avoid NPE in AutowiredAnnotationBeanPostProcessor
2012-05-16 11:48:07 +03:00
Philippe Marschall 2624b90906 Avoid NPE in AutowiredAnnotationBeanPostProcessor
Prior to this change, AABPP#determineRequiredStatus never checked the
return value of ReflectionUtils#findMethod when searching for a
'#required' attribute. This call returns null for annotations such as
@Inject, @Value and @Resource, and subsequently causes a
NullPointerException to be thrown when ReflectionUtils#invokeMethod is
called. The NPE is caught immediately and #determineRequiredStatus
returns defaulting to true, but this this approach is inefficient. It
is also problematic for users who have set breakpoints on NPE -- they
end up debugging into Spring internals, which is a false positive.

This commit checks the return value of of ReflectionUtils#findMethod,
and in the case of null, eagerly returns true.  There is no change to
external behavior, simply a more efficient and debugging-friendly
implementation.

Existing test cases already cover this change, given that it is purely
a refactoring.

Issue: SPR-9316
2012-05-16 11:39:43 +03:00
Sam Brannen b50f6e19a6 Fix regression in ClassPathResource descriptions
ClassPathResource.getDescription() now returns consistent, meaningful
results for all variants of ClassPathResource's constructors.

Issue: SPR-9413
2012-05-16 04:24:53 +02:00
Sam Brannen 500a4dd995 Fix tx annotated tests so that they pass in the build
AbstractTransactionalAnnotatedConfigClassTests is now annotated with
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD) so 
that side-effects between tests are avoided.

Re-enabled TransactionalAnnotatedConfigClassWithAtConfigurationTests
and TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests.

Also introduced a log4j FileAppender for tests that writes to
"build/spring-test.log".

Issue: SPR-9051
2012-05-16 03:08:15 +02:00
Rossen Stoyanchev 01a9dd9772 Add option to set Content-Length in JSON Views
MappingJackson2JsonView and MappingJacksonJsonView now provide an
option that will set the Content-Length header of JSON responses.
Use of the option implies buffering of the response and it must be
enabled explicitly.

Issue: SPR-7866
2012-05-15 18:10:24 -04:00
Sam Brannen 2017b24867 Disable tx annotated tests until working within the build
Issue: SPR-9051
2012-05-15 23:45:49 +02:00
Rossen Stoyanchev 2af294ab26 Add MessageCodesResolver hook to WebMvcConfigurer
This change makes it possible to provide a custom MessageCodesResolver
through the MVC Java config whether using @EnableWebMvc and extending
WebMVcConfigurerAdapter or sub-classing directly from
WebMvcConfigurationSupport.

Issue: SPR-9223
2012-05-15 17:11:28 -04:00
Sam Brannen 1cec0f9c65 Investigate claims made in SPR-9051 regarding transactional tests
The claim: given an integration test class that is annotated with 
@ContextConfiguration and declares a configuration class that is missing

an @Configuration annotation, if a transactional test method (i.e., one 
annotated with @Transactional) changes the state of the database then
the 
changes will not be rolled back as would be expected with the default 
rollback semantics of the Spring TestContext Framework (TCF).

TransactionalAnnotatedConfigClassWithAtConfigurationTests is a concrete 
implementation of AbstractTransactionalAnnotatedConfigClassTests that
uses 
a true @Configuration class and thereby demonstrates the expected
behavior 
of such transactional tests with automatic rollback.

TransactionalAnnotatedConfigClassesWithoutAtConfigurationTests is a 
concrete implementation of
AbstractTransactionalAnnotatedConfigClassTests 
that does NOT use a true @Configuration class but rather a 'lite mode'
configuration class (see the Javadoc for @Bean for details).

Using such a 'lite mode' configuration class results in the following:

 - Its @Bean methods act as factory methods instead of singleton beans.
 - The dataSource() method is invoked multiple times instead of once.
 - The test instance and the TCF operate on different data sources.
 - The transaction managed (and rolled back) by the TCF is not the 
   transaction that the application code or test instance uses.

Ultimately, the use of a 'lite mode' configuration class gives the false
appearance that there is a bug in the TCF (in that the transaction is
not 
rolled back); however, the transaction managed by the TCF is in fact 
rolled back.

In conclusion, these tests demonstrate both the intended behavior of the

TCF and the fact that using 'lite mode' configuration classes can lead
to 
confusing results (both in tests and production code).

Issue: SPR-9051
2012-05-15 23:04:31 +02:00
Chris Beams 9c223c1780 Fix broken link to JavaBean customization tutorial
Issue: SPR-9408
2012-05-15 22:51:46 +03:00
Chris Beams 19aceebb96 Fix broken javadoc link to ROME tools project
Issue: SPR-9379
2012-05-15 22:51:46 +03:00
Chris Beams 2db4e15f0e Translate SQLTimeoutException to QueryTimeoutException
SPR-7680 added QueryTimeoutException to Spring's DataAccessException
hierarchy, but did not integrate it into the
SQLExceptionSubclassTranslator; it was added mainly to accomodate users
defining their own custom exception translators.

However, it does make sense to translate any SQLTimeoutException to this
new QueryTimeoutException type, and this commit makes that change. It
does represent a slight backward-incompatibility, given that
QueryTimeoutException extends TransientDataAccessException, whereas
SQLExceptionSubclassTranslator previously returned the more specific
TransientDataAccessResourceException for any SQLTimeoutException.

It is expected that this incompatibily will be very low-impact, i.e. not
affecting many (if any) users. In any case, a major release (Spring 3.2)
is the right time to introduce such a change, and the migration path is
straightforward: any users depending on catching
TransientDataAccessResourceException in the case of query timeouts
should update those catch blocks to expect QueryTimeoutException
instead. Care should also be taken to ensure correctness of existing
catch blocks expecting TransientDataAccessException, as these blocks
will now catch QueryTimeoutException as well.

Issue: SPR-9376, SPR-7680
2012-05-15 22:51:45 +03:00
Chris Beams 2ff43726be Restore serializability of HttpStatusCodeException
SPR-7591 introduced a java.nio.charset.Charset field within
HttpStatusCodeException. The former is non-serializable, thus by
extension the latter also became non-serializable.

Because the Charset field is only used for outputting the charset name
in HttpStatusCodeException#getResponseBodyAsString, it is reasonable to
store the value returned by Charset#name() instead of the actual Charset
object itself.

This commit refactors HttpStatusCodeException's responseCharset field to
be of type String instead of Charset and adds tests to prove that
HttpStatusCodeException objects are once again serializable as expected.

Issue: SPR-9273, SPR-7591
2012-05-15 22:51:45 +03:00
Chris Beams 9a856c09f3 Clarify @EnableScheduling javadoc
It is now advised that destroyMethod="shutdown" should be used
on @Bean methods returning an ExecutorService.

Issue: SPR-9280
2012-05-15 22:51:45 +03:00
Chris Beams 283c1b9c53 Upgrade to Gradle 1.0-rc-3
Issue: SPR-9411
2012-05-15 22:51:45 +03:00
Sam Brannen b67a08cfd7 Fix typo in Javadoc and emphasize @Configuration 'lite' mode 2012-05-15 20:36:41 +02:00
Rossen Stoyanchev bdc3599d3d Add CompositeRequestCondition
The new type makes it easier providing multiple custom request mapping
conditions via setters on RequestMappingHandlerMapping.

Issue: SPR-9350
2012-05-15 13:16:06 -04:00
Rossen Stoyanchev fbb2103e4d Add "excludedExceptions" to SimpleUrlHandlerMapping
The new property can be used to ignore specific exceptions that may
otherwise be matched by the "exceptionMappings" property or resolved
through the defaultErrorView.

Issue: SPR-5193
2012-05-15 13:16:06 -04:00
Sam Brannen 1167155182 Update reference manual regarding upgrade to JUnit 4.10 2012-05-15 14:40:13 +02:00
Sam Brannen 50d4ebcc71 Fix typo in section id 2012-05-15 14:25:10 +02:00
Chris Beams 347e8dfc86 Merge pull request #79 from olivergierke/SPR-9346
* SPR-9346:
  Add missing section ids in reference documentation
2012-05-15 13:26:05 +03:00
Oliver Gierke 2a75c57d3c Add missing section ids in reference documentation
Add missing id attributes to <section> elements in the reference
documentation to ensure stable anchor links in HTML output.

Issue: SPR-9346
2012-05-15 13:23:32 +03:00
Rossen Stoyanchev 1d0e484eac Support access to all URI vars via @PathVariable Map
Issue: SPR-9289
2012-05-14 16:01:16 -04:00
Rossen Stoyanchev 698d004260 Deprecate HttpStatus codes 419, 420, 421
Issue: SPR-7942
2012-05-14 14:34:33 -04:00
Rossen Stoyanchev 59084354e2 Add validation of HTTP method in form tag
SPR-6945
2012-05-14 11:38:58 -04:00
Chris Beams f1a699cff5 Merge pull request #77 from pukkaone/fix-typo
* pukkaone/fix-typo:
  Fix typos in Reference Documentation
2012-05-12 09:47:53 +03:00
Chin Huang f1c062fe9e Fix typos in Reference Documentation 2012-05-12 00:53:51 -04:00
Sam Brannen 78c6d70f0b Refute claims made in SPR-9051
It was claimed that when a {@code @ContextConfiguration} test class
references a config class missing an {@code @Configuration} annotation,
@Bean dependencies are wired successfully but the bean lifecycle is not
applied (no init methods are invoked, for example).

AnnotatedConfigClassesWithoutAtConfigurationTests refutes this claim by
demonstrating that @Bean methods in non-@Configuration classes are
properly handled as "annotated factory bean methods" and that lifecycle
callbacks in fact apply to such factory beans.

Issue: SPR-9051
2012-05-12 00:36:24 +02:00
Rossen Stoyanchev d52fc3bd2f Prevent response updates if @ResponseStatus has reason
When @ResponseStatus has a reason and servletResponse.sendError() is
called, the response is committed and should no longer be written to.
After this change, the ServletInvocableHandlerMethod will mark the
response fully handled and will ignore any non-null return values.

Issue: SPR-9159
2012-05-11 17:41:14 -04:00
Sam Brannen 0b17dd2242 Fix misleading JavaDoc in ProfileAnnotationConfigTestSuite 2012-05-11 23:35:43 +02:00
Rossen Stoyanchev c57d4e2386 Add trySet method to DeferredResult
The method absorbs any potential StaleAsyncWebRequestException and
returns false instead.

Issue: SPR-8517
2012-05-11 16:07:56 -04:00
Sam Brannen 897f6d6c68 Update changelog regarding upgrade to JUnit 4.10 and TestNG 6.5.2 2012-05-11 21:02:25 +02:00
Rossen Stoyanchev 982cb2f258 Fix content negotiation issue with sort by q-value
Before this fix the q-value of media types in the Accept header were
ignored when using the new RequestMappingHandlerAdapter in combination
with @ResponseBody and HttpMessageConverters.

Issue: SPR-9160
2012-05-11 14:43:58 -04:00
Sam Brannen 75578d4e88 Upgrade to TestNG 6.5.2
The Spring TestContext Framework (TCF) currently builds against TestNG
5.10. Thus in order to ensure that the TCF builds against the latest
release of TestNG without issues and in order to investigate the
possibility of integrating with newer TestNG features, we are upgrading to
version 6.5.2.

Note, however, that the Gradle build currently does not execute any TestNG
tests; this will be addressed in SPR-9398.

Issue: SPR-8221
2012-05-11 19:12:59 +02:00
Sam Brannen e8392f83c9 Upgrade to JUnit 4.10
Spring currently builds against JUnit 4.9; however, in order to ensure
that the Spring TestContext Framework builds and runs against JUnit 4.10
without issues and in order to investigate the possibility of integrating
with newer JUnit features, we are upgrading to JUnit 4.10.

Issue: SPR-9277
2012-05-11 17:33:53 +02:00
Rossen Stoyanchev 816c1f47a4 Translate EOF to HttpMessageNotReadableException
The MappingJacksonHttpMessageConverter now catches all IOException
types raised while reading JSON and translates them into
HttpMessageNotReadableException.

Issue: SPR-9238
2012-05-10 17:17:29 -04:00
Rossen Stoyanchev d7efc0db80 Detect controller methods via InitializingBean hook
Previously RequestMappingHandlerMapping detected @RequestMapping
methods through an initApplicationContext() hook. However, the
HandlerMapping may not have been fully set up with all its
dependencies at that point including settings like useSuffixPattern
and others.

This change moves the detection @RequestMapping methods to an
InitializingBean.afterPropertiesSet() hook.

Issue: SPR-9371
2012-05-10 16:42:36 -04:00
Rossen Stoyanchev f61f4a960e Discover controllers based on type @RequestMapping
This was supported in DefaultAnnotationHandlerMapping but not in the
RequestMappingHandlerMapping. The specific scenario where this matters
is a controller decorated with a JDK proxy. In this scenario the
HandlerMapping looks at interfaces only to decide if the bean is a
controller. The @Controller annotation is better left (and required)
on the class.

Issue: SPR-9374
2012-05-10 16:19:14 -04:00
Rossen Stoyanchev c499df2315 Fix issue with resolving Errors controller argument
The ErrorsMethodArgumentResolver expects the preceding @ModelAttribute
in the controller method signature to be the last one added in the
model -- an assumption that can break if a model attribute is added
earlier (e.g. through a @ModelAttribute method) and more attributes
are added as well. This fix ensures when an @ModelAttribute is resolved
as a controller method argument it has the highest index in the model.

Issue: SPR-9378
2012-05-10 16:01:14 -04:00
Rossen Stoyanchev e04b322110 Don't decode URI for content negotiation by extension
Minor bug fix in the ContentNegotiatingViewResolver where decoding the
URI prevented proper detection of the file extension in a URL.

Issue: SPR-9390
2012-05-10 15:00:01 -04:00
Sam Brannen 80af842662 Re-enable ignored tests in MockServletContextTests
Two tests in MockServletContextTests were disabled with @Ignore with the
comment "fails to work under ant after move from .testsuite -> .test";
however, this no longer appears to apply with the Gradle build. Thus
these tests have been re-enabled.
2012-05-10 17:00:28 +02:00
Rossen Stoyanchev 9546be3974 Fix JavaDoc in OpMultiply so that it does not contain special characters
The JavaDoc in OpMultiply contained special characters that caused
problems when building with Java 7 on Mac OS X. The section symbol has
been replaced with the word "Section". Also improved class-level and
method-level JavaDoc in general.
2012-05-10 03:01:52 +02:00
Rossen Stoyanchev db289495e5 Pretty print option for Jackson converter and view
Jackson serialization supports pretty printing. Usually it's enabled
by invoking ObjectMapper.configure(..), which is not convenient for
apps with XML configuration. The Jackson HttpMessageConverter and View
now both have a prettyPrint property.

A second more serious issue is documented here:
https://github.com/FasterXML/jackson-databind/issues/12

The workaround discussed at the above link has been implemented.

Issue: SPR-7201
2012-05-09 16:29:22 -04:00
Rossen Stoyanchev 6a162d488a Merge pull request #76 from rstoyanchev/jackson2
Add Jackson 2 HttpMessageConverter and View
2012-05-09 10:25:40 -07:00
Rossen Stoyanchev e63ca04fdb Add Jackson 2 HttpMessageConverter and View
Jackson 2 uses completely new package names and new maven artifact ids.
This change adds Jackson 2 as an optional dependency and also provides
MappingJackson2HttpMessageConverter and MappingJackson2JsonView for use
with the new version.

The MVC namespace and the MVC Java config detect and use
MappingJackson2HttpMessageConverter if Jackson 2 is present.
Otherwise if Jackson 1.x is present,
then MappingJacksonHttpMessageConverter is used.

Issue: SPR-9302
2012-05-09 13:07:25 -04:00
Rossen Stoyanchev 6cca57afd3 Exception for OSIV deferred close with async requests
OSIV deferred close mode is not supported with async requests and is
unlikely to be what's the desired. This change adds an exception with
a message stating this.

Issue: SPR-8517
2012-05-04 18:58:47 -04:00
Rossen Stoyanchev 158b3c6af8 Merge pull request #73 from rstoyanchev/mvc-async
HanderInterceptor and OSIV async request changes
2012-05-04 13:16:18 -07:00
Rossen Stoyanchev e7506b50b2 HanderInterceptor and OSIV async request changes
This change updates Open-Session-in-View filters and interceptors for
use in async requests mainly ensuring the open Hibernate session is
unbound from the main request processing thread and bound to the to
async thread.

Issue: SPR-8517
2012-05-04 16:12:14 -04:00
Rossen Stoyanchev 1eaaa9a446 Add empty location check to ResourceHttpRequestHandler
ResourceHttpRequestHandler now implements InitializingBean and
checks for empty locations.

Issue: SPR-9186
2012-05-01 17:08:19 -04:00
Rossen Stoyanchev c52c78d020 Javadoc update
Issue: SPR-9265
2012-05-01 16:29:39 -04:00
Rossen Stoyanchev a33fe6fa0a Fix issue with encoded params in UriComponentsBuilder
The fromUri method of UriComponentsBuilder used uri.getXxx() methods,
which decode the URI parts causing URI parsing issues. The same method
now uses uri.getRawXxx().

Issue: SPR-9317
2012-05-01 16:10:38 -04:00
Chris Beams ae9549ae13 Merge pull request #66 from dridi/SPR-9176
* SPR-9176:
  Fix scoped-proxy memory leak w/ @Resource injection
2012-05-01 17:52:21 +03:00
Dridi Boukelmoune f779c199ea Fix scoped-proxy memory leak w/ @Resource injection
Prior to this change, request-scoped components having
@Resource-injected dependencies caused a memory leak in
DefaultListableBeanFactory#dependenciesForBeanMap.

Consider the following example:

    @Component
    @Scope(value="request", proxyMode=ScopedProxyMode.TARGET_CLASS)
    public class MyComponent {

        @Resource
        private HttpServletRequest request;

        // ...
    }

The bean name for "MyComponent" will end up being
'scopedTarget.myComponent', which will become a key in
the #dependenciesForBeanMap structure.

On the first request, the injected HttpServletRequest bean will be a
proxy and will internally have a bean name of the form
"$Proxy10@1a3a2a52". This name will be added to the Set value associated
with the 'scopedTarget.myComponent' entry in #dependenciesForBeanMap.

On the second request, the process will repeat, but the injected
HttpServletRequest will be a different proxy instance, thus having a
different identity hex string, e.g. "$Proxy10@5eba06ff". This name will
also be added to the Set value associated with the
'scopedTarget.myComponent' entry in #dependenciesForBeanMap, and this
is the source of the leak: a new entry is added to the set on each
request but should be added only once.

This commit fixes the leak by introducing caching to
CommonAnnotationBeanPostProcessor#ResourceElement similar to that already
present in AutowiredAnnotationBeanPostProcessor#AutowiredFieldElement
and #AutowiredMethodElement. Essentially, each ResourceElement instance
now tracks whether it has been created, caches the ultimate value to be
injected and returns it eagerly if necessary. Besides solving the memory
leak, this has the side effect of avoiding unnecessary proxy creation.

This fix also explains clearly why injection into request-scoped
components using @Autowired never suffered this memory leak: because the
correct caching was already in place. Because @Resource is considerably
less-frequently used than @Autowired, and given that this particular
injection arrangement is relatively infrequent, it becomes
understandable how this bug has been present without being reported
since the introduction of @Resource support in Spring 2.5: developers
were unlikely to encounter it in the first place; and if they did, the
leak was minor enough (adding strings to a Set), that it could
potentially go unnoticed indefinitely depending on request volumes and
available memory.

Issue: SPR-9176
2012-05-01 17:52:11 +03:00
Chris Beams e85e6147f0 Merge pull request #7 from bedla/SPR-8308
* SPR-8308:
  Convert SpEL plus operands using reg'd converters
2012-04-30 17:14:32 +03:00
Ivo Smid 7cdfaf3e0d Convert SpEL plus operands using reg'd converters
Prior to this commit, SpEL's OpPlus ('+' operator) would convert its
left and right operands to String directly via #toString calls.

This change ensures that operand values are delegated to any registered
converters, allowing for customization of the stringified output.

Note that the OpPlus constructor now throws IllegalArgumentException if
zero operands are supplied.

Issue: SPR-8308
2012-04-30 17:12:40 +03:00
Chris Beams 3514cc5d65 Merge pull request #36 from sslavic/SPR-9113
* SPR-9113:
  Fix javadoc warnings
2012-04-30 11:31:51 +03:00
Stevo Slavic effb762558 Fix javadoc warnings
Before this change there were numerous javadoc warnings being reported
while building Spring framework API.

This commit resolves most of the javadoc warnings, reducing the total
number from 265 to 103.

Issue: SPR-9113
2012-04-30 11:31:02 +03:00
Chris Beams e830511e8a Merge pull request #35 from sslavic/SPR-9097
* SPR-9097:
  Fix encoding issues in javadoc
2012-04-30 11:06:24 +03:00
Stevo Slavic 991b8e9a06 Fix encoding issues in javadoc
Before this change javadoc in two classes had non-UTF-8 encoded
characters. This caused building Spring API to fail in Java 1.7.

Commit fixes this by replacing wrongly encoded characters with their
UTF-8 equivalents.

Issue: SPR-9097
2012-04-30 11:05:05 +03:00
Rossen Stoyanchev 7ee821d3d1 Add ability to handle a timeout to DeferredResult
When a controller returns a DeferredResult, the underlying async
request will eventually time out. Until now the default behavior was
to send a 503 (SERVICE_UNAVAILABLE). However, this is not desirable
in all cases. For example if waiting on an event, a timeout simply
means there is no new information to send.

To handle those cases a DeferredResult now accespts a timeout result
Object in its constructor. If the timeout occurs before the
DeferredResult is set, the timeout result provided to the constructor
is used instead.

Issue: SPR-8617
2012-04-26 17:38:31 -04:00
Rossen Stoyanchev f37efb4279 Polish Servlet async request processing
* Clarify semantics and behavior of AsyncWebRequest methods in most cases
making a best effort and not raising an exception if async processing
has completed for example due to a timeout. The startAsync() method is
still protected with various checks and will raise ISE under a number
of conditions.
* Return 503 (service unavailable) when requests time out.
* Logging improvements.

Issue: SPR-8517
2012-04-23 12:50:45 -04:00
Chris Beams 699de7eb80 Upgrade to docbook-reference-plugin 0.1.5
- Fixes deprecation warnings associated with recent upgrade to Gradle
   1.0-rc1
2012-04-20 22:02:40 +03:00
Rossen Stoyanchev b51caae0df Fix broken test
Issue: SPR-8517
2012-04-18 17:27:55 -04:00
Rossen Stoyanchev 3642b0f365 Initial cut of Servlet 3.0 based async support
From a programming model perspective, @RequestMapping methods now
support two new return value types:

* java.util.concurrent.Callable - used by Spring MVC to obtain the
return value asynchronously in a separate thread managed transparently
by Spring MVC on behalf of the application.
* org.springframework.web.context.request.async.DeferredResult - used
by the application to produce the return value asynchronously in a
separate thread of its own choosing.

The high-level idea is that whatever value a controller normally
returns, it can now provide it asynchronously, through a Callable or
through a DeferredResult, with all remaining processing --
@ResponseBody, view resolution, etc, working just the same but
completed outside the main request thread.

From an SPI perspective, there are several new types:

* AsyncExecutionChain - the central class for managing async request
processing through a sequence of Callable instances each representing
work required to complete request processing asynchronously.
* AsyncWebRequest - provides methods for starting, completing, and
configuring async request processing.
* StandardServletAsyncWebRequest - Servlet 3 based implementation.
* AsyncExecutionChainRunnable - the Runnable used for async request
execution.

All spring-web and spring-webmvc Filter implementations have been
updated to participate in async request execution.
The open-session-in-view Filter and interceptors implementations in
spring-orm will be updated in a separate pull request.

Issue: SPR-8517
2012-04-18 16:36:09 -04:00
Chris Beams fdded0768e Upgrade slf4j-api and -log4j12 dependencies to 1.6.1
Previously depending on 1.5.10 in certain locations, which caused
NoClassDefFoundErrors in EhCacheCacheTests and other tests due to
mismatches between slf4j -api and -log4j12 versions.

With the exception of one transitive dependency via Hibernate 3.3.1.GA,
all slf4j dependencies are now pegged at 1.6.1 (and all tests pass).
2012-04-17 11:51:16 +03:00
Chris Beams b09be842f3 Merge pull request #61 from rstoyanchev/slf4j-dependency
* rstoyanchev/slf4j-dependency:
  Fix transitive dependency issue with slf4j-api
2012-04-17 10:22:45 +03:00
Rossen Stoyanchev 6d5a630c44 Fix transitive dependency issue with slf4j-api
Before this change, IDE settings generated via import-into-eclipse.sh
created a classpath dependency on slf4j-api version 1.6.1 and
slf4j-log4j12 version 1.5.10. As a result running tests inside the IDE
resulted in a NoSuchMethodException.

build.gradle sets the variable slf4jLog4jVersion to '1.5.10'. However,
the hibernate-validator dependency in spring-context pulls in
slf4j-api version 1.6.1. The change ensures the version specified in
the build script variable is used consistently. Whether it should be
1.5.10 or 1.6.1 is a separate concern.
2012-04-16 15:41:36 -04:00
Chris Beams 57b89e0388 Fix typo in ApplicationContext reference doc 2012-04-16 13:36:12 +03:00
Chris Beams 0ab9e9a0c6 Upgrade AspectJ from 1.6.8 to 1.6.12
- Spring remains compatible against AJ version 1.6.8, but is now
   compiling and testing against 1.6.12

 - Encountered what appears to be an AJ bug introduced in 1.6.10: an
   assertion in org.aspectj.weaver.UnresolvedType causes a false
   negative failure when encountering org.springframework.io.Resource
   arrays, e.g. "[org.springframework.io.Resource@xxx". This problem
   has been reported to the AJ team and in the meantime, the recommended
   workaround is to disable assertions either completely, or at least
   selectively with

       -disableassertions:org.aspectj.weaver.UnresolvedType

Issue: SPR-7989, SPR-9272
2012-04-14 19:05:20 +03:00
Chris Beams 963b4e49a9 Upgrade to Gradle 1.0-rc1
- Fix deprecation warnings about dynamic properties; favor use of
   "extra properties extensions" per [1]

 - Certain such deprecations are still issued due to violations within
   the docbook-reference plugin. These will be fixed in an upcoming
   revision of the plugin, at which point spring-framework will upgrade
   to depend on it and these warnings will be eliminated

[1] http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html

Issue: SPR-9327
2012-04-14 12:52:07 +03:00
Chris Beams f6003b5102 Fix typo in reference documentation
Issue: SPR-9321
2012-04-13 20:41:37 +03:00
Rossen Stoyanchev cfe2af7690 Use the type of the actual return value in @MVC
The new @MVC support classes select a HandlerMethodArgumentResolver
and a HandlerMethodReturnValueHandler statically, i.e. based on
the signature of the method, which means that a controller method
can't declare a more general return type like Object but actually
return a more specific one, e.g.  String vs RedirectView, and
expect the right handler to be used.

The fix ensures that a HandlerMethodReturnValueHandler is selected
based on the actual return value type, which is something that was
supported with the old @MVC support classes. One consequence
of the change is the selected HandlerMethodReturnValueHandler can
no longer be cached but that matches the behavior of the old
@MVC support classes.

Issues: SPR-9218
2012-04-06 16:50:22 -04:00
Rossen Stoyanchev 97c22fc08e Minor improvement in ExceptionHandlerExceptionResolver
Moved a null check inside a protected method to give protected method
a chance to override what happens in that case.

Issues: SPR-9193
2012-04-06 14:06:23 -04:00
Rossen Stoyanchev a17a889e8a Make 'Content-Disposition' header case insensitive
Previously 'Content-Disposition' was passed to Part.getHeader(String).
However the Javadoc for that method specifies the header should be
case insensitive. Note that the JavaDoc in tomcat-servlet-api doesn't
mention this. It can only be found in the official api JavaDoc:

http://download.oracle.com/otndocs/jcp/servlet-3.0-fr-oth-JSpec/

Issue: SPR-9149
2012-04-02 17:50:05 -04:00
Rossen Stoyanchev ca8b98e947 Fix issue with parsing media types
Invalid Content-Type or Accept header values previously resulted in the
IllegalArgumentException getting propagated. After this change such
errors are detected and generally treated as a "no match", which
may for example result in a 406 in the case of the Accept header.

Issue: SPR-9148
2012-04-02 17:36:23 -04:00
Rossen Stoyanchev 0b02933938 Fix race condition in AnntationMethodHER
Issues: SPR-9138
2012-04-02 15:46:31 -04:00
Rossen Stoyanchev 64ee5e579a Fix bug with custom RequestCondition
A custom RequestCondition which can be provided by overriding methods
in RequestMappingHandlerMapping worked only for conditions that match
and did not return null (as it should have) for conditions that don't
match.

Issues: SPR-9134
2012-04-02 15:19:38 -04:00
Rossen Stoyanchev 9833a4c385 Improvement in AntPathMatcher.combine method
Issues: SPR-7970
2012-04-02 15:06:20 -04:00
Chris Beams 4653dbe73f Fix typo in util:constant error reporting
Issue: SPR-9260
2012-03-26 20:08:54 +03:00
Chris Beams 180c5b2ef6 Introduce 3.2 versions of Spring XML namespaces
Copy spring-*-3.1.xsd => spring-*-3.2.xsd; this commit introduces no
substantive changes, but rather prepares for them by creating a clean
baseline. All internal references to 3.1 schemas (e.g. spring-tool) have
also been updated.
2012-03-26 20:06:06 +03:00
Arjen Poutsma d2251a12c3 Fixed illegal characters in JibxUnmarshallerTests
JibxUnmarshallerTests contained UTF-8 characters; this commit changes
those to the \uXXX notation, as all Java source files should be in
Latin-1.
2012-03-20 09:22:49 +01:00
Chris Beams bb5c81e0c5 Merge pull request #58 from sslavic/SPR-7865
* SPR-7865:
  Use configured encoding during JiBX unmarshalling
2012-03-15 15:14:52 +02:00
Stevo Slavic e25183eab1 Use configured encoding during JiBX unmarshalling
Before this change JibxMarshaller did not use the configured encoding
when unmarshalling XML. This caused issues when content being
unmarshalled was not encoded using the default encoding.

This commit fixes the issue by passing configured encoding to JiBX so
it gets used when unmarshalling instead of the default encoding.

Issue: SPR-7865
2012-03-15 15:10:47 +02:00
Chris Beams e3f544904c Fix warnings in LocalSessionFactoryBean 2012-03-09 11:36:56 +02:00
Chris Beams 045c97f75e Support automatic Hibernate dialect detection
Use the preferred SessionFactoryImplementor#getDialect call as
opposed to the previous Dialect#getDialect approach which required
explicitly setting the 'hibernate.dialect' property.

Issue: SPR-7396
2012-03-09 11:36:49 +02:00
Chris Beams 352ed517c5 Fix typo in @ComponentScan Javadoc
With thanks to @abdull for pull request #55
2012-03-09 10:50:44 +02:00
Chris Beams 6d94b74ab1 Move QueryTimeoutException to spring-tx
This change fixes a mistake made during an earlier sync with the 3.1.x
branch in which the new QueryTimeoutException class was accidentally
placed in spring-transaction instead of spring-tx.

Issue: SPR-7680
2012-03-08 12:11:01 +02:00
Rossen Stoyanchev e7e74c83d8 Merge pull request #50 from sslavic/SPR-8732 2012-03-05 06:59:43 -08:00
Stevo Slavic a9f4206151 Generate bracketless tag id in FreeMarker forms
Before this change if FreeMarker Spring form macro was bound to a path
which contains square brackets, those brackets would also appear in id
of generated tag, making the id invalid.

As of this fix all FreeMarker Spring form macros generate tag with id
that does not contain square brackets.

Issue: SPR-8732
2012-03-04 22:02:38 +01:00
Rossen Stoyanchev 9c8332a6c4 Merge pull request #48 from sslavic/SPR-5984 2012-03-02 10:55:03 -08:00
Stevo Slavic 104f13e43f Fix MultipartResolver javadoc implementation refs
Before this fix MultipartResolver javadoc mentioned that there is only
one concrete implementation included in Spring. This was true as of
Spring 2.5 but Spring 3.1 added another one, Servlet 3.0 Part API based
implementation.

This fix changes MultipartResolver javadoc so that the other one,
StandardServletMultipartResolver implementation, gets also listed.
Changed javadoc mentions also as of which version does Spring bundle
two MultipartResolver implementations.

Issue: SPR-5984
2012-03-02 19:00:03 +01:00
Chris Beams 6295f2b591 Merge pull request #44 from mjkrumlauf/patch-1
* patch-1:
  Fix typo in Eclipse import instructions
2012-03-01 20:26:10 +01:00
Mike Krumlauf 35bf5dc592 Fix typo in Eclipse import instructions 2012-03-01 12:46:52 +01:00
Chris Beams 7b703b7e9b Merge pull request #45 from sslavic/SPR-7940
* SPR-7940:
  Remove note on singleton-scoped proxy raising BCE
2012-03-01 12:30:15 +01:00
Stevo Slavic 924c869b8a Remove note on singleton-scoped proxy raising BCE
Before this change bean scopes chapter in Spring reference documentation
had a note which mentioned that creating a scoped proxy for singleton-
or prototype-scoped beans will throw BeanCreationException.

This is no longer the case and this change removes the mentioned note.

Issue: SPR-7940
2012-03-01 12:29:40 +01:00
Chris Beams 833e74168a Merge pull request #46 from pkan/master
* pkan/master:
  Fix typo in spring:eval taglib reference doc
  Fix typo in ApplicationContext reference doc
2012-03-01 12:13:07 +01:00
Phani Kandula 00d9c3f5e8 Fix typo in spring:eval taglib reference doc
- Replace 'javascriptEncoding' with 'javaScriptEscape'

Issue: SPR-9188
2012-03-01 12:12:52 +01:00
Phani Kandula 6c602d7bbc Fix typo in ApplicationContext reference doc
- Add missing '=' sign in sample code for section 4.2.3

Issue: SPR-8856
2012-03-01 12:12:45 +01:00
Chris Beams 15d1d824b5 Return null correctly from MutablePropertySources#get
Prior to this commit, MutablePropertySources#get(String) would throw
IndexArrayOutOfBoundsException if the named property source does not
actually exist. This is a violation of the PropertySource#get contract
as described in its Javadoc.

The implementation now correctly checks for the existence of the named
property source, returning null if non-existent and otherwise returning
the associated PropertySource.

Other changes

 - Rename PropertySourcesTests => MutablePropertySourcesTests
 - Polish MutablePropertySourcesTests for style, formatting
 - Refactor MutablePropertySources for consistency

Issue: SPR-9179
2012-02-29 14:33:29 +01:00
Arjen Poutsma 43b4997e3f Support scanned classes in Jaxb2Marshaller
Jaxb2Marshaller#supports now supports classes found via package
scanning.

Issue: SPR-9152
2012-02-28 09:49:54 +01:00
Arjen Poutsma 83f3750fb3 Support byte[] in JaxbMarshaller under JDK 7
JDK7 changed its reflections API in order to resolve
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5041784

In short, JDK 5 and 6 (wrongly) return GenericArrayTypes in certain
reflection scenarios, whereas JDK 7 changed this to return a normal
array type. For Jaxb2Marshaller, this meant that marshaling byte arrays
was not supported under JDK 7.

This change fixes that, so that Jaxb2Marhsaller supports marshalling
byte arrays again (under JDK 5, 6 or 7).
2012-02-27 11:35:26 +01:00
Chris Beams 7ca5fba05f Avoid infinite loop in AbstractResource#contentLength
Due to changes made in commit 2fa87a71 for SPR-9118,
AbstractResource#contentLength would fall into an infinite loop unless
the method were overridden by a subclass (which it is in the majority of
use cases).

This commit:

 - fixes the infinite recursion by refactoring to a while loop

 - asserts that the value returned from #getInputStream is not null in
   order to avoid NullPointerException

 - tests both of the above

 - adds Javadoc to the Resource interface to clearly document that the
   contract for any implementation is that #getInputStream must not
   return null

Issue: SPR-9161
2012-02-24 14:29:28 +01:00
Chris Beams f4010f14d1 Upgrade to Gradle 1.0-milestone-8a
- Rename customized .wrapper to default gradle/wrapper directory for
   out of the box compatibility with STS Gradle tooling

 - Add .settings/gradle directory to capture defaults when using STS
   Gradle tooling to import projects
2012-02-23 14:17:09 +01:00
Chris Beams 0ff28a6b22 Upgrade to docbook-reference-plugin 0.1.3 2012-02-23 13:34:47 +01:00
Chris Beams f5042d1928 Merge pull request #41 from sslavic/SPR-7843
* SPR-7843:
  Predict specific object type in EhCacheFactoryBean
2012-02-21 19:20:29 +01:00
Stevo Slavic 0690b58878 Predict specific object type in EhCacheFactoryBean
Prior to this change, before a bean is created by EhCacheFactoryBean,
its #getObjectType would return only an Ehcache interface. This caused
unwanted wiring issues as described in the related JIRA issue.

This fix makes use of EhCacheFactoryBean's configuration to determine
the specific Ehcache object type even before it's created, such that
the container is provided with as much information as possible when
resolving dependencies. Nevertheless, users are advised to code to
the Ehcache interface.

Issue: SPR-7843
2012-02-21 19:17:19 +01:00
Chris Beams b2291ff814 Map ORA-30006 to CannotAcquireLockException as well
ORA-00054 is already mapped to CannotAcquireLockException and is
described as

  "resource busy and acquire with NOWAIT specified"

As pointed out in the associated JIRA issue, ORA-30006 is quite similar
being described as

  "resource busy; acquire with WAIT timeout expired"

This commit maps ORA-30006 to CannotAcquireLockException as well.

Issue: SPR-9141
2012-02-21 11:46:42 +01:00
Chris Beams 4df2a14b13 Fix regression in @PropertySource placeholder resolution
Changes in commit 41ade68b50 introduced
a regression causing all but the first location in the
@PropertySource#value array to be ignored during ${...} placeholder
resolution. This change ensures that all locations are processed and
replaced as expected.

Issue: SPR-9133, SPR-9127
2012-02-20 14:21:51 +01:00
Chris Beams 37d547c506 Sync with 3.1.x
* 3.1.x:
  Warn re Environment construction and instance vars
  Disallow empty @PropertySource(value = {})
  Fix @PropertySource bug with multiple values
  final preparations for 3.1.1 release
  added "receive-timeout" attribute to "jms:listener-container" element
2012-02-20 14:19:04 +01:00
Chris Beams 7535e24deb Warn re Environment construction and instance vars
- Add warning regarding access to default instance variable values
   during AbstractEnvironment#customizePropertySources callback

 - Polish AbstractEnvironment Javadoc and formatting

Issue: SPR-9013
2012-02-16 21:31:10 +01:00
Chris Beams 80dd32e95c Disallow empty @PropertySource(value = {})
Previously, a user could specify an empty array of resource locations
to the @PropertySource annotation, which amounts to a meaningless no-op.

ConfigurationClassParser now throws IllegalArgumentException upon
encountering any such misconfiguration.
2012-02-16 18:25:53 +01:00
Chris Beams 41ade68b50 Fix @PropertySource bug with multiple values
Prior to this commit, specifying a named @PropertySource with multiple
values would not work as expected. e.g.:

  @PropertySource(
      name = "ps",
      value = { "classpath:a.properties", "classpath:b.properties" })

In this scenario, the implementation would register a.properties with
the name "ps", and subsequently register b.properties with the name
"ps", overwriting the entry for a.properties.

To fix this behavior, a CompositePropertySource type has been introduced
which accepts a single name and a set of PropertySource objects to
iterate over. ConfigurationClassParser's @PropertySource parsing routine
has been updated to use this composite approach when necessary, i.e.
when both an explicit name and more than one location have been
specified.

Note that if no explicit name is specified, the generated property
source names are enough to distinguish the instances and avoid
overwriting each other; this is why the composite wrapper is not used
in these cases.

Issue: SPR-9127
2012-02-16 18:25:03 +01:00
Juergen Hoeller ff862addbe final preparations for 3.1.1 release 2012-02-16 17:34:53 +01:00
Chris Beams 624ba720d5 Add link to contributor guidelines in readme 2012-02-16 13:13:44 +01:00
Chris Beams 3e81482760 Sync with 3.1.x
* 3.1.x:
  Demonstrate use of @Configuration as meta-annotation
  Prune dead code from JmsTransactionManager#doBegin
  Apply @Configuration BeanNameGenerator consistently
  Improve @Configuration bean name discovery
  Fix infinite recursion bug in nested @Configuration
  Polish static imports
  Minor fix in ServletResponseMethodArgumentResolver
  extracted ResourceUtils.useCachesIfNecessary(URLConnection) method (SP
  prepared for 3.1.1 release
  CustomSQLExceptionTranslatorRegistry/Registrar etc
  revised CustomSQLExceptionTranslatorRegistry/Registrar method naming
  use custom InputStream traversal instead of a full byte array (SPR-911
  PathMatchingResourcePatternResolver preserves caching for JNLP jar con
  Resource "contentLength()" implementations work with OSGi bundle resou
  fixed MethodInvokingJobDetailFactoryBean for compatibility with Quartz
  fixed MethodInvokingJobDetailFactoryBean for compatibility with Quartz
2012-02-16 13:00:28 +01:00
Juergen Hoeller 94e3f08a44 added "receive-timeout" attribute to "jms:listener-container" element in JMS namespace (SPR-9114) 2012-02-16 12:03:09 +01:00
Chris Beams 1c2b1d2c85 Demonstrate use of @Configuration as meta-annotation
Issue: SPR-9090
2012-02-15 22:01:35 +01:00
Chris Beams 58e270f7da Prune dead code from JmsTransactionManager#doBegin 2012-02-15 21:11:29 +01:00
Chris Beams fc416bcb0b Apply @Configuration BeanNameGenerator consistently
Since the introduction of the AnnotationConfig(Web)ApplicationContext
types in Spring 3.0, it has been possible to specify a custom
bean name generation strategy via the #setBeanNameGenerator methods
available on each of these classes.

If specified, that BeanNameGenerator was delegated to the underlying
AnnotatedBeanDefinitionReader and ClassPathBeanDefinitionScanner. This
meant that any @Configuration classes registered or scanned directly
from the application context, e.g. via #register or #scan methods would
respect the custom name generation strategy as intended.

However, for @Configuration classes picked up via @Import or implicitly
registered due to being nested classes would not be aware of this
strategy, and would rather fall back to a hard-coded default
AnnotationBeanNameGenerator.

This change ensures consistent application of custom BeanNameGenerator
strategies in the following ways:

 - Introduction of AnnotationConfigUtils#CONFIGURATION_BEAN_NAME_GENERATOR
   singleton

   If a custom BeanNameGenerator is specified via #setBeanNameGenerator
   the AnnotationConfig* application contexts will, in addition to
   delegating this object to the underlying reader and scanner, register
   it as a singleton bean within the enclosing bean factory having the
   constant name mentioned above.

   ConfigurationClassPostProcessor now checks for the presence of this
   singleton, falling back to a default AnnotationBeanNameGenerator if
   not present. This singleton-based approach is necessary because it is
   otherwise impossible to parameterize CCPP, given that it is
   registered as a BeanDefinitionRegistryPostProcessor bean definition
   in AnnotationConfigUtils#registerAnnotationConfigProcessors

 - Introduction of ConfigurationClassPostProcessor#setBeanNameGenerator

   As detailed in the Javadoc for this new method, this allows for
   customizing the BeanNameGenerator via XML by dropping down to direct
   registration of CCPP as a <bean> instead of using
   <context:annotation-config> to enable  @Configuration class
   processing.

 - Smarter defaulting for @ComponentScan#beanNameGenerator

   Previously, @ComponentScan's #beanNameGenerator attribute had a
   default value of AnnotationBeanNameGenerator. The value is now the
   BeanNameGenerator interface itself, indicating that the scanner
   dedicated to processing each @ComponentScan should fall back to an
   inherited generator, i.e. the one originally specified against the
   application context, or the original default provided by
   ConfigurationClassPostProcessor. This means that name generation
   strategies will be consistent with a single point of configuration,
   but that individual @ComponentScan declarations may still customize
   the strategy for the beans that are picked up by that particular
   scanning.

Issue: SPR-9124
2012-02-15 15:33:35 +01:00
Chris Beams e81df2ef3e Improve @Configuration bean name discovery
Prior to this commit, and based on earlier changes supporting SPR-9023,
ConfigurationClassBeanDefinitionReader employed a simplistic strategy
for extracting the 'value' attribute (if any) from @Configuration in
order to determine the bean name for imported and nested configuration
classes. An example case follows:

  @Configuration("myConfig")
  public class AppConfig { ... }

This approach is too simplistic however, given that it is possible in
'configuration lite' mode to specify a @Component-annotated class with
@Bean methods, e.g.

  @Component("myConfig")
  public class AppConfig {
      @Bean
      public Foo foo() { ... }
  }

In this case, it's the 'value' attribute of @Component, not
@Configuration, that should be consulted for the bean name. Or indeed if
it were any other stereotype annotation meta-annotated with @Component,
the value attribute should respected.

This kind of sophisticated discovery is exactly what
AnnotationBeanNameGenerator was designed to do, and
ConfigurationClassBeanDefinitionReader now uses it in favor of the
custom approach described above.

To enable this refactoring, nested and imported configuration classes
are no longer registered as GenericBeanDefinition, but rather as
AnnotatedGenericBeanDefinition given that AnnotationBeanNameGenerator
falls back to a generic strategy unless the bean definition in question
is assignable to AnnotatedBeanDefinition.

A new constructor accepting AnnotationMetadata
has been added to AnnotatedGenericBeanDefinition in order to support
the ASM-based approach in use by configuration class processing. Javadoc
has been updated for both AnnotatedGenericBeanDefinition and its now
very similar cousin ScannedGenericBeanDefinition to make clear the
semantics and intention of these two variants.

Issue: SPR-9023
2012-02-15 15:33:35 +01:00
Chris Beams 08e2669b84 Fix infinite recursion bug in nested @Configuration
Prior to this commit, an infinite recursion would occur if a
@Configuration class were nested within its superclass, e.g.

  abstract class Parent {
      @Configuration
      static class Child extends Parent { ... }
  }

This is because the processing of the nested class automatically
checks the superclass hierarchy for certain reasons, and each
superclass is in turn checked for nested @Configuration classes.

The ConfigurationClassParser implementation now prevents this by
keeping track of known superclasses, i.e. once a superclass has been
processed, it is never again checked for nested classes, etc.

Issue: SPR-8955
2012-02-15 15:33:35 +01:00
Chris Beams f3651c9998 Polish static imports 2012-02-15 15:33:35 +01:00
Rossen Stoyanchev a3484aebb3 Minor fix in ServletResponseMethodArgumentResolver
Issues: SPR-8983
2012-02-15 09:20:02 -05:00
Juergen Hoeller 6fd476e2c5 extracted ResourceUtils.useCachesIfNecessary(URLConnection) method (SPR-9117) 2012-02-14 21:55:29 +01:00
Juergen Hoeller ab98f288e9 prepared for 3.1.1 release 2012-02-14 21:30:12 +01:00
Juergen Hoeller acaf820941 CustomSQLExceptionTranslatorRegistry/Registrar etc 2012-02-14 21:29:52 +01:00
Juergen Hoeller ddf0d071ad revised CustomSQLExceptionTranslatorRegistry/Registrar method naming 2012-02-14 21:29:22 +01:00
Juergen Hoeller 2fa87a71fa use custom InputStream traversal instead of a full byte array (SPR-9118) 2012-02-14 21:16:10 +01:00
Juergen Hoeller fe57f74c1a PathMatchingResourcePatternResolver preserves caching for JNLP jar connections (SPR-9117) 2012-02-14 18:26:56 +01:00
Juergen Hoeller 81861ca7a8 Resource "contentLength()" implementations work with OSGi bundle resources and JBoss VFS resources (SPR-9118) 2012-02-14 14:46:45 +01:00
Juergen Hoeller 4831ca27d2 fixed MethodInvokingJobDetailFactoryBean for compatibility with Quartz 2.0/2.1 (SPR-8889) 2012-02-14 14:43:37 +01:00
Juergen Hoeller 1bfa7013a0 fixed MethodInvokingJobDetailFactoryBean for compatibility with Quartz 2.0/2.1 () 2012-02-14 14:09:41 +01:00
Chris Beams 81dfef90ef Sync with 3.1.x
* 3.1.x:
  Fix false negative test failure in ResourceTests
  Compensate for Eclipse vs Sun compiler discrepancy
2012-02-13 15:54:14 +01:00
Chris Beams 1d9d3e6ff7 Fix false negative test failure in ResourceTests
Prior to changes in commit 57851de88e,
AbstractResource#getFilename threw IllegalStateException unless
overridden by a subclass. Following that change, this method now throws
null instead, but ResourceTests#testAbstractResourceExceptions had not
been updated to reflect, resulting in a false negative failure. This has
now been fixed.

Issue: SPR-9043
2012-02-13 15:52:37 +01:00
Chris Beams 8e0b1c3a5f Compensate for Eclipse vs Sun compiler discrepancy
Eclipse allows autoboxing on type inference; Sun javac does not. This
means that variables assigned from calls to
AnnotationAttributes#getNumber should consistently use object wrappers
as opposed to number primitives. There was only one such instance
anyway, and has now been updated accordingly.
2012-02-13 15:37:19 +01:00
Chris Beams ee36c80ca9 Sync with 3.1.x
* 3.1.x: (61 commits)
  Compensate for changes in JDK 7 Introspector
  Avoid 'type mismatch' errors in ExtendedBeanInfo
  Polish ExtendedBeanInfo and tests
  Infer AnnotationAttributes method return types
  Minor fix in MVC reference doc chapter
  Hibernate 4.1 etc
  TypeDescriptor equals implementation accepts annotations in any order
  "setBasenames" uses varargs now (for programmatic setup; SPR-9106)
  @ActiveProfiles mechanism works with @ImportResource as well (SPR-8992
  polishing
  clarified Resource's "getFilename" method to consistently return null
  substituteNamedParameters detects and unwraps SqlParameterValue object
  Replace spaces with tabs
  Consider security in ClassUtils#getMostSpecificMethod
  Adding null check for username being null.
  Improvements for registering custom SQL exception translators in app c
  SPR-7680 Adding QueryTimeoutException to the DataAccessException hiera
  Minor polish in WebMvcConfigurationSupport
  Detect overridden boolean getters in ExtendedBeanInfo
  Polish ExtendedBeanInfoTests
  ...
2012-02-13 15:17:30 +01:00
Chris Beams 0a5392e37d Compensate for changes in JDK 7 Introspector
Prior to JDK 7, java.beans.Introspector registered indexed write methods
irrespective of return type, for example either of the following methods
were legal

    void setFoo(int i, Foo foo)
    Object setFoo(int i, Foo foo)

This was considered a bug and disallowed starting with JDK 7, such that
only the former signature is a candidate.

Supporting non-void returning setter methods is exactly what
ExtendedBeanInfo was designed to do, and prior to this commit, the
implementation of ExtendedBeanInfo assumed this (somewhat surprising)
behavior from the underlying Introspector, and because it worked out of
the box, took no extra steps to recognize and register these methods.
For this reason, non-void returning indexed write methods were not
registered under JDK 7+, causing test failures in ExtendedBeanInfoTests.

Now the implementation is careful to detect these methods without any
assumption about Introspector behavior, such that they are registered in
exactly the same fashion across JDK versions.

Issue: SPR-9014
2012-02-13 15:01:06 +01:00
Chris Beams b787a68f20 Avoid 'type mismatch' errors in ExtendedBeanInfo
Prior to this commit, ExtendedBeanInfo would add non-indexed write
methods without consideration for the presence of indexed read/write
methods, which is invalid per the JavaBeans spec and per the behavior
of java.beans.Introspector.  That is, a method with the signature

    void setFoo(Foo foo)

Should never be registered as a write method if the following method
signature is also present in the class

    void setFoo(int i, Foo foo)

In most cases, this oversight caused no problems, but in certain
situations where a bean actually contains such a mismatch of methods,
"type mismatch" errors were thrown when ExtendedBeanInfo attempted the
illegal addition against the underlying property descriptor.

The implementation is now more careful about checking the parameter type
of write methods -- if the property descriptor in question is an
IndexedPropertyDescriptor, i.e. has an indexed write method, then any
non-indexed write method candidate must have a single *array* parameter,
which conforms to the spec and to Introspector behavior.

Issue: SPR-8937
2012-02-13 15:01:06 +01:00
Chris Beams ef143d363e Polish ExtendedBeanInfo and tests
ExtendedBeanInfo

 - Reduce log messages from warn to debug

 - Remove now-incorrect comment indicating underlying property
   descriptors are never modified (they actually are as of SPR-8806)

ExtendedBeanInfoTests

 - Consolidate SPR-8949 tests

 - Eliminate compiler warnings

Issue: SPR-8949, SPR-8806
2012-02-13 15:01:05 +01:00
Chris Beams e25f1cbca9 Infer AnnotationAttributes method return types
- Drop 'expectedType' parameter from #getClass and #getEnum methods and
   rely on compiler inference based on type of assigned variable, e.g.

     public @interface Example {
         Color color();
         Class<? extends UserType> userType();
         int order() default 0;
     }

     AnnotationAttributes example =
        AnnotationUtils.getAnnotationAttributes(Example.class, true, true);

     Color color = example.getEnum("color");
     Class<? extends UserType> userType = example.getClass("userType");

   or in cases where there is no variable assignment (and thus no
   inference possible), use explicit generic type, e.g.

     bean.setColor(example.<Color>getEnum("color"));

 - Rename #get{Int=>Number} and update return type from int to
   <N extends Number>, allowing invocations such as:

     int order = example.getNumber("order");

These changes reduce the overall number of methods exposed by
AnnotationAttributes, while at the same time providing comprehensive
access to all possible annotation attribute types -- that is, instead of
requiring explicit #getInt, #getFloat, #getDouble methods, the
single #getNumber method is capabable of handling them all, and without
any casting required. And the obvious additional benefit is more concise
invocation as no redundant 'expectedType' parameters are required.
2012-02-13 15:01:05 +01:00
Rossen Stoyanchev 997c6c56f7 Minor fix in MVC reference doc chapter
Issues: SPR-9111
2012-02-12 19:54:17 -05:00
jhoeller caa50a1d41 Merge pull request #33 from trisberg/SQLException-translation-enhancements
SQL exception translation enhancements
2012-02-12 07:19:21 -08:00
jhoeller 6e00456e67 Merge pull request #25 from trisberg/fixes-for-SimpleJdbcInsert
Fixes for SimpleJdbcInsert [SPR-9006]
2012-02-12 07:17:15 -08:00
Juergen Hoeller a46facc2f9 Hibernate 4.1 etc 2012-02-11 19:15:42 +01:00
Juergen Hoeller 9e21d2f741 TypeDescriptor equals implementation accepts annotations in any order (SPR-9084) 2012-02-11 19:15:41 +01:00
Juergen Hoeller 9470323724 "setBasenames" uses varargs now (for programmatic setup; SPR-9106) 2012-02-11 19:15:40 +01:00
Juergen Hoeller b17d545bb7 @ActiveProfiles mechanism works with @ImportResource as well (SPR-8992) 2012-02-11 19:15:39 +01:00
Juergen Hoeller 1bd260adaf polishing 2012-02-11 19:15:38 +01:00
Juergen Hoeller 57851de88e clarified Resource's "getFilename" method to consistently return null if resource type does not have a filename (SPR-9043) 2012-02-11 19:15:37 +01:00
Juergen Hoeller 1e1f8c912b substituteNamedParameters detects and unwraps SqlParameterValue objects (SPR-9052) 2012-02-11 19:15:35 +01:00
Rossen Stoyanchev 66bc214a79 Replace spaces with tabs 2012-02-10 18:24:58 -05:00
Chris Beams 45ad183331 Consider security in ClassUtils#getMostSpecificMethod
Recent changes in ExtendedBeanInfo involve invoking
ClassUtils#getMostSpecificMethod when determining JavaBeans get/set
pairs; if Java security settings control disallow reflective access,
this results in an AccessControlException.

This change defends against this (comparatively rare) scenario by
catching the exception and falling back to returning the method
originally supplied by the user.

This change was a result of noticing CallbacksSecurityTests failing
following the ExtendedBeanInfo modifications mentioned above

Issue: SPR-8949
2012-02-10 00:13:24 +01:00
Thomas Risberg 66012b951e Adding null check for username being null.
The username is usually not null, but it  could be for some embedded databases.

Always setting generatedKeysColumnNameArraySupported to false when getGeneratedKeysSupported is false, since it can't be supported without having generated keys supported. This change only affects logging messages.

Issue: SPR-9006
2012-02-09 17:55:04 -05:00
Thomas Risberg f6c7d99ba4 Improvements for registering custom SQL exception translators in app contexts.
Adding a static CustomSQLExceptionTranslatorRegistry and a CustomSQLExceptionTranslatorRegistrar that can be used to register custom SQLExceptionTranslator implementations for specific databases from any application context.

This can be used in application contexts like this:

  <bean class="org.springframework.jdbc.support.CustomSQLExceptionTranslatorRegistrar">
    <property name="sqlExceptionTranslators">
      <map>
        <entry key="H2">
          <bean class="com.yourcompany.data.CustomSqlExceptionTranslator"/>
        </entry>
      </map>
    </property>
  </bean>

Issue: SPR-7675
2012-02-09 17:43:05 -05:00
Thomas Risberg e202d89c29 SPR-7680 Adding QueryTimeoutException to the DataAccessException hierarchy 2012-02-09 17:18:38 -05:00
Rossen Stoyanchev 21aed042ea Minor polish in WebMvcConfigurationSupport 2012-02-09 16:54:55 -05:00
Chris Beams f1ecd1ca2a Detect overridden boolean getters in ExtendedBeanInfo
Prior to this commit, and due to idiosyncracies of
java.beans.Introspector, overridden boolean getter methods were not
detected by Spring's ExtendedBeanInfo, which relied on too-strict
Method equality checks when selecting read and write methods.

Now ExtendedBeanInfo uses Spring's ClassUtils#getMostSpecificMethod
against the methods returned from java.beans.Introspector in order
to ensure that subsequent equality checks are reasonable to make.

Issue: SPR-8949
2012-02-09 22:23:57 +01:00
Chris Beams c1df51a3b4 Polish ExtendedBeanInfoTests
Clean up ignored test, consolidate and document tests cornering
covariant return type edge cases.

Issue: SPR-8079, SPR-8806
2012-02-09 22:23:57 +01:00
Arjen Poutsma edc80ffa95 Use request contentType/encoding in ServletServetHttpRequest/Response
ServletServerHttpRequest now falls back on the contentType and the
the characterEncoding of the ServletRequest, if the headers of the
incoming request don't specify one. Similary ServletServerHttpResponse
sets the contentType and the characterEncoding of the ServletResponse
if not already set.

This allows using the CharacterEncodingFilter to set a character
encoding where the request doesn't specify one and have it be used
in HttpMessageConverter's.

SPR-9096
2012-02-09 12:34:27 -05:00
Chris Beams ff44c9132c Upgrade Hibernate from 4.0.0.CR7=>4.1.0.Final
spring-orm now successfully builds against Hibernate 4.1.0.Final

Issue: SPR-9082
2012-02-09 12:35:58 +01:00
Juergen Hoeller 0db257cbe3 restored preference for covariant return type if applicable 2012-02-09 12:24:13 +01:00
Chris Beams 3eff364529 Upgrade Hibernate from 4.0.0.CR7=>4.1.0.Final
spring-orm now successfully builds against hibernate-core and
hibernate-entitymanager 4.1.0.Final

Issue: SPR-9082
2012-02-09 12:19:21 +01:00
Juergen Hoeller 35c2869875 INSTANCE constant should be marked as final (SPR-9101) 2012-02-09 11:56:06 +01:00
Juergen Hoeller c931eaa436 documentation fixes (SPR-9025, SPR-9027) 2012-02-08 18:35:57 +01:00
Juergen Hoeller 357a5193b7 added reference documentation to IntelliJ project 2012-02-08 18:34:44 +01:00
Juergen Hoeller e4f2cfe39e Provider injection etc 2012-02-08 17:53:15 +01:00
Juergen Hoeller 4aa8b96687 write method parameter type preferred over read method parameter type for property conversion (fixing regression; SPR-8964) 2012-02-08 17:51:06 +01:00
Juergen Hoeller 17bbc623c1 optimized converter lookup to avoid contention in JDK proxy check (SPR-9084) 2012-02-08 17:08:57 +01:00
Juergen Hoeller c55362c35e Provider injection works with generically typed collections of beans as well (SPR-9030) 2012-02-08 16:29:00 +01:00
Chris Beams 27b8c5d71a Resolve build script plugins via http vs https
The build script should work against http anyway; use of https here was
an oversight. Changing it now is in response to the following build
failure experienced by a user on his initial attempt to build from
source (with --info output):

  09:02:09.437 [ERROR] [org.gradle.BuildExceptionReporter] Caused
  by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
  ...
  Cause: Could not GET
  https://repo.springsource.org/plugins-snapshot/org/springframework/
  build/gradle/docbook-reference-plugin/0.1.2-SNAPSHOT/maven-metadata.xml

The actual cause is unknown at this time, but worth noting that upon
switching the url to http, the following log message was issued:

  Forcing close on abandoned resource: Http GET Resource:
  http://repo.springsource.org/plugins-snapshot/org/springframework/
  build/gradle/docbook-reference-plugin/0.1.2-SNAPSHOT/maven-metadata.xml
2012-02-08 16:23:23 +01:00
Juergen Hoeller 9a61f36d3d removed optional javax.validation.spi dependency (SPR-8973) 2012-02-08 12:52:51 +01:00
Juergen Hoeller 95e3f486b5 fixed SpringValidatorAdapter regression to return correct error codes for class-level constraints (SPR-8958) 2012-02-08 12:46:05 +01:00
Juergen Hoeller 2a0714b41c converted EmptyResultDataAccessException preserves JPA NoResultException as root cause (SPR-9041) 2012-02-08 12:23:15 +01:00
Juergen Hoeller efd2783dd1 restored JBossLoadTimeWeaver compability with JBoss AS 5.1 (SPR-9065) 2012-02-08 12:14:58 +01:00
jhoeller 5b18fc44ce Merge pull request #16 from cbeams/SPR-8954
Check original beanClass in #isFactoryBean calls
2012-02-08 02:58:19 -08:00
Rossen Stoyanchev 4f4a2e7fc7 Update documentation with regards to differences between @MVC 3.0/3.1
Although the reference documentation listed the new @MVC support
classes and their benefits, it did not explicitly mention a few
use cases that are no longer supported. There is now a specific
section on the new support classes listing exactly what is not
supported.

Similary the @RequestMapping annotation never refered explicitly
to the existence of old and new support and never made it clear
exactly what the differences are.

Both have not been corrected.

SPR-9063, SPR-9042
2012-02-07 19:49:44 -05:00
Chris Beams bf541db5b0 Refactor to consistent use of AnnotationAttributes
Uses of AnnotationMetadata#getAnnotationAttributes throughout the
framework have been updated to use the new AnnotationAttributes API in
order to take advantage of the more concise, expressive and type-safe
methods there.

All changes are binary compatible to the 3.1.0 public API, save
the exception below.

A minor binary compatibility issue has been introduced in
AbstractCachingConfiguration, AbstractAsyncConfiguration and
AbstractTransactionManagementConfiguration when updating their
protected Map<String, Object> fields representing annotation attributes
to use the new AnnotationAttributes API. This is a negligible breakage,
however, as the likelilhood of users subclassing these types is very
low, the classes have only been in existence for a short time (further
reducing the likelihood), and it is a source-compatible change given
that AnnotationAttributes is assignable to Map<String, Object>.
2012-02-07 21:57:49 +01:00
Chris Beams d9f7fdd120 Support reading nested annotations via ASM
Background

  Spring 3.1 introduced the @ComponentScan annotation, which can accept
  an optional array of include and/or exclude @Filter annotations, e.g.

     @ComponentScan(
         basePackages = "com.acme.app",
         includeFilters = { @Filter(MyStereotype.class), ... }
     )
     @Configuration
     public class AppConfig { ... }

  @ComponentScan and other annotations related to @Configuration class
  processing such as @Import, @ImportResource and the @Enable*
  annotations are parsed using reflection in certain code paths, e.g.
  when registered directly against AnnotationConfigApplicationContext,
  and via ASM in other code paths, e.g. when a @Configuration class is
  discovered via an XML bean definition or when included via the
  @Import annotation.

  The ASM-based approach is designed to avoid premature classloading of
  user types and is instrumental in providing tooling support (STS, etc).

  Prior to this commit, the ASM-based routines for reading annotation
  attributes were unable to recurse into nested annotations, such as in
  the @Filter example above. Prior to Spring 3.1 this was not a problem,
  because prior to @ComponentScan, there were no cases of nested
  annotations in the framework.

  This limitation manifested itself in cases where users encounter
  the ASM-based annotation parsing code paths AND declare
  @ComponentScan annotations with explicit nested @Filter annotations.
  In these cases, the 'includeFilters' and 'excludeFilters' attributes
  are simply empty where they should be populated, causing the framework
  to ignore the filter directives and provide incorrect results from
  component scanning.

  The purpose of this change then, is to introduce the capability on the
  ASM side to recurse into nested annotations and annotation arrays. The
  challenge in doing so is that the nested annotations themselves cannot
  be realized as annotation instances, so must be represented as a
  nested Map (or, as described below, the new AnnotationAttributes type).

  Furthermore, the reflection-based annotation parsing must also be
  updated to treat nested annotations in a similar fashion; even though
  the reflection-based approach has no problem accessing nested
  annotations (it just works out of the box), for substitutability
  against the AnnotationMetadata SPI, both ASM- and reflection-based
  implementations should return the same results in any case. Therefore,
  the reflection-based StandardAnnotationMetadata has also been updated
  with an optional 'nestedAnnotationsAsMap' constructor argument that is
  false by default to preserve compatibility in the rare case that
  StandardAnnotationMetadata is being used outside the core framework.
  Within the framework, all uses of StandardAnnotationMetadata have been
  updated to set this new flag to true, meaning that nested annotation
  results will be consistent regardless the parsing approach used.

  Spr9031Tests corners this bug and demonstrates that nested @Filter
  annotations can be parsed and read in both the ASM- and
  reflection-based paths.

Major changes

 - AnnotationAttributes has been introduced as a concrete
   LinkedHashMap<String, Object> to be used anywhere annotation
   attributes are accessed, providing error reporting on attribute
   lookup and convenient type-safe access to common annotation types
   such as String, String[], boolean, int, and nested annotation and
   annotation arrays, with the latter two also returned as
   AnnotationAttributes instances.

 - AnnotationUtils#getAnnotationAttributes methods now return
   AnnotationAttributes instances, even though for binary compatibility
   the signatures of these methods have been preserved as returning
   Map<String, Object>.

 - AnnotationAttributes#forMap provides a convenient mechanism for
   adapting any Map<String, Object> into an AnnotationAttributes
   instance. In the case that the Map is already actually of
   type AnnotationAttributes, it is simply casted and returned.
   Otherwise, the map is supplied to the AnnotationAttributes(Map)
   constructor and wrapped in common collections style.

 - The protected MetadataUtils#attributesFor(Metadata, Class) provides
   further convenience in the many locations throughout the
   .context.annotation packagage that depend on annotation attribute
   introspection.

 - ASM-based core.type.classreading package reworked

   Specifically, AnnotationAttributesReadingVisitor has been enhanced to
   support recursive reading of annotations and annotation arrays, for
   example in @ComponentScan's nested array of @Filter annotations,
   ensuring that nested AnnotationAttributes objects are populated as
   described above.

   AnnotationAttributesReadingVisitor has also been refactored for
   clarity, being broken up into several additional ASM
   AnnotationVisitor implementations. Given that all types are
   package-private here, these changes represent no risk to binary
   compatibility.

 - Reflection-based StandardAnnotationMetadata updated

   As described above, the 'nestedAnnotationsAsMap' constructor argument
   has been added, and all framework-internal uses of this class have
   been updated to set this flag to true.

Issue: SPR-7979, SPR-8719, SPR-9031
2012-02-07 21:57:49 +01:00
Juergen Hoeller 905d17d444 LocalContainerEntityManagerFactoryBean etc 2012-02-07 21:00:14 +01:00
Juergen Hoeller 62e5b9da04 LocalContainerEntityManagerFactoryBean's "persistenceUnitName" applies to "packagesToScan" as well; DefaultPersistenceUnitManager uses containing jar as persistence unit root URL for default unit (SPR-8832) 2012-02-07 20:59:48 +01:00
Juergen Hoeller f367619b0c added "durability" and "description" properties to JobDetailFactoryBean (SPR-9080) 2012-02-07 15:54:18 +01:00
Juergen Hoeller afa4bb3f1b fixed javadoc link (SPR-9089) 2012-02-07 15:54:17 +01:00
Juergen Hoeller f8238f5243 Servlet/PortletContextResource's "isReadable()" implementation returns false for directories (SPR-9067) 2012-02-07 15:54:16 +01:00
Arjen Poutsma 7a170e8005 Updated IntelliJ project for JUnit 4.9.0 2012-02-07 15:41:49 +01:00
Arjen Poutsma 3ec78e2c04 SPR-9093: UriTemplate not throwing IllegalArgumentException when URIVariables map missing values 2012-02-07 15:40:50 +01:00
Rossen Stoyanchev a3bb3769ba Tighten FlashMapManager for use with alternative storage options
Ensure that both FlashMapManager methods - the one invoked at the
start of a request and the one invoked before a redirect, update
the underlying storage fully since it's not guaranteed that both
will be invoked on any given request.

Also move the logic to remove expired FlashMap instances to the
metohd invoked at the start of a request to ensure the check is
made frequently enough.

SPR-8997
2012-02-06 18:04:27 -05:00
Chris Beams 598b125bb2 Merge pull request #27 from trisberg/parameter-parsing 2012-02-06 09:47:35 +01:00
Thomas Risberg 9fb6e2313c Fix single quote parsing in NamedParameterUtils
Prior to this change, single quotes were incorrectly parsed by
NamedParameterUtils#parseSqlStatement, resulting in incorrect parameter
counts:

    ParsedSql sql = NamedParameterUtils
            .parseSqlStatement("SELECT 'foo''bar', :xxx FROM DUAL");
    assert sql.getTotalParameterCount() == 0 // incorrect, misses :xxx

That is, presence of the single-quoted string caused the parser to
overlook the named parameter :xxx.

This commit fixes the parsing error such that:

    ParsedSql sql = NamedParameterUtils
            .parseSqlStatement("SELECT 'foo''bar', :xxx FROM DUAL");
    assert sql.getTotalParameterCount() == 1 // correct

Issue: SPR-8280
2012-02-06 09:47:17 +01:00
Chris Beams ff84419f4d Merge pull request #26 from trisberg/improved-RDP 2012-02-06 09:04:08 +01:00
Thomas Risberg 2ffa4725cd Allow SELECT statements in ResourceDatabasePopulator
ResourceDatabasePopulator is a component that underlies the database
initialization support within Spring's jdbc: namespace, e.g.:

    <jdbc:initialize-database data-source="dataSource">
        <jdbc:script execution="INIT" location="classpath:init.sql"/>
    </jdbc:initialize-database>

Prior to this commit, ResourceDatabasePopulator#executeSqlScript's use
of Statement#executeUpdate(sql) precluded the possibility of SELECT
statements because returning a result is not permitted by this method
and results in an exception being thrown.

Whether this behavior is a function of the JDBC specification or an
idiosyncracy of certain implementations does not matter as the issue
can be worked around entirely. This commit eliminates use
of #executeUpdate(sql) in favor of #execute(sql) followed by a call
to #getUpdateCount, effectively allowing any kind of SQL statement to
be executed during database initialization.

Issue: SPR-8932
2012-02-06 08:59:28 +01:00
Chris Beams 025b8abfaf Allow ACI classes access to servlet context params
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
2012-02-04 23:13:52 +01:00
Chris Beams 856b77bc31 Optimize ApplicationContextInitializer handling
- Perform early check whether any ACI classes have been declared and
   exit immediately if not, avoiding any other processing

 - Polish method names in ContextLoaderTests

Issue: SPR-8991
2012-02-04 23:13:48 +01:00
Chris Beams a9451d11f6 Relax -aspects dependence on -test (compile=>test)
The spring-aspects Maven pom had an incorrect compile-scoped dependence
on spring-test. In fact, spring-aspects only uses spring-test in its
unit tests. The pom has been updated accordingly, meaning that use
of spring-aspects in Maven-based applications will no longer require
spring-test on the classpath at runtime.

ivy.xml metadata did not need updating, as it was already correct.

This change is only necessary on the 3.1.x line; in 3.2.x (master) Maven
poms are generated automatically from Gradle dependency metadata, which
is also already correct.

Issue: SPR-9048
2012-02-04 17:49:11 +01:00
Rossen Stoyanchev 871336a8c8 Better support for @SessionAttributes in clustered environments
A list of "known" session attributes (listed in @SessionAttributes)
was gradually built as attributes get added to the model. In a
failover scenario that knowledge is lost causing session attributes
to be potentially re-initialized via @ModelAttribute methods.

With this change @SessionAttributes listed by name are immediately
added to he list of "known" session attributes thus this knowledge
is not lost after a failover. Attributes listed by type however
still must be discovered as they get added to the model.
2012-02-03 12:23:24 -05:00
Chris Beams 81e25b91c2 Respect @Configuration(value) for @Imported classes
Prior to this commit, @Configuration classes included via @Import (or
via automatic registration of nested configuration classes) would
always be registered with a generated bean name, regardless of whether
the user had specified a 'value' indicating a customized bean name, e.g.

    @Configuration("myConfig")
    public class AppConfig { ... }

Now this bean name is propagated as intended in all cases, meaning that
in the example above, the resulting bean definition of type AppConfig
will be named "myConfig" regardless how it was registered with the
container -- directly against the application context, via component
scanning, via @Import, or via automatic registration of nested
configuration classes.

Issue: SPR-9023
2012-02-03 17:54:03 +01:00
Rossen Stoyanchev 6e5cc53fc9 SPR-9085 Correct typo. 2012-02-02 09:56:02 -05:00
Chris Beams 17cf465d23 Fix method equality bug in ExtendedBeanInfo
A number of users reported issues with comparing method identity vs
equivalence when discovering JavaBeans property methods in
ExtendedBeanInfo.

This commit updates the implementation to consistently use '.equals()'
instead of '=='.

Issue: SPR-8079, SPR-8347
2012-02-02 15:24:52 +01:00
Chris Beams f3f73f0e32 Check original beanClass in #isFactoryBean calls
This issue originates from a need in Spring Data JPA, wherein a custom
InstantiationAwareBeanPostProcessor may alter the predicted type of
FactoryBean objects, effectively preventing retrieval of those beans via
calls to #getBeansOfType(FactoryBean.class).

The reason for this "masking effect" is that prior to this change, the
implementation of AbstractBeanFactory#isFactoryBean considered only the
"predicted type" returned from #predictBeanType when evaluating
assignability to FactoryBean.class

The implementation of #isFactoryBean now ensures that not only the
predicted bean type is considered, but also the original bean
definition's beanClass (if one is available).

Issue: SPR-8954
2012-02-02 12:38:23 +01:00
Kris De Volder 56026863e8 Remove javabuilder from spring-aspects .project
Previously, the build script was configured to add ajbuilder to the set
of Eclipse/STS build commands, meaning that both javabuilder and
ajbuilder would be present for spring-aspects. This causes unpredictable
behavior, as these two builders compete with each other. As ajbuilder is
a functional superset of javabuilder, this commit ensures that only the
former is present for spring-aspects' .project file.

Also removed warning language in import-into-eclipse.sh about
spring-aspects failing after adding Git support, as this intermittent
problem was almost certainly an artifact of the situation described
above.
2012-02-02 10:45:41 +01:00
Rossen Stoyanchev 010abd06e3 SPR-9077 Remove empty path segments from input to UriComponentsBuilder. 2012-02-01 19:51:00 -05:00
Rossen Stoyanchev 8530828eb4 SPR-9076 Add normalize() method to UriComponents. 2012-02-01 19:12:52 -05:00
Rossen Stoyanchev 95683f5137 SPR-9075 Add fromRequestUri() methods to ServletUriComponentsBuilder 2012-02-01 18:54:08 -05:00
Chris Beams f61410705c Merge pull request #21 from aclement/spr9038 2012-02-01 22:47:36 +01:00
Rossen Stoyanchev 64a69f7cf8 SPR-9079 Don't check for "POST" multipart request method arg resolvers 2012-02-01 13:22:12 -05:00
Andy Clement 90bed9718f Allow customization of SpEL method resolution
This change introduces a protected ReflectiveMethodResolver#getMethods,
allowing subclasses to specify additional static methods not
declared directly on the type being evaluated. These methods then become
candidates for filtering by any registered MethodFilters and ultimately
become available within for use within SpEL expressions.

Issue: SPR-9038
2012-02-01 17:36:57 +01:00
Chris Beams c7fd03be69 Polish ReflectiveMethodResolver and unit tests
- Update Javadoc
 - Fix whitespace errors (tabs v. spaces, trailing spaces)
 - Break at 90 chars where sensible
 - Remove dead test code
 - Fix generics warnings, remove @SuppressWarnings
2012-02-01 17:36:57 +01:00
Chris Beams aad21830bb Remove global 'clean' from import-into-eclipse.sh
User may already have run `gradle build` successfully. This change
ensures that we do not unnecessarily remove these output directories
in order to avoid forcing the user to rebuild.
2012-02-01 17:28:14 +01:00
Chris Beams 0ae973f995 Merge branch '3.1.x'
Conflicts:
	spring-webmvc/src/main/java/org/springframework/web/servlet/support/DefaultFlashMapManager.java
	spring-webmvc/src/test/java/org/springframework/web/servlet/support/DefaultFlashMapManagerTests.java
2012-02-01 11:39:48 +01:00
Rossen Stoyanchev 3d1fa4f6b6 SPR-9060 Revise HTTP Session based FlashMapManager implementation.
The "default" FlashMapManager implementation added in 3.1 was invoked
after the redirect, which is too late in cases where the HTTP session
has not been yet been created since as the response is committed.

This change corrects the issue and makes other improvements to the
FlashMapManager implementation such as extracting a base
AbstractFlashMapManager class and making it easier for other
implementations to be added (for example cookie-based).
2012-01-31 22:10:55 -05:00
Chris Beams 9a1a00a651 Make jasperreports optional for context-support 2012-01-31 18:08:17 +01:00
Chris Beams 398cf997b3 Merge branch '3.1.x'
This is the first merge from 3.1.x => master after the Gradle build
system migration. Notice how files changed under the 3.1.x directory
structure (org.springframework.*) merge seamlessly into the new
directory structure (spring-*).

Certain files had changed under 3.1.x that have since been deleted with
the Gradle build migration, e.g. all pom.xml files had <license>
sections added. These files showed up as a conflict during the merge,
but the resolution is to simply re-remove them and commit as they are
no longer relevant under 3.2.x / master.

Also noteworthy is the .gitignore file. It has been updated under 3.1.x
to ignore files and directories specific to the new Gradle-based
structure. However, this causes conflicts when trying to merge against
master, given that master should *not* ignore this directories. The
resolution in this situation is to simply force the 'master' version of
the file, i.e. when prompted for merge resolution:

    anakata:~/Work/spring-framework/spring-framework[master|MERGING]
    $ git status -sb
    ## master...springsource/master [ahead 24]
    UU .gitignore

    anakata:~/Work/spring-framework/spring-framework[master|MERGING]
    $ git checkout master .gitignore

    anakata:~/Work/spring-framework/spring-framework[master|MERGING]
    $ git commit

It is helpful in situations like this one to enable git's "rerere"
feature beforehand, which records and remembers resolution strategies,
avoiding the need to repeat them in future merges:

    $ git config --global rerere.enabled 1

See:
    http://progit.org/2010/03/08/rerere.html
    http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time

Conflicts:
    .gitignore
    .springframework.*/pom.xml
2012-01-31 16:03:24 +01:00
Chris Beams 5c0c37e748 Merge pull request #22 from cbeams/gradle
This merge migrates the Spring Framework 3.2.x build system to Gradle.

Major changes

 - Remove Ant-based spring-build and related resources
 - Replace with Gradle-based build
 - Remove (and .gitignore) all IDE metadata files
 - Remove hand-maintained Maven poms in favor of generation by Gradle
 - Move integration-tests subproject to root src/test dir
 - Move spring-framework-reference subproject to root src/reference dir
 - Rename org.springframework.* subprojects => spring-*

 See individual messages for the commits included in this merge for
 details on each of these changes.

Documentation

 - https://github.com/SpringSource/spring-framework#building_from_source

 - https://github.com/SpringSource/spring-framework/wiki
   see 'Build and release FAQ' and 'SpringSource repository FAQ'

Issue: SPR-8116
2012-01-31 15:30:51 +01:00
Chris Beams f3c3babfdf Update Quartz links in reference and Javadoc
Issue: SPR-8915
2012-01-31 15:18:05 +01:00
Chris Beams 87a021d5c9 Add <license> section to 3.1.x Maven poms
Issue: SPR-8927
2012-01-31 15:18:05 +01:00
Chris Beams 38a62f8389 Ignore Gradle-related files and directories
When switching back to 3.1.x from master, ignore renamed directories,
Gradle 'build' dirs, generated IDE metadata, etc.

You may wish to clean these files with

    $ git clean -dfx

Or do a dry-run beforehand with the '-n' flag:

    $ git clean -dfxn
2012-01-31 15:18:05 +01:00
Chris Beams f8800557d3 Update README and add IDE import helper scripts
- Update building from source section with Gradle instructions
 - Add import-into-eclipse.sh interactive helper script
 - Add import-into-idea.md with steps and known issues

Note that use of STS Gradle tooling was attempted, but several issues
remain before it can handle the spring-framework build. In the meantime
the instructions laid out in import-into-eclipse provide an error-free
import.
2012-01-31 14:37:12 +01:00
Chris Beams 7b05a1247c Remove remaining static Eclipse/IDEA metadata
Eclipse .project, .classpath, and .settings metadata have already been
removed. Now removing Eclipse .psf and formatter XML files from the root
project as well as removing all manually-maintained IDEA .iml and .ipr
files.

This is in favor of using Gradle's own 'eclipse' and 'idea' tasks that
generate this kind of metadata on the fly.

.gitignore has been updated to ignore these files going forward. In any
case, they should not be checked into the source tree! The README.md
file will be updated to explain how to generate these files using gradle
and how to import the projects into your IDE of choice.
2012-01-31 14:37:12 +01:00
Chris Beams ddf8eaf38a Mark remaining @Ignored tests with 'TODO SPR-8116'
Each of these tests began failing during the Gradle build porting
process. None seem severe, many are likely due to classpath issues.

In the case of TestNG support, this needs to be added to the Gradle
build in order to execute these tests. See SPR-8116.txt
2012-01-31 14:37:12 +01:00
Chris Beams 5ea51f42fb Fix and refactor spring-aspects build
- Fix compileTestJava issue in which test classes were not being
   compiled or run

 - Use built-in eclipse.project DSL instead of withXml closure
   to add AspectJ nature and builder

 - Rename {aspectJ=>aspects}.gradle and format source
2012-01-31 14:37:12 +01:00
Chris Beams 77d8e81744 Add Implementation-Version entry to MANIFEST.MF
e.g.:

    Implementation-Title: spring-core
    Implementation-Version: 3.2.0.BUILD-SNAPSHOT

Setting these values is good as a general practice, but required in
order to support the functionality in spring-core's SpringVersion class.
2012-01-31 14:37:12 +01:00
Chris Beams 6235a341a7 Remove bundlor support 2012-01-31 14:37:11 +01:00
Chris Beams 02a4473c62 Rename modules {org.springframework.*=>spring-*}
This renaming more intuitively expresses the relationship between
subprojects and the JAR artifacts they produce.

Tracking history across these renames is possible, but it requires
use of the --follow flag to `git log`, for example

    $ git log spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history up until the renaming event, where

    $ git log --follow spring-aop/src/main/java/org/springframework/aop/Advisor.java

will show history for all changes to the file, before and after the
renaming.

See http://chrisbeams.com/git-diff-across-renamed-directories
2012-01-31 14:37:10 +01:00
Chris Beams b6cb514d38 Generate Maven Central-compatible poms
Understanding Gradle pom generation
-------------------------------------------

All spring-* subprojects have had Gradle's 'maven' plugin applied to
them. This means that one can run `gradle install`, and POMs will be
generated according to the metadata in the build.gradle file.

The 'customizePom' routine added by this commit hooks into this
generation process in order to add elements to the pom required for
entry into Maven Central via oss.sonatype.org[1].

This pom generation happens on-the-fly during `gradle install` and
the generated poms exist only in your local .m2 cache. Therefore,
you will not see the poms on the source tree after this command.

Handling optional and provided dependencies
-------------------------------------------

Note particularly the handling of 'optional' and 'provided'
dependencies. Gradle does not have a first class notion for these
concepts, nor are they significant to the actual Gradle build process,
but they are important when publishing POMs for consumption via Maven
Central and other Maven-compatible repositories.

<optional>true</optional> indicates that a dependency need not be
downloaded when resolving artifacts. e.g. spring-context has an
compile-time dependency on cglib, but when a Spring user resolves
spring-context from Maven Central, cglib should *not* automatically
be downloaded at the same time. This is because the core functionality
within spring-context can operate just fine without cglib on the
classpath; it is only if the user chooses explicitly to use certain
functionality, e.g. @Configuration classes, which do require cglib,
that the user must declare an explicit dependency in their own build
script on cglib.

Marking these kinds of dependencies as 'optional' provides a kind of
built in 'documentation' about which version of cglib the user should
declare if in fact he wishes to.

Spring has a great many compile-time dependencies, but in fact very
few mandatory runtime dependencies. Therefore, *most* of Spring's
dependencies are optional.

<scope>provided</scope> is similar to 'optional', in that dependencies
so marked should not be automatically downloaded during dependency
resolution, but indicates rather that they are expected to have been
provided by the user application runtime environment. For example, the
Servlet API is in fact a required runtime dependency for spring-webmvc,
but it is expected that it will be available via the user's servlet
container classpath. Again, it serves here as a kind of 'documentation'
that spring-webmvc does in fact expect the servlet api to be available,
and furthermore which (minimum) version.

This commit adds two closures named 'optional' and 'provided' as well as
two arrays (optionalDeps, providedDeps) for tracking which dependencies
are optional or provided. An optional dependency is declared as follows:

    compile("group:artifact:version", optional)

Here, the optional closure accepts the dependency argument implicitly,
and appends it to the 'optionalDeps' array. Then, during pom generation
(again, the customizePom routine), these arrays are interrogated, and
pom <dependency> elements are updated with <optional>true</optional> or
<scope>provided</scope> as appropriate. Thanks to the Spock framework
for inspiration on this approach[2].

[1] http://bit.ly/wauOqP (Sonatype's central sync requirements)
[2] https://github.com/spockframework/spock/blob/groovy-1.7/gradle/publishMaven.gradle#L63
2012-01-31 14:37:06 +01:00
Chris Beams de5c42df93 Remove manually-maintained Maven poms
This is in favor of Gradle-generated poms (a la `gradle install`)
2012-01-31 14:37:06 +01:00
Chris Beams daf4f022f3 Remove spring-build and friends 2012-01-31 14:37:06 +01:00
Chris Beams 69dd6f2170 Remove EBR dependencies where possible
Only a select few EBR dependencies now remain, because these
dependencies cannot be found elsewhere e.g. atinject-tck, or in the case
of Hibernate 3.3.1.GA, to avoid Gradle classpath confusion with
Hibernate 4.0.x (because they have different artifactIds).

Future efforts will be made to fully eliminate these dependencies in
order to ensure we're decoupled completely from EBR.

Important note: these remaining EBR dependencies do not constitute a
problem when publishing artifacts into Maven Central via
oss.sonatype.org, because they are each 'optional' dependencies. It
appears that OSO's restriction around transitive dependencies being
'self-contained' within Maven Central only applies to mandatory
dependencies (which is a good thing for cases just such as this).

Add explicit /ebr-maven-external entry to repositories, as EBR
dependencies are not available via /libs-release.
2012-01-31 14:37:06 +01:00
Chris Beams d170e63147 Generate OSGi manifests using bundlor-plugin
- Apply custom-built Gradle 'bundlor' plugin

   This plugin wraps the existing bundlor ant task. Sources available
   at https://github.com/SpringSource/gradle-plugins.

 - Use existing template.mf files

   The bundlor plugin allows for 'inlining' bundlor templates directly
   within build.gradle using the 'importTemplate' property, but opting
   for now to keep the template.mf files separate.

 - Exclude spring-aspects from bundlor processing

   It appears that the bundlor plugin somehow interferes with iajc
   compilation of aspects, resulting in compiler errors. Bundlor
   has been disabled for this project for the time being.

 - Fail the build on any bundlor warning

   The gradle bundlor plugin defaults to failing the build if there are
   any warnings when processing template.mf files. This helps to ensure
   that template.mf files don't drift too far from actual dependency
   declarations. This behavior can be modified by setting

      bundlor {
          failOnWarnings = false
      }

   in the build script.
2012-01-31 14:36:48 +01:00
Chris Beams d6712d5983 Generate spring-oxm test classes and bindings
- Generate castor test classes with genCastor task
 - Generate xmlbeans test classes with genXmlbeans task
 - Generate JAXB2 test classes with genJaxb task
 - Generate JiBX bindings by extending existing compileTestJava task

Test classes are written into their own dedicated output folders and
tied into the spring-oxm classpath using the files(...).builtBy(...)
directive.

Incremental build works as expected across all of these customizations.

`gradle eclipse` and `gradle idea` generate correct .project / .iml
metadata respectively, i.e., these special cases do not cause a problem
in the IDE (as they used to prior to the move to Gradle).
2012-01-31 14:32:16 +01:00
Chris Beams 366f0d7892 Generate -sources and -javadoc jars
Each spring-* subproject now has sourcesJar and javadocJar tasks

 - Ignore subproject overview.html files for now (not all have one)
 - Ensure @author attribution occurs
 - Javadoc 'header' is project description

spring-asm is a special case

 - source jar is created, but empty (to comply with entry rules for
   Maven Central)

 - add package-info.java explaining the nature of spring-asm
   this is nice, because it shows up in the public API docs now.

 - add SpringAsmInfo in the org.springframework.asm package as a
   placeholder allowing the generation of javadocs (see link to bug)

 - add explicit 'repackageAsm' Gradle task allowing for easy testing
   and merging of jar containing bundlor manifest as well as jar
   containing repackaged ASM classes.
2012-01-31 14:32:16 +01:00
Chris Beams 2bab8f3c0b Generate -docs, -schema and -dist zips
- Add 'api' gradle task to generate project-wide API Javadoc

   results in <root>/build/api

 - Add docsZip task including api and reference documentation

   suitable for publication to
   http://static.springframework.org/docs/spring-framework

 - Add schemaZip task including all spring-* XSD files

   suitable for publication to http://static.springframework.org/schema

 - Add distZip task to include all libs, docs and schema

   - filter src/dist/*.txt for ${copyright} and ${version}
   - copy legal (notice, license) dynamically into individual jar files
   - copy legal and readme files into root of distribution zip

 - Refactor location of 'wrapper' task

Each of the zip tasks (docsZip, schemaZip, distZip) have been added to
the 'archives' configuration, meaning that (a) they will be built
automatically with `gradle build` and (b) will be published
automatically to artifactory when using the Artifactory Gradle plugin
and/or Artifactory Bamboo integration.
2012-01-31 14:32:16 +01:00
Chris Beams 2ca6d0b2be Centralize license, notice, etc in src/dist
Prior to this change, license.txt and notice.txt files were duplicated
across every subproject in their respective src/main/resources/META-INF
directories.

This commit centralizes these files under the root project at src/dist,
along with the changelog and readme files. The definition of the 'jar'
task has been been extended to include the license and notice files in
module jars as they are created.

The directory is named src/dist because these files are all related to
distribution - the readme is different than the one you see at the root
of the source tree - the intended audience is for users who download
the spring-framework distribution zip. A task to create that
distribution zip will be added in subsequent commits.
2012-01-31 14:32:15 +01:00
Chris Beams 86b5066a96 Fix minor problems and polish reference docs
Problems

 - Eliminate &mdash; in favor of &#151;

   &mdash; was causing 'no such entity' errors during docbook
   processing; &#151; produces the equivalent output.

 - Fix column issues in appendices

   column counts were set to 3, when they are in fact 4. This passed
   under DocBook 4 and Spring Build for unknown reasons, but caused a
   hard stop under DocBook 5 and the docbook-reference-plugin.

 - Add jdbc callout section in docbook 5-friendly style

   use <co/> tags as advertised in DocBook documentation.

 - Set correct widths for PDF ref doc images

   images were rendering larger than the PDF page; just set all to
   width=400 and everything looks good.

Polish

 - Update reference doc copyright to 2012

 - Remove "work-in-progress" language from ref docs

 - Update maven URLs to repo.springsource.org

 - Update javadoc urls from 3.0.x/javadoc-api => current/api

 - Replace hardcoded "3.1" with ${version} in ref doc
2012-01-31 14:32:15 +01:00
Chris Beams 7a3aa70565 Remove <emphasis> to work around DocBook bug
It was determined (through painful trial and error) that after the
upgrade to DocBook 5 and the gradle-docbook-reference plugin, that
<emphasis> elements embedded within <programlisting> elements causes
NullPointerExceptions during processing.

This change eliminates these <emphasis> elements to work around the
problem. This means a slight degradation in presentation for the
affected areas of the reference documentation. After some research,
it is not clear what other workarounds may be possible that leave
the text actually emphasized.
2012-01-31 14:32:15 +01:00
Chris Beams faa750dbc7 Generate reference docs with docbook-gradle-plugin
The docbook-gradle-plugin has been custom-developed specifically to
handle Spring projects. It is highly opinionated, and not terribly
configurable in its current form. Sources and documentation are
available via the 'gradle-plugins' github repository at

    https://github.com/cbeams/gradle-plugins

Note that this repository may soon move locations to the SpringSource
GitHub organization, in which case the url will be

    https://github.com/SpringSource/gradle-plugins

In any case, the build plans for these plugins can be found at

    https://build.springsource.org/browse/GRADLEPLUGINS
2012-01-31 14:32:15 +01:00
Chris Beams 3641337186 Upgrade reference docs to DocBook 5
For compatibility with Gradle docbook-reference-plugin, which cannot
handle DocBook 4.
2012-01-31 14:32:15 +01:00
Chris Beams 62e94461f4 Move reference docs => src/reference
This change eliminates the spring-framework-reference subproject, moving
these sources into the root project's own src directory.

This makes sense because the reference docs span all submodules, and
also because api Javadoc is created at the root project level as well.
This means that both api and reference documentation output will now
reside in the root project's 'build' directory. This is more consistent
and easy to discover.
2012-01-31 14:32:14 +01:00
Chris Beams 0a07a0ed92 Move integration tests => src/test
This commit eliminates the 'integration-tests' subproject in favor of
managing these sources under the root project's own 'src' directory.

This helps to avoid special-case handling for integration-tests in the
Gradle build, e.g. avoiding publication of jars to Artifactory /
Maven Central.

It is also semantically more correct. This is not a Spring Framework
subproject so much as it is a collection of integration tests that
span functionality across many subprojects. In this way, it makes
sense to place them directly under the root project.

Issue: SPR-8116
2012-01-31 14:32:14 +01:00
Chris Beams f79c514920 Introduce Gradle-based build
- Use recent Gradle 1.0-milestone-8 snapshot
 - Add initial cut of build.gradle able to compile/test all modules
 - Update .gitignore
 - Generate Gradle wrapper scripts
 - Remove all Eclipse metadata files
 - Temporarily @Ignore tests that do not pass under Gradle
2012-01-31 14:31:04 +01:00
Rossen Stoyanchev e9208981a6 SPR-9062 Fix bug with ambiguous path and HTTP method request mappings
A direct path match with incorrect HTTP request method was causing another
request mapping with a pattern and a correct HTTP method to be ignored.
The bug affects the new @MVC support classes
(i.e. RequestMappingHandlerMapping).
2012-01-30 19:52:20 -05:00
Rossen Stoyanchev 21966990c8 SPR-9016 Add flag to Redirectview to disable expanding URI vars 2012-01-30 18:39:20 -05:00
Rossen Stoyanchev 610fa618aa SPR-9056 Make DelegatingWebMvcConfiguration config callbacks not final
It should be possible to progress from extending
WebMvcConfigurerAdapter (w/ @EnableWebMvc) to extending
WebMvcConfigurationSupport directly, to extending
DelegatingWebMvcConfigurationSupport. This change
makes that possible.
2012-01-30 17:55:34 -05:00
Chris Beams 3798626a90 Merge branch '3.1.x' 2012-01-25 23:17:39 +01:00
Arjen Poutsma 8980ce712d SPR-8986 RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum
- Added getRawStatusCode
2012-01-23 14:26:11 +01:00
Arjen Poutsma ff9ad7adc6 SPR-8986 RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum
- Added status codes from Wikipedia
2012-01-23 14:03:14 +01:00
Arjen Poutsma 79f32c7f33 SPR-8986 Add the ability to Scan Packages for JAXB Marshalling
Jaxb2Marshaller now has the capability to scan for classes annotated with JAXB2 annotations.
2012-01-20 16:25:33 +01:00
Rossen Stoyanchev bcd8355e61 SPR-8974 Fix regression in UriUtils.java 2012-01-19 23:47:31 -05:00
Chris Beams 9c45acd43a Update links to reference and api documentation 2012-01-16 22:16:43 +01:00
Juergen Hoeller 958bd49850 Hibernate 4 LocalSessionFactoryBean, etc 2012-01-15 20:09:35 +01:00
Juergen Hoeller 697bc43c40 added missing @Override annotations 2012-01-15 20:07:51 +01:00
Juergen Hoeller 3fdbe1081d JMS SimpleMessageListenerContainer silently falls back to lazy registration of consumers () 2012-01-15 20:07:50 +01:00
Juergen Hoeller 4a63a5b3ba fixed "configTimeRegionFactoryHolder" reset 2012-01-15 20:07:49 +01:00
Juergen Hoeller 56d0e67581 added "getConfiguration" accessor to Hibernate 4 LocalSessionFactoryBean (SPR-8961) 2012-01-15 20:07:49 +01:00
Juergen Hoeller 96b8c46480 nicer error message indicating JAX-WS 2.1 requirement at runtime (SPR-8998) 2012-01-15 20:07:48 +01:00
Juergen Hoeller b91e989ad4 JMS CachingConnectionFactory never caches consumers for temporary queues and topics 2012-01-15 20:07:47 +01:00
Rossen Stoyanchev e8fc90ce3e SPR-8917 Fix issue with quoted parameter values in MediaType. 2012-01-13 15:25:53 -05:00
Rossen Stoyanchev b0c735feae SPR-8976 Make flash attrs available to view controllers.
Previously flash attributes were automatically merged into the
model of annotated controllers only. This change extends the same
benefit to ParameterizableView- and UrlFilenameViewController,
both of which merely select a view without user controller logic
and (the views) would otherwise  not have access to the flash
attributes.
2012-01-13 13:18:53 -05:00
Rossen Stoyanchev be4e698483 SPR-9021 Correct issue in comparing Accept header media types.
When checking for an exact match of Accept header media types
additional parameters such as quality need to be excluded.
For example "*/*" matches "*/*;q=0.9".
2012-01-12 17:13:11 -05:00
Rossen Stoyanchev 6da6acbe54 Make AbstractHandlerMethodExceptionResolver an abstract class. 2012-01-11 11:10:52 -05:00
Arjen Poutsma ab6a7e8e74 Polishing 2012-01-11 11:48:20 +01:00
Rossen Stoyanchev 5a2bd97c37 SPR-8997 Add getter for access to flash timeout. 2012-01-10 22:24:14 -05:00
Chris Beams d7d1b495f2 Polish "Support flash attrs..." and related classes
- Eliminate trailing whitespace

 - Update long method signatures to follow framework whitespace
   conventions

   Based on the following search,

       $ git grep -A3 '^.public .* .*([^\{;]*$' */src/main

   the strong convention throughout the framework when dealing with
   methods having long signatures (i.e. many parameters) is to break
   immediately after the opening paren, indent two tabs deeper and break
   lines around 90 characters as necessary. Such signatures should also
   be followed by a newline after the opening curly brace to break
   things up visually.

   The files edited in this commit had a particularly different style of
   intenting arguments to align with each other vertically, but the
   alignment only worked if one's tabstop is set at four spaces.
   When viewed at a different tabstop value, the effect is is jarring,
   both in that it is misaligned and significantly different from most
   of the framework. The convention described above reads well at any
   tabstop value.
2012-01-10 12:21:14 -05:00
Chris Beams 7636913710 Merge branch '3.1.x' 2012-01-10 16:53:26 +01:00
Rossen Stoyanchev 92f8446eea SPR-8997 Add HttpServletResponse to FlashMapManager contract.
This change makes the HttpServletResponse available to the methods
of FlashMapManager in addition to the HttpServletRequest.
2012-01-10 10:47:47 -05:00
Rossen Stoyanchev 66df039b03 SPR-8698 Support flash attrs and a ModelAndView return value.
Before this change, flash attributes could only be added if via
RedirectAttributes.addFlashAttribute(..) if the method returned
a view name or a View instance. With this change, the above is
supported with a ModelAndView return value as well.
2012-01-09 20:18:44 -05:00
Rossen Stoyanchev fe0ffec8b9 SPR-7799 Minor fix in documentation. 2012-01-09 19:13:50 -05:00
Rossen Stoyanchev a4b33533d3 SPR-9001 Javadoc fix 2012-01-06 18:23:46 -05:00
Costin Leau 66d4e45b58 add getCacheManager() for access to native class 2012-01-06 18:23:07 -05:00
Juergen Hoeller e208a2de5f JBoss AS 7, etc 2012-01-05 17:38:02 +01:00
Juergen Hoeller adac38f91b fixed documented bean class names in jdbc namespace xsd (SPR-8972) 2012-01-05 17:38:01 +01:00
Juergen Hoeller affa733927 Hibernate exception translation covers NonUniqueObjectException to DuplicateKeyException case (SPR-8996) 2012-01-05 17:38:00 +01:00
Juergen Hoeller 211f8ea854 JBossNativeJdbcExtractor is compatible with JBoss AS 7 as well (SPR-8957) 2012-01-05 17:37:59 +01:00
Chris Beams 18b67eed29 Merge branch '3.1.x' 2011-12-23 09:30:32 +01:00
Chris Beams af38448181 Ignore spring-build 'docbook' directory 2011-12-23 09:30:04 +01:00
Juergen Hoeller d331c5d1c9 correctly handle ParseException from Formatter for String->String case (SPR-8944) 2011-12-22 16:30:22 +01:00
Chris Beams 22de6b76f1 Merge branch '3.1.x' 2011-12-22 15:55:15 +01:00
Juergen Hoeller 3d5e245374 CacheNamespaceHandler etc 2011-12-22 15:54:17 +01:00
Juergen Hoeller 89ee5e2d80 DataBinder etc 2011-12-22 15:54:17 +01:00
Juergen Hoeller 86bef9030f correctly handle ParseException from Formatter for String->String case (SPR-8944) 2011-12-22 15:54:17 +01:00
Chris Beams 544a29a91a Merge branch '3.1.x' 2011-12-22 15:08:08 +01:00
Costin Leau 0053319c62 Add test to corner potential bug with @CacheEvict
Cannot yet actually reproduce the issue, but this remains a useful
test case.

Issue: SPR-8934
2011-12-22 15:07:59 +01:00
Chris Beams 05d10a5dac Merge branch '3.1.x' 2011-12-22 14:55:10 +01:00
Costin Leau c39a14a130 Parse cache:annotation-driven key-generator attribute
Prior to this change, the spring-cache XSD allowed a 'key-generator'
attribute, but it was not actually parsed by AnnotationDrivenCacheBDP.

This commit adds the parsing logic as originally intended and the test
to prove it.

Issue: SPR-8939
2011-12-22 14:50:45 +01:00
Costin Leau e9ab1a7abb Update cache ref docs re 'args' vs 'params' naming
Prior to this change, the caching reference docs referred to
'root.params', whereas the actual naming should be 'root.args'. This
naming was also reflected in the "#p" syntax for specifying method args.

This change updates the documentation to refer to 'root.args' properly
and also adds "#a" syntax for specifying method arguments more
intuitively. Note that "#p" syntax remains in place as an alias for
backward compatibility.

Issue: SPR-8938
2011-12-22 14:31:21 +01:00
Chris Beams 02cd8681d4 Normalize whitespace in cache reference doc 2011-12-22 14:16:41 +01:00
Chris Beams 41c405998e Convert CRLF=>LF on files missed earlier
Complete pass with `dos2unix` found additional files missed on earlier
related commit.

Issue: SPR-5608
2011-12-22 14:06:44 +01:00
Chris Beams e091e399dc Merge branch '3.1.x'
Reconciled all 3.1.1 dev against 3.1.x and master (3.2.x) branches.

From this point forward, all 3.1.1 dev should happen directly against
3.1.x, and we will periodically merge those changes into master.

Note that when these merges take place, there will be a conflict
among any files containing version numbers, such as build.properties
and pom files.  Use `git rerere` to record the conflict resolution
strategy for future merges, avoiding redundant work.

    $ git config --global rerere.enabled 1
    $ git checkout master
    $ git merge 3.1.x      # conflicts
    $ git checkout master  # take master version of all affected files
    $ git commit           # conflict resolution strategy is remembered

See http://progit.org/2010/03/08/rerere.html

Conflicts:
	build.properties
	org.springframework.aop/pom.xml
	org.springframework.asm/pom.xml
	org.springframework.aspects/pom.xml
	org.springframework.beans/pom.xml
	org.springframework.context.support/pom.xml
	org.springframework.context/pom.xml
	org.springframework.core/pom.xml
	org.springframework.expression/pom.xml
	org.springframework.instrument.tomcat/pom.xml
	org.springframework.instrument/pom.xml
	org.springframework.integration-tests/pom.xml
	org.springframework.jdbc/pom.xml
	org.springframework.jms/pom.xml
	org.springframework.orm/pom.xml
	org.springframework.oxm/pom.xml
	org.springframework.spring-library/pom.xml
	org.springframework.spring-parent/pom.xml
	org.springframework.test/pom.xml
	org.springframework.transaction/pom.xml
	org.springframework.web.portlet/pom.xml
	org.springframework.web.servlet/pom.xml
	org.springframework.web.struts/pom.xml
	org.springframework.web/pom.xml
2011-12-22 13:36:58 +01:00
Juergen Hoeller f1168ea453 DefaultPersistenceUnitManager etc 2011-12-22 13:31:09 +01:00
Juergen Hoeller 103c648a92 added protected "isPersistenceUnitOverrideAllowed()" method to DefaultPersistenceUnitManager (SPR-8925) 2011-12-22 13:31:08 +01:00
Juergen Hoeller e0252ad0b1 "file-encoding" attribute value is being applied correctly (SPR-8024) 2011-12-22 13:31:08 +01:00
Juergen Hoeller 4b138e0e50 Hibernate etc 2011-12-22 13:31:08 +01:00
Juergen Hoeller 07ddedd7bf Hibernate synchronization properly unbinds Session even in case of afterCompletion exception (SPR-8757) 2011-12-22 13:31:08 +01:00
Juergen Hoeller 09ac195f0c do not insist on a "dataSource" reference being set (SPR-8924) 2011-12-22 13:31:08 +01:00
Juergen Hoeller 2caca29498 deprecated TopLinkJpaDialect, etc 2011-12-22 13:31:07 +01:00
Juergen Hoeller 391434e089 officially deprecated TopLinkJpaDialect in favor of EclipseLink and Spring's EclipseLinkJpaDialect; updated supported version ranges for EclipseLink and OpenJPA 2011-12-22 13:31:07 +01:00
Juergen Hoeller 392247d674 Hibernate 4 LocalSessionFactoryBean implements PersistenceExceptionTranslator interface as well (SPR-8952); consistent extending of HibernateExceptionTranslator for Hibernate 3 as well as Hibernate 4 2011-12-22 13:26:45 +01:00
Juergen Hoeller 1c9fe623f9 further post-GA fixes 2011-12-22 13:26:09 +01:00
Juergen Hoeller eb31528979 added "entityInterceptor" property to Hibernate 4 LocalSessionFactoryBean (SPR-8940) 2011-12-22 13:23:56 +01:00
Juergen Hoeller 00ff8fa2cc corrected fix for QuartzJobBean to work with Quartz 2.0/2.1 (SPR-8889) 2011-12-22 13:19:18 +01:00
Juergen Hoeller cc2e558fe0 prepared for 3.1.1 2011-12-22 13:19:18 +01:00
Juergen Hoeller e0231438cd fixed "packagesToScan" to avoid additional provider scan (SPR-8936) 2011-12-22 13:19:18 +01:00
Chris Beams 02452a1af9 Minor copy edits to README 2011-12-22 13:19:18 +01:00
Chris Beams 36d941fc99 Add readme 2011-12-22 13:19:18 +01:00
Juergen Hoeller 6d674f7836 DefaultPersistenceUnitManager etc 2011-12-22 03:25:03 +01:00
Juergen Hoeller bdcf480f55 added protected "isPersistenceUnitOverrideAllowed()" method to DefaultPersistenceUnitManager (SPR-8925) 2011-12-22 03:22:35 +01:00
Juergen Hoeller 8534764e99 "file-encoding" attribute value is being applied correctly (SPR-8024) 2011-12-22 03:14:02 +01:00
Juergen Hoeller 6c23abebae Hibernate etc 2011-12-22 02:55:00 +01:00
Juergen Hoeller 3ea0cf36bc Hibernate synchronization properly unbinds Session even in case of afterCompletion exception (SPR-8757) 2011-12-22 02:51:13 +01:00
Juergen Hoeller e2f4332c49 do not insist on a "dataSource" reference being set (SPR-8924) 2011-12-22 02:33:56 +01:00
Juergen Hoeller 8b2f630698 deprecated TopLinkJpaDialect, etc 2011-12-21 16:48:56 +01:00
Juergen Hoeller b227c90e3b officially deprecated TopLinkJpaDialect in favor of EclipseLink and Spring's EclipseLinkJpaDialect; updated supported version ranges for EclipseLink and OpenJPA 2011-12-21 16:48:55 +01:00
Juergen Hoeller 4b74a3565c Hibernate 4 LocalSessionFactoryBean implements PersistenceExceptionTranslator interface as well (SPR-8952); consistent extending of HibernateExceptionTranslator for Hibernate 3 as well as Hibernate 4 2011-12-21 16:48:54 +01:00
Chris Beams 88913f2b23 Convert CRLF (dos) to LF (unix)
Prior to this change, roughly 5% (~300 out of 6000+) of files under the
source tree had CRLF line endings as opposed to the majority which have
LF endings.

This change normalizes these files to LF for consistency going forward.

Command used:

$ git ls-files | xargs file | grep CRLF | cut -d":" -f1 | xargs dos2unix

Issue: SPR-5608
2011-12-21 14:52:47 +01:00
Chris Beams ae72cf2f50 Convert CRLF (dos) to LF (unix)
Prior to this change, roughly 5% (~300 out of 6000+) of files under the
source tree had CRLF line endings as opposed to the majority which have
LF endings.

This change normalizes these files to LF for consistency going forward.

Command used:

$ git ls-files | xargs file | grep CRLF | cut -d":" -f1 | xargs dos2unix

Issue: SPR-5608
2011-12-21 14:46:11 +01:00
Juergen Hoeller 096de373b4 further post-GA fixes 2011-12-21 14:05:11 +01:00
Juergen Hoeller 23a941d0f4 added "entityInterceptor" property to Hibernate 4 LocalSessionFactoryBean (SPR-8940) 2011-12-21 14:04:37 +01:00
Juergen Hoeller 9506f8d883 corrected fix for QuartzJobBean to work with Quartz 2.0/2.1 (SPR-8889) 2011-12-21 13:35:48 +01:00
Juergen Hoeller c71da98c10 prepared for 3.1.1 2011-12-21 12:43:04 +01:00
Juergen Hoeller 01036f0ff5 fixed "packagesToScan" to avoid additional provider scan (SPR-8936) 2011-12-21 12:41:37 +01:00
Chris Beams f8dbbf402f Minor copy edits to README 2011-12-20 20:23:25 +01:00
Rossen Stoyanchev e1b645368a Add missing (empty) source folders 2011-12-20 11:17:14 -05:00
Rossen Stoyanchev 7258d9b297 Add missing (empty) source folders 2011-12-20 10:57:27 -05:00
Chris Beams d9ff754ff5 Merge pull request #8 from cbeams/master
Add readme
2011-12-20 04:57:48 -08:00
Chris Beams ab5cdb5cda Add readme 2011-12-20 13:55:10 +01:00
Chris Beams e158f61e93 Increment version to 3.1.1.BUILD-SNAPSHOT 2011-12-16 11:59:06 +01:00
Juergen Hoeller dfc5b482c9 IntelliJ IDEA 11 project setup 2011-12-16 11:56:51 +01:00
Chris Beams abb5fc094a Add spring-build 2.5.2
spring-build was previously included via an svn:external. Adding
directly to the source tree under Git to avoid the need for a git
submodule.

In order to build from any earlier commit, it is recommended to
export spring-build or symlink an existing copy into the root
of the spring-framework project and then build normally.

    $ svn export https://src.springsource.org/svn/spring-build/tags/project-build-2.5.2 spring-build
2011-12-16 11:56:51 +01:00
Juergen Hoeller 1a3d9a2d3e IntelliJ IDEA 11 project setup 2011-12-16 00:08:18 +01:00
Chris Beams bd6c3becb0 Increment version to 3.2.0.BUILD-SNAPSHOT 2011-12-15 15:04:51 +01:00
Chris Beams 1765b6879f Add spring-build 2.5.2
spring-build was previously included via an svn:external. Adding
directly to the source tree under Git to avoid the need for a git
submodule.

In order to build from any earlier commit, it is recommended to
export spring-build or symlink an existing copy into the root
of the spring-framework project and then build normally.

    $ svn export https://src.springsource.org/svn/spring-build/tags/project-build-2.5.2 spring-build
2011-12-15 02:40:18 +01:00
Chris Beams ac107d0c2a Release Spring Framework 3.1.0.RELEASE 2011-12-13 16:35:49 +00:00
Chris Beams fae32cea8e Update "What's new in 3.1" ref docs 2011-12-12 23:42:52 +00:00
Chris Beams 153d38f1c8 Polish Javadoc 2011-12-12 23:42:39 +00:00
Juergen Hoeller 8f18337543 final preparations for 3.1 GA release 2011-12-12 23:38:05 +00:00
Juergen Hoeller 6796a775d2 overhaul of support package arrangements; added missing package-info files 2011-12-12 23:32:31 +00:00
Juergen Hoeller 1c45c51fe1 overhaul of support package arrangements for handler method processing; added missing package-info files 2011-12-12 23:20:03 +00:00
Chris Beams 2065b788c4 Re-introduce system-properties-mode to spring-context 3.1 XSD
See JIRA issue for complete details.

Issue: SPR-8901
2011-12-12 19:20:53 +00:00
Chris Beams e9da854848 Fix typo in MVC reference documentation 2011-12-12 19:20:05 +00:00
Juergen Hoeller 0042243a11 SmartLifecycle beans in Lifecycle dependency graphs are only being started when isAutoStartup=true (SPR-8912) 2011-12-12 18:33:29 +00:00
Juergen Hoeller 2fa9ef9f5a do not reset Session itself on "clear()" in order to properly interact with Open Session in View (SPR-8909) 2011-12-12 15:53:18 +00:00
Juergen Hoeller d507c2b927 "dispatchOptionsRequest" only sets the default 'Allow' header if actually needed (SPR-7837); "dispatchTraceRequest" only generates default response body if actually needed 2011-12-12 15:30:04 +00:00
Juergen Hoeller 450a3d7eee polishing 2011-12-12 15:04:11 +00:00
Chris Beams 23e58aa718 Preserve programmatically set context config locations
Prior to this fix, ContextLoader(Listener)'s would overwrite any
value set directly against a WebApplicationContext's #setConfigLocation
method. This is a likely scenario when using Spring 3.1's new
WebApplicationInitializer support.

Now a check is performed to ensure that the ContextLoader init-param
value is non-null before doing the overwriting.

Added tests to ensure that all expected precedence, overwriting and
defaulting of context config locations works as expected.

Issue: SPR-8510
2011-12-12 14:42:24 +00:00
Chris Beams ec1b016602 Improve unsupported operation messages in GenericWAC 2011-12-12 14:41:37 +00:00
Sam Brannen 5ebabcf2b3 polishing Javadoc for marshalling message converters 2011-12-12 00:29:11 +00:00
Juergen Hoeller 1141a1d610 polishing 2011-12-11 23:07:07 +00:00
Juergen Hoeller dd7950638d MethodValidationPostProcessor, MappingJacksonMessageConverter, etc 2011-12-11 22:10:11 +00:00
Juergen Hoeller 098342918c reworked JsonMessageConverter contribution into MappingJacksonMessageConverter, aligned with MappingJacksonHttpMessageConverter and MappingJacksonJsonView 2011-12-11 22:09:20 +00:00
Juergen Hoeller 8f69e81197 polishing 2011-12-11 22:07:37 +00:00
Juergen Hoeller d8e640d708 polishing 2011-12-11 22:07:12 +00:00
Juergen Hoeller 0f75cebdff @Transactional qualifiers match against transaction manager definitions in parent contexts as well (SPR-7679) 2011-12-11 13:26:36 +00:00
Chris Beams d4123d0637 Support use of @Scheduled against JDK proxies
Prior to this change, ScheduledAnnotationBeanPostProcessor found any
@Scheduled methods against the ultimate targetClass for a given bean
and then attempted to invoke that method against the bean instance. In
cases where the bean instance was in fact a JDK proxy, this attempt
would fail because the proxy is not an instance of the target class.

Now SABPP still attempts to find @Scheduled methods against the target
class, but subsequently checks to see if the bean is a JDK proxy, and if
so attempts to find the corresponding method on the proxy itself. If it
cannot be found (e.g. the @Scheduled method was declared only at the
concrete class level), an appropriate exception is thrown, explaining to
the users their options: (a) use proxyTargetClass=true and go with
subclass proxies which won't have this problem, or (b) pull the
@Scheduled method up into an interface.

Issue: SPR-8651
2011-12-11 13:00:30 +00:00
Juergen Hoeller 439b7750d4 fixed "hibernateManagedSession" mode to actually work against Hibernate 4.0 (SPR-8776) 2011-12-11 12:51:57 +00:00
Chris Beams 48836e2ebb Allow parameters in FactoryBean-returning @Bean methods
Prior to this change, an assumption was made in
AbstractAutowireCapableBeanFactory that any factory-method would have
zero parameters.  This may not be the case in @Bean methods.

We now look for the factory-method by name in a more flexible fashion
that accomodates the possibility of method parameters.

There remains at least one edge cases here where things could still fail,
for example a @Configuration class could have two FactoryBean-returning
methods of the same name, but each with different generic FactoryBean
types and different parameter lists. In this case, the implementation
may infer and return the wrong object type, as it currently returns
the first match for the given factory-method name.  The complexity cost
of ensuring that this never happens is not likely worth the trouble
given the very low likelihood of such an arrangement.

Issue: SPR-8762
2011-12-10 19:32:02 +00:00
Chris Beams 866999764d Polish whitespace in ConfigurationClassEnhancer 2011-12-10 19:31:18 +00:00
Chris Beams 06d06d4aa9 Mention SystemEnvironmentPropertySource in related Javadoc
Issue: SPR-8869
2011-12-10 19:30:57 +00:00
Chris Beams 0449f6cb84 Polish @Scope Javadoc 2011-12-10 19:30:32 +00:00
Chris Beams 34798a47ab Fix warnings, polish Javadoc for @Validated et al. 2011-12-10 15:45:17 +00:00
Juergen Hoeller e648245eb3 added MethodValidationInterceptor/PostProcessor for Hibernate Validator 4.2 based method validation; renamed Spring's variant of @Valid to @Validated 2011-12-09 18:09:14 +00:00
Juergen Hoeller 2dba480d9d used specific SLF4J versions for running the test suites of individual modules (fixing the Hibernate Validator 4.2 upgrade) 2011-12-09 17:53:29 +00:00
Juergen Hoeller 9d93b5429f fixed assertion message 2011-12-09 16:01:06 +00:00
Chris Beams ede8482f81 Revert .web.servlet to Hibernate Validator 4.1.0.GA
In order to determine why classloading errors occur after
upgrading to 4.2.0.Final.

To demonstrate this error, uncomment the 4.2.0.Final dependency in
ivy.xml and run `ant test` within the .web.servlet module.
2011-12-09 13:09:38 +00:00
Chris Beams 615bb29f92 Revert .context to Hibernate Validator 4.1.0.GA
In order to determine why Ehcache classloading errors occur after
upgrading to 4.2.0.Final.

To demonstrate this error, uncomment the 4.2.0.Final dependency in
ivy.xml and run `ant test` within the .context module.
2011-12-09 13:09:25 +00:00
Chris Beams 1c58dd9d89 Upgrade to Hibernate Validator 4.2.0.Final
4.1/4.2 use is optional; users may compile and run against validator
versions back to 4.0.
2011-12-09 13:09:11 +00:00
Chris Beams 481c8455fd Upgrade to Hibernate Core 4.0.0.CR7
From earlier dependence on 4.0.0.CR4.

Spring 3.1.x will upgrade to Hibernate 4.0.0.Final as soon as possible
after its release.

Pom files have also been updated to 'recommend' use of Hibernate
3.6.0.Final or better (earlier value was 3.3.1.GA).
2011-12-09 13:08:54 +00:00
Chris Beams a962bd0677 Revert accidental changes in Eclipse/pom metadata 2011-12-09 13:08:37 +00:00
Juergen Hoeller 0f1affe931 JmsInvokerClientInterceptor/FactoryBean always uses createConnection/createSession when on JMS 1.1 2011-12-09 12:06:50 +00:00
David Syer 1adf82503b SPR-7404: Fixed metadata 2011-12-09 11:36:54 +00:00
David Syer 4242b32624 Update spring-context dependencies in pom 2011-12-09 11:36:35 +00:00
David Syer 7ec9292e54 SPR-7404: Added JsonMessageConverter, borrowing from Spring AMQP 2011-12-09 11:03:40 +00:00
Arjen Poutsma 3beef9a92e SPR-8883 - RestTemplate.headForHeaders throws "IllegalArgumentException: No InputStream specified" on server resource which status code are 4xx 2011-12-08 19:17:48 +00:00
Chris Beams b94040f329 Remove unnecessary mentions of aspectjrt/aspectjweaver
aspectjrt is a subset of aspectjweaver. Eliminate mentions of aspectjrt
where aspectjweaver is already necessary (e.g. LTW), and do not mention
aspectjweaver where only aspectrt is required (e.g. @Aspect proxying)

Also bump required version of aspect* libs from 1.5 to 1.6.8, reflecting
OSGi and pom metadata.

Issue: SPR-8896
2011-12-08 13:46:47 +00:00
Chris Beams 690d33e14f Update @PropertySource Javadoc re: ${...} placeholders
Issue: SPR-8539
2011-12-08 13:46:27 +00:00
Costin Leau 312b1aa3d6 + add cache aspectj aspect 2011-12-08 13:20:01 +00:00
Rossen Stoyanchev c472a163f1 SPR-8572 Support Void.class as response type in RestTemplate. 2011-12-08 03:59:28 +00:00
Rossen Stoyanchev 6f150e4f07 SPR-8898 Allow match by trailing slash in RequestMappingHandlerMapping. 2011-12-08 03:38:50 +00:00
Juergen Hoeller 569426dfdf restored DataBinder's ability to bind to an auto-growing List with unknown element type (SPR-8828) 2011-12-07 21:27:26 +00:00
Arjen Poutsma f9144ea1ea SPR-8367 - 3.1.0.M2 update of the RestTemplate for Apache HTTP Components will default to sending 2 requests on authentication and doesn't support HttpContext parameters without significant extention/rewrite 2011-12-07 01:22:07 +00:00
Arjen Poutsma 29e969039d SPR-8349 - Ability to specify ResourceResolver property for SchemaFactory in Jaxb2Marshaller 2011-12-07 00:56:03 +00:00
Juergen Hoeller 7428b57052 final refinements for 3.1 GA 2011-12-07 00:01:53 +00:00
Juergen Hoeller 83c83d4d15 fixed media type resolution algorithm 2011-12-06 23:53:22 +00:00
Juergen Hoeller 34a4fba335 ResourceHttpRequestHandler sends content without content-type header if no media type found (SPR-7713); ResourceHttpRequestHandler and ContentNegotiatingViewResolver use consistent mime type resolution 2011-12-06 22:54:47 +00:00
Juergen Hoeller 426863f790 avoid swallowing of IOException 2011-12-06 22:51:57 +00:00
Costin Leau f74789ffbe optimize AJ pointcut definition (SPR-8890) 2011-12-06 22:38:50 +00:00
Juergen Hoeller e0d922d352 ConversionService is able to work with "Collections.emptyList()" as target type (again; SPR-7293) 2011-12-06 21:17:25 +00:00
Juergen Hoeller 5ab2bf16a5 fixed pointcut for type-level annotation to only apply to public methods (SPR-8890) 2011-12-06 21:14:31 +00:00
Juergen Hoeller 3a62aa053e fixed pointcut for type-level annotation to only apply to public methods (SPR-8890) 2011-12-06 21:03:57 +00:00
Juergen Hoeller a347e4d3c2 optimized AnnotationTransactionAspect pointcut to avoid runtime checks (SPR-8890) 2011-12-06 20:48:49 +00:00
Juergen Hoeller d050a472a2 added "mappingResources" property to LocalContainerEntityManagerFactoryBean (pointing to orm.xml; SPR-8440) 2011-12-06 18:18:57 +00:00
Costin Leau 1a2a3dd02a + update AJ tests 2011-12-06 14:13:29 +00:00
Costin Leau cb3524ff30 + fix failing cache tests
+ renamed afterInvocation to beforeInvocation (and changed the docs and tests accordingly)
2011-12-06 14:05:33 +00:00
Costin Leau 735ba9dcde SPR-8082
+ support generic discovery of multiple annotations of the same type (such as stereotypes)
2011-12-06 13:32:25 +00:00
Chris Beams 5fe0804017 Remove references to -with-dependencies distribution
Issue: SPR-7788, SPR-6575
2011-12-06 13:19:35 +00:00
Chris Beams 28ff473091 Allow multiple @Filter 'value' args for concision
Prior to this change, to specify two or more annotation include/exclude
filters, one would declare @ComponentScan as follows:

    @ComponentScan(basePackages="example.scannable",
       useDefaultFilters=false,
       includeFilters={
           @Filter(MyStereotype.class),
           @Filter(MyComponent.class)
       })

This was because @Filter's 'value' attribute accepted exactly one
argument.

Now, any given @Filter may accept one or more value arguments, allowing
for more concise @ComponentScan declarations:

    @ComponentScan(basePackages="example.scannable",
       useDefaultFilters=false,
       includeFilters=@Filter({MyStereotype.class, MyComponent.class}))

Supplying multiple arguments in this way assumes that they are the same
type of filter, e.g. ANNOTATION, ASSIGNABLE_TYPE, or CUSTOM. To declare
multiple *different* types of filters, multiple @Filter annotations are
still required, e.g.:

    @ComponentScan(
        includeFilters={
            @Filter(type=ANNOTATION, value=MyStereotype.class),
            @Filter(type=ASSIGNABLE_TYPE, value={Foo.class, Bar.class})
        })

Note that specifying zero arguments, e.g. @Filter({}) is nonsensical; it
will have no effect on component scanning, but does not raise an error.

Issue: SPR-8881
2011-12-06 12:18:10 +00:00
Chris Beams df7bda5637 Constrain targets for @Filter declaration
For clarity, add @Target({}) to definition of @Filter, constraining it
to complex annotation composition only; i.e. it cannot be placed on
any element, only within annotations, e.g.

    @ComponentScan(includeFilters=@Filter(...))

is legal, while

    @Filter
    public class MyType { }

is not.

Also, widen @Retention from SOURCE to RUNTIME, even though it is not
technically necessary, as all parsing of @Filter annotations happens via
ASM, i.e. at the source level.  This change is made primarily for
consistency (@ComponentScan's Retention is RUNTIME) and in avoidance of
potential confusion or surprise on the part of those casually browsing
the code.
2011-12-06 12:17:54 +00:00
Chris Beams c2c224958d Polish WebApplicationInitializer Javadoc
Issue: SPR-8897
2011-12-06 12:17:42 +00:00
Juergen Hoeller aedccec67e restored SpringValidatorAdapter's ability to handle bean constraints with property paths (SPR-8895) 2011-12-05 22:37:55 +00:00
Juergen Hoeller 27471e0555 added support for JPA 2.1 unwrap method on EntityManagerFactory interface 2011-12-05 21:34:44 +00:00
Juergen Hoeller 66b4eb16a5 Portlet MVC annotation mapping allows for distributing action names across controllers (SPR-7685) 2011-12-05 21:20:27 +00:00
Juergen Hoeller bea5016e53 fixed validation test failures 2011-12-03 17:03:33 +00:00
Juergen Hoeller 84be348cb0 log or rethrow original ConversionFailedException as appropriate 2011-12-03 15:57:19 +00:00
Juergen Hoeller 207b2315ed added validation hints support to ValidationUtils as well (SPR-7847) 2011-12-03 15:54:52 +00:00
Juergen Hoeller 1a2bbe5c4d consistent specification of standard meta-annotations 2011-12-03 15:47:10 +00:00
Juergen Hoeller 00133179df added SmartValidator interface with general support for validation hints; added custom @Valid annotation with support for JSR-303 validation groups; JSR-303 SpringValidatorAdapter and MVC data binding provide support for validation groups (SPR-6373) 2011-12-03 15:46:31 +00:00
Juergen Hoeller 49a2aaf023 added SmartValidator interface with general support for validation hints; added custom @Valid annotation with support for JSR-303 validation groups; JSR-303 SpringValidatorAdapter and MVC data binding provide support for validation groups (SPR-6373) 2011-12-03 15:44:33 +00:00
Rossen Stoyanchev 4bfcb79ae3 SPR-8892 Add String constants to MediaType. 2011-12-02 18:58:41 +00:00
Juergen Hoeller 21f61e3680 Portlet session mutex uses global session attribute to be shared among all portlets in the session (SPR-8888) 2011-12-02 12:03:35 +00:00
Arjen Poutsma 53cb529162 SPR-8809 - RestTemplate headers not sent when bufferRequestBody is false 2011-12-02 11:29:47 +00:00
Rossen Stoyanchev 9f98f77c3e SPR-8863 Add RequestContext.getPathToServlet() method.
This method allows a view to access the combined context path and
servlet mapping path for prefixing URLs without having to specify
the literal part of a servlet mapping such as "/main/*") 
explicitly everywhere. For example:

${requestContext.pathToServlet}/css/main.css
2011-12-01 22:56:51 +00:00
Juergen Hoeller 0ef3beb462 prepared for 3.1 GA 2011-12-01 18:52:12 +00:00
Juergen Hoeller 33b53b7cca alignment with 3.0.7 backports (SPR-8674) 2011-12-01 18:51:36 +00:00
Juergen Hoeller 71e0a506b9 polishing 2011-12-01 15:12:26 +00:00
Juergen Hoeller 45a0ae3fb9 polishing 2011-12-01 15:11:32 +00:00
Rossen Stoyanchev ca4eafd4dd SPR-8808 Remove excludeFilter from javadoc examples in @EnableWebMvc. 2011-12-01 14:35:36 +00:00
Juergen Hoeller f75e832e7c polishing 2011-12-01 13:34:12 +00:00
Juergen Hoeller dc41daa3db renamed 'isJava6VisibilityBridgeMethodPair' to 'isVisibilityBridgeMethodPair' (SPR-8660) 2011-12-01 13:14:06 +00:00
Juergen Hoeller 2b122816af fixed QuartzJobBean to work with Quartz 2.0/2.1 as well (SPR-8889) 2011-12-01 12:56:47 +00:00
Juergen Hoeller ffa4784628 polishing (SPR-8005) 2011-12-01 12:53:47 +00:00
Costin Leau 0a611aa776 SPR-8082
+ fix internal cache causing the multiple annotations key/conditions to overlap
2011-11-30 15:21:09 +00:00
Arjen Poutsma 91c14bd1fe SPR-8809 - RestTemplate headers not sent when bufferRequestBody is false 2011-11-30 11:07:38 +00:00
Sam Brannen 951514a576 removed unused imports 2011-11-29 21:29:15 +00:00
Juergen Hoeller d6d169ac56 resolved package dependency tangles 2011-11-29 01:16:09 +00:00
Juergen Hoeller 686ae8f7b3 final preparations for 3.1 RC2 release 2011-11-28 22:57:33 +00:00
Juergen Hoeller 9f3e333084 fixed NotificationListenerBean assertion in constructor (SPR-8091) 2011-11-28 22:47:48 +00:00
Juergen Hoeller c2eafdb2fb AbstractCachingViewResolver caches unresolved view names by default ("cacheUnresolved"=true; SPR-8173) 2011-11-28 22:46:53 +00:00
Juergen Hoeller 1bb6d29be2 AbstractCachingViewResolver caches unresolved view names by default ("cacheUnresolved"=true; SPR-8173) 2011-11-28 22:34:29 +00:00
Chris Beams 6991cd9cdf Allow @Configuration classes to self-@ComponentScan
Prior to this change, a @Configuration classes that @ComponentScan
themselves would result in a ConflictingBeanDefinitionException.

For example:

    package com.foo.config;

    @Configuration
    @ComponentScan("com.foo");
    public class AppConfig {
        // ...
    }

This resulted in a ConflictingBeanDefinitionException that users have
typically worked around in the following fashion:

    package com.foo.config;

    @Configuration
    @ComponentScan(basePackages="com.foo",
        excludeFilters=@Filter(value=ANNOTATION_TYPE, type=Configuration.class);
    public class AppConfig {
        // ...
    }

This is obviously more verbose and cumbersome than would be desirable,
and furthermore potentially too constraining as it prohibits the ability
to include other legitimate @Configuration classes via scanning.

The exception was being thrown because of a logic problem in
ClassPathBeanDefinitionScanner.  The bean definition for AppConfig gets
registered once by the user (e.g. when constructing an
AnnotationConfigApplicationContext), then again when performing the
component scan for 'com.foo'. Prior to this change,
ClassPathBeanDefinitionScanner's #isCompatible returned false if the new
bean definition was anything other than an AnnotatedBeanDefinition.  The
intention of this check is really to see whether the new bean definition
is a *scanned* bean definition, i.e. the result of a component-scanning
operation.  If so, then it becomes safe to assume that the original bean
definition is the one that should be kept, as it is the one explicitly
registered by the user.

Therefore, the fix is as simple as narrowing the instanceof check from
AnnotatedBeanDefinition to its ScannedGenericBeanDefinition subtype.

Note that this commit partially reverts changes introduced in SPR-8307
that explicitly caught ConflictingBeanDefinitionExceptions when
processing recursive @ComponentScan definitions, and rethrew as a
"CircularComponentScanException.  With the changes in this commit,
such CBDEs will no longer occur, obviating the need for this check and
for this custom exception type altogether.

Issue: SPR-8808, SPR-8307
2011-11-28 21:35:38 +00:00
Juergen Hoeller 450c75337f fixed getAsText javadoc (SPR-7890) 2011-11-28 21:14:40 +00:00
Juergen Hoeller fa9a7b18c6 refined Resource "exists()" check for HTTP URLs to always return false for 404 status (SPR-7881) 2011-11-28 21:11:57 +00:00
Juergen Hoeller 2cb287a01b JPA EntityManagerFactoryUtils silently ignores IllegalArgumentExceptions from setHint calls (SPR-7947) 2011-11-28 20:54:37 +00:00
Juergen Hoeller e6272312a8 allow "packagesToScan" to be optional on LocalSessionFactoryBean (SPR-8812) 2011-11-28 20:48:21 +00:00
Juergen Hoeller b391629de1 LinkedCaseInsensitiveMap overrides putAll method as well (for IBM JDK 1.6 compatibility; SPR-7969) 2011-11-28 20:48:02 +00:00
Juergen Hoeller e7d1b5e0ee JDO PersistenceManager synchronization performs close attempt after completion (if necessary; SPR-8846) 2011-11-28 19:38:28 +00:00
Juergen Hoeller c9b36fb4e6 TransactionSynchronizationManager eagerly cleans up void ResourceHolders on any access (SPR-8844, SPR-8845) 2011-11-28 18:54:11 +00:00
Rossen Stoyanchev a9a068e678 SPR-8867 Fix issue with Content-Length header and UTF-8 charset.
The AbstractHttpMessageConverter was using the requested Content-Type
rather than the actual response Content-Type to determine the length
of the content. This can lead to a problem when a controller returns
a ResponseEntity with a Content-Type header that ignores (overrides)
the requested Content-Type. The fix ensures that actual response 
Content-Type is the one used both to write to the response and to 
determine the length of the content.
2011-11-28 18:42:57 +00:00
Juergen Hoeller aa7fcb5431 polishing 2011-11-28 18:38:26 +00:00
Juergen Hoeller 81e9f6cc2c fixed setRootObject check in StandardEvaluationContext (SPR-8241) 2011-11-28 17:34:47 +00:00
Juergen Hoeller 1843bdde35 added "forwarder" property to ConnectorServerFactoryBean, accepting an MBeanServerForwarder (SPR-8820) 2011-11-28 17:17:47 +00:00
Juergen Hoeller b55040cf02 Servlet/PortletContextResource's getFile prefers "file:" URL resolution over calling getRealPath (SPR-8461) 2011-11-28 16:51:42 +00:00
Juergen Hoeller bba70a7f12 renamed ValueWrapperImpl to SimpleValueWrapper (for use in Cache implementations) 2011-11-28 15:52:42 +00:00
Juergen Hoeller 372d461bef upgraded compile-time dependency to EHCache 2.0.0 2011-11-28 15:10:03 +00:00
Juergen Hoeller a09a0316b7 exposed EHCache 1.7's "statisticsEnabled"/"sampledStatisticsEnabled" on EhCacheFactoryBean () 2011-11-28 15:05:53 +00:00
Juergen Hoeller 61a5ab9d34 fixed "formMultiSelect"/"formCheckboxes" FreeMarker macros to compare against actual field value (SPR-7721) 2011-11-28 14:42:03 +00:00
Juergen Hoeller 3f7dccddd2 added getObjectMapper() accessor to MappingJacksonHttpMessageConverter (SPR-8605) 2011-11-28 14:34:59 +00:00
Costin Leau ac52433004 + update cache docs 2011-11-28 14:00:26 +00:00
Juergen Hoeller 263dd559b7 SimpleJdbcTestUtils executeSqlScript properly closes its LineNumberReader after use (SPR-8872) 2011-11-28 13:27:21 +00:00
Costin Leau d10f2258e8 + update aspectj cache aspects
+ update integration tests
2011-11-28 13:05:59 +00:00
Juergen Hoeller 1e2f49104d SpringValidatorAdapter accepts non-indexed set paths (for Hibernate Validator compatibility; SPR-8634) 2011-11-28 12:54:03 +00:00
Costin Leau f91f778fb5 + align @CacheEvict behaviour with @Cacheable and @CachePut
+ add flag for post method execution
+ add integration tests
2011-11-28 12:06:34 +00:00
Costin Leau b2bc7534c2 + minor doc fix 2011-11-28 10:28:14 +00:00
Chris Beams d35620511e Introduce @EnableSpringConfigured
Equivalent to <context:spring-configured/>.

Also update @EnableLoadTimeWeaving Javadoc and spring-configured XSD
documentation to reflect.

Issue: SPR-7888
2011-11-28 06:57:17 +00:00
Chris Beams 4318ccd9d5 Refactor BeanConfigurerTests
In preparation for the introduction of @EnableSpringConfigured

Issue: SPR-7888
2011-11-28 06:57:09 +00:00
Chris Beams 22e37aac44 Polish .aop copy of SpringConfiguredBDP
Add 'infrastructure' bean role to follow suit with original .context SCPDP

Encountered while working on SPR-7888 (@EnableSpringConfigured)
2011-11-28 06:57:04 +00:00
Sam Brannen e90c7eadc2 [SPR-7996] Improved documentation of the context caching mechanism in the TestContext framework:
- now discussing cache key generation and uniqueness
- now discussing cache scope, test suites, and forking
2011-11-28 00:45:24 +00:00
Juergen Hoeller 93db3df35b added "namingStrategy" property to Hibernate 4 LocalSessionFactoryBean variant (SPR-8864) 2011-11-28 00:04:55 +00:00
Juergen Hoeller f50f3d2405 HibernateJpaDialect does NOT expose underlying Session for underlying SessionFactory anymore (SPR-8771) 2011-11-27 23:50:37 +00:00
Juergen Hoeller 16933a511d introduced JobDetail/CronTrigger/SimpleTriggerFactoryBean variants for Quartz 2.0/2.1 support (SPR-8275?) 2011-11-27 23:32:03 +00:00
Chris Beams 68f61f3b3c Fix nested @Component annotation instantiation bug
3.1 M2 introduced a regression that causes false positives during
@Configuration class candidate checks. Now performing a call to
AnnotationMetadata#isInterface in addition to checks for @Component and
@Bean annotations when determining whether a candidate is a 'lite'
configuration class. Annotations are in the end interfaces, so both
are filtered out at once.

Issue: SPR-8761
2011-11-26 08:04:39 +00:00
Chris Beams faba5941f7 Provide ConfigurationClass#toString implementation
For ease during debugging; prompted while fixing SPR-8761.
2011-11-26 08:04:35 +00:00
Chris Beams c6a0f1ef25 Polish logging for core.env package 2011-11-26 05:20:32 +00:00
Chris Beams 91f05c8b9d Avoid creation of unnecessary Environment objects
Prior to this change, any instantiation of an
AnnotationConfigApplicationContext would trigger the creation of three
StandardEnvironment objects: one for the ApplicationContext, one for the
AnnotatedBeanDefinitionReader, and one for the
ClassPathBeanDefinitionScanner.

The latter two are immediately swapped out when the ApplicationContext
delegates its environment to these subordinate objects anyway. Not only
is it inefficient to create these two extra Environments, it creates
confusion when debug-level logging is turned on. From the user's
perspective and in practice, there is only one Environment; logging
should reflect that.

This change ensures that only one Environment object is ever created for
a given ApplicationContext. If an AnnotatedBeanDefinitionReader or
ClassPathBeanDefinitionScanner are used in isolation, e.g. against a
plain BeanFactory/BeanDefinitionRegistry, then they will still create
their own local StandardEnvironment object.

All public API compatibility is preserved; new constructors have been
added where necessary to accommodate passing an Environment directly
to ABDR ar CPBDS.
2011-11-26 05:20:29 +00:00
Chris Beams 143db0d8de Introduce SystemEnvironmentPropertySource
Properties such as 'spring.profiles.active' cannot be specified at the
command line under Bash and other shells due to variable naming
constraints. This change allows for exchanging underscores for periods
as well as capitalizing property names for more idiomatic naming when
dealing with environment variables.

For example, Spring will respect equally either of the following:

    spring.profiles.active=p1 java -classpath ... MyApp

    SPRING_PROFILES_ACTIVE=p1 java -classpath ... MyApp

The former is not possible under Bash, while the latter is. No code or
configuration changes are required; SystemEnvironmentPropertySource
adapts for these varations automatically.

SystemEnvironmentPropertySource is added by default as
"systemEnvironment" to StandardEnvironment and all subtypes, taking the
place of the plain MapPropertySource that was in use before this change.

Issue: SPR-8869
2011-11-26 05:20:25 +00:00
Chris Beams 2c26a23c46 Rename EnvironmentTests => StandardEnvironmentTests 2011-11-26 05:20:20 +00:00
Chris Beams a53d592f62 Use 'name' vs 'key' consistently in PropertySource 2011-11-26 05:20:17 +00:00
Chris Beams 03f6d23536 Reference @EnableCaching from spring-cache XSD 2011-11-26 05:20:08 +00:00
Chris Beams 333f9f31a7 Polish imports 2011-11-26 05:20:04 +00:00
Costin Leau 3416a26136 + add docs
+ rename cache:definitions to cache:caching (to be consistent with annotations)
2011-11-25 19:40:05 +00:00
Chris Beams 549c663fba Fix generics warnings in AbstractBeanFactory 2011-11-24 21:40:02 +00:00
Chris Beams 0113ea91a3 Support by-type lookup/injection of primitive types
Allowing beans of primitive type to be looked up via getBean(Class), or
to be injected using @Autowired or @Injected or @Resource. Prior to
these changes, an attempt to lookup or inject a bean of, for example,
type boolean would fail because all spring beans are Objects, regardless
of initial type due to the way that ObjectFactory works.

Now these attempts to lookup or inject primitive types work, thanks to
simple changes in AbstractBeanFactory using ClassUtils#isAssignable
methods instead of the built-in Class#isAssignableFrom. The former takes
into account primitives and their object wrapper types, whereas the
latter does not.

The need to declare, look up or inject primitive-typed beans is probably
low -- how often does one need a bean of type boolean or int after all?.
Prior to the introduction of @Bean methods in Spring 3.0, it was not
possible in practice to register primitive beans, so this issue never
came up. Now that one can declare primitive-typed beans, it does make
sense that we properly support by-type lookup and injection without
forcing the user to work with object wrappers.

Issue: SPR-8874
2011-11-24 21:39:58 +00:00
Rossen Stoyanchev ca3d774f5c Add detectHandlerMethodsInAncestorContexts property to AbstractHandlerMethodMapping. 2011-11-23 18:59:08 +00:00
Rossen Stoyanchev b5bcfa0ae3 SPR-8858 Fix in AntPathMatcher.combine(..)
Currently the combine method consolidates "/*" and "/hotel" 
into "/hotel". However if the first pattern contains URI template 
variables, the consolidation seems wrong. The fix is to prevent
the consolidation if the first pattern contains "{".
2011-11-23 17:53:18 +00:00
Rossen Stoyanchev e695a21688 SPR-8862 Fix issue with matching negated header values. 2011-11-23 15:23:55 +00:00
Rossen Stoyanchev 6eba6f2059 Document MVC Java config side-by-side with the MVC namespace. 2011-11-22 23:25:12 +00:00
Chris Beams b2ae3dbb47 Avoid 'type mismatch' errors in ExtendedBeanInfo
Certain edge cases around return type covariance can trigger an
IntrospectionException when trying to create a new PropertyDescriptor;
particularly around the addition of write methods with parameter types
that do not match read method return types.

These type mismatch exceptions are raised during normal Introspector
operations as well (i.e. without ExtendedBeanInfo in the mix), but
the Introspector intentionally supresses them. In covariance cases,
there is often already a suitable write method present, e.g. discovered
in a supertype or superinterface, that, with the benefit of bridge
methods works just fine in practice at runtime.  That is to say, in
these suppression cases, the rejection of the write method is 'OK' in
that there is already a write method present that can handle a call.

ExtendedBeanInfo now mirrors this suppression behavior, but does issue
a WARN-level log message to let the user know.

An important effect of this change is that ExtendedBeanInfo now modifies
the delegate BeanInfo object, whereas previously it did not. In practice
this probably matters very little, but it is a design change worth
noting. The reason for this change was to avoid the need to create new
PropertyDescriptors wherever possible. It was discovered that by updating
existing PDs, one can avoid these IntrospectionExceptions a greater
percentage of the time.

Issue: SPR-8806
2011-11-19 21:07:10 +00:00
Rossen Stoyanchev 947b5fefff SPR-8851 Switch to logging debug messages in AbstractWebArgumentResolverAdapter 2011-11-18 16:18:55 +00:00
Rossen Stoyanchev 60ee0bb8f4 SPR-8020 Support UriComponentsBuilder as a controller method argument.
The UriComponentsBuilder instance passed into the method is initialized
with current request information including host, scheme, port, context
path, and the servlet mapping's literal part.

Also added shortcut methods to buildAndExpand in UriComponentsBuilder.
2011-11-18 14:36:44 +00:00
Rossen Stoyanchev e4fada56ab SPR-8859 Fix issue with prototype controllers in RequestMappingHandlerAdapter. 2011-11-18 11:32:01 +00:00
Chris Beams c03a950706 Polish tests and Javadoc for SPR-8824
Issue: SPR-8824
2011-11-18 03:36:26 +00:00
Chris Beams 224cf11fcb Make @Configuration class enhancement idempotent
The registration of more than one ConfigurationClassPostProcessor
results in the double-enhancement of @Configuration classes, i.e. a
two-deep CGLIB subclass hierarchy is created.

As a side-effect of changes introduced in 3.1 M2 fixing SPR-8080, this
behavior now results in an infinite loop at CGLIB callback processing
time, leading to a StackOverflowException which is then suppressed by
the container, and ultimately results in the user being presented with
an unintuitive "Bean 'x' is not already in creation" exception.

This fix introduces a marker interface 'EnhancedConfiguration' to be
implemented by all generated @Configuration subclasses. The
configuration class enhancer can then behave in an idempotent fashion
by checking to see whether a candidate @Configuration class is already
assignable to this type i.e. already enhanced and ignore it if so.

Naturally, users should avoid registering more than one
ConfigurationClassPostProcessor, but this is not always possible. As
with the case in point, SPR-8824 originates from problems with
spring-data-neo4j, which explicitly registers its own
ConfigurationClassPostProcessor. The user has little control over this
arrangement, so it is important that the framework is defensive as
described above.

Issue: SPR-8824
2011-11-18 03:25:16 +00:00
Rossen Stoyanchev 01cc76f8e3 SPR-8697 Flag '*/subtype' as illegal. 2011-11-17 20:15:49 +00:00
Sam Brannen e7377e3c27 consistency and formatting 2011-11-17 15:09:02 +00:00
Rossen Stoyanchev 63e235f215 SPR-8750 Refine 'Content-Type' update in MockHttpServletRequest/Response.
The initial solution kept these three in full sync at all times:
contentType field, characterEncoding field, 'Content-Type' header.
That is correct behavior, however it breaks existing tests that rely
on contentType and characterEncoding being equal to exactly what 
they were set to.

For example, consider:
response.setContentType("text/plain");
response.setCharacterEncoding("UTF-8");

Ideally both contentType and the 'Content-Type' header would now be
"text/plain;charset=UTF-8". However, existing tests would expect 
that contentType is equal to "text/plain".

To avoid breaking existing tests, contentType and characterEncoding
will continue to be equal to exactly what they were set to while
the 'Content-Type' header will always include both the content 
type and the charset.

The only exception to this rule is when a 'Content-Type' header
is set explicitly, the contentType and characterEncoding fields will 
be updated accordingly, possibly overriding the existing values.
2011-11-17 15:07:15 +00:00
Chris Beams 56608d6bd6 Fix typo in ResourceHolder#isVoid Javadoc
Issue: SPR-8843
2011-11-16 23:32:42 +00:00
Chris Beams 1d5ca80924 Fix typo in classpath scanning reference doc
Issue: SPR-8842
2011-11-16 23:32:38 +00:00
Rossen Stoyanchev 7918810366 SPR-8750 Update MockHttpServletRequest/Response handling of contentType.
The Content-Type header and the contentType field in HttpServletRequest/Response
are now always in sync. When a header is added the contentType field is updated
as well and vice versa. 

Similarly when the Content-Type header or the contentType field includes a charset 
field, the character encoding is updated and vice versa.
2011-11-16 23:28:48 +00:00
Chris Beams 3528637d62 Fix JUnit version in spring-parent pom
Issue: SPR-8852
2011-11-16 18:23:58 +00:00
Chris Beams 70c28a0bc5 Add Apache license header where missing in src/main 2011-11-16 18:23:56 +00:00
Chris Beams 9c0c87f6a7 Polish AutoProxyRegistrar 2011-11-16 18:23:45 +00:00
Chris Beams d1f6672a58 Refactor ImportSelector support
Separate concerns of @Configuration class selection from the need to
register certain infrastructure beans such as auto proxy creators.

Prior to this change, ImportSelector implementations were responsible
for both of these concerns, leading to awkwardness and duplication.

Also introduced in this change is ImportBeanDefinitionRegistrar and
two implementations, AutoProxyRegistrar and AspectJAutoProxyRegistrar.
See the refactored implementations of CachingConfigurationSelector,
TransactionManagementConfigurationSelector to see the former;
AspectJAutoProxyConfigurationSelector to see the latter.

ImportSelector and ImportBeanDefinitionRegistrar are both handled as
special-case arguments to the @Import annotation within
ConfigurationClassParser.

These refactorings are important because they ensure that Spring users
will be able to understand and extend existing @Enable* annotations
and their backing ImportSelector and @Configuration classes, as well
as create their own with a minimum of effort.
2011-11-16 04:21:28 +00:00
Chris Beams 4f3cbb45f4 Introduce @EnableCaching
See EnableCaching Javadoc for details.

Issue: SPR-8312
2011-11-16 04:21:21 +00:00
Chris Beams 732bf58570 Rename @CacheDefinitions => @Caching
Also eliminate all 'cache definition' language in favor of
'cache operation' in comments, method and parameter names (most
classes had already been refactored to this effect).
2011-11-16 04:21:12 +00:00
Chris Beams a252a285e2 Convert cache package line endings from CRLF => LF
Unfortunately creates a large diff due to whitespace changes as well as
false attribution of authorship from a git/svn 'blame' perspective.

Be sure to perform diffs using `git diff -w` or `svn diff -w` when
reviewing recent changes to these sources to ignore all whitespace.
2011-11-16 04:21:06 +00:00
Chris Beams f9879b762b Rename KeyGenerator#extract => #generate 2011-11-16 04:20:57 +00:00
Chris Beams 06306f9149 Extract various constants in DefaultKeyGenerator 2011-11-16 04:20:53 +00:00
Chris Beams 83d099db98 Prune CacheAspectSupport#setCacheOperationSource
In favor of existing #setCacheOperationSources(CacheOperationSource...)

Also polish Javadoc throughout, replacing stale references to
CacheDefinitionSource where appropriate as well as other minor changes
2011-11-16 04:20:50 +00:00
Chris Beams 42cbee883f Add generics to AbstractCacheManager#caches
Facilitates type-safe programmatic configuration from @Bean methods:

    @Bean
    public CacheManager cacheManager() {
        SimpleCacheManager cm = new SimpleCacheManager();
        cm.setCaches(Arrays.asList(
            new ConcurrentMapCache("default"),
            new ConcurrentMapCache("primary"),
            new ConcurrentMapCache("secondary")
        ));
        return cm;
    }

Prior to this change, the code above would have raised errors on the
Arrays.asList() call because it returns a Collection<? extends Cache>
as opposed to Collection<Cache>.

After this change, AbstractCacheManager expects
Collection<? extends Cache> throughout.
2011-11-16 04:20:46 +00:00
Chris Beams 7a71af2989 Remove stale duplicate copy of spring-cache XSD
This was removed once previously but accidentally re-introduced later.
The 'correct' version of spring-cache-3.1.xsd lives in spring-context
as opposed to here in spring-context-support.

Also placed .gitignore file within src/main/resources such that the
now-empty directory does not get pruned in git environments, which will
otherwise cause 'missing source folder' errors within Eclipse/IDEA.
2011-11-16 04:20:43 +00:00
Chris Beams 96200b690c Refactor cache support test hierarchy
Refactored getConfig => getApplicationContext such that subclasses have
control over the type of ApplicationContext used by the base class
tests. Done in anticipation of @EnableCaching tests that will favor use
of AnnotationConfigApplicationContext

Also updated all use of ClassPathXmlApplictionContext to
GenericXmlApplicationContext, which is generally preferred.
2011-11-16 04:20:39 +00:00
Chris Beams b7f9bf2e1c Polish cache Javadoc 2011-11-16 04:20:36 +00:00
Chris Beams 8abb315042 Fix cache generics warnings; polish whitespace 2011-11-16 04:20:32 +00:00
Chris Beams 1533822b0a Update proxyTargetClass-related Javadoc; add tests
There was some question about whether enabling subclass proxies via
proxyTargetClass / proxy-target-class settings would break annotation-
based demarcation of joinpoints due to inability to discover those
annotations in various scenarios. The provided tests prove that in
any conceivable case, these annotations (@Transactional, at least)
are discovered in a consistent fashion, meaning that switching proxy
strategies should be transparent to the application and honor
intended annotation semantics.
2011-11-16 04:20:28 +00:00
Chris Beams 124662189e Polish @EnableAsync imports, etc 2011-11-16 04:20:22 +00:00
Chris Beams 43b3b4c261 Polish @Enable* Javadoc 2011-11-16 04:20:17 +00:00
Chris Beams 40798bd48f Improve ImportStack#toString output 2011-11-16 04:20:12 +00:00
Chris Beams 7b491370a3 Polish EmbeddedDatabaseBuilder
Minor improvements made during the triage of SPR-8817
2011-11-13 01:38:47 +00:00
Chris Beams 4ededaf11c Fix typo in DateTimeFormat Javadoc
Issue: SPR-8838
2011-11-13 01:38:44 +00:00
Chris Beams b167b75453 Polish @Scheduled Javadoc
Add reference to @EnableScheduling and <task:annotation-driven>
2011-11-13 01:38:40 +00:00
Sam Brannen c0b3b7b81e Added cross linking in Javadoc for @Autowired, @Qualifier, and @Value. 2011-11-11 22:28:37 +00:00
Juergen Hoeller b21e1ee669 polishing 2011-11-11 09:57:34 +00:00
Juergen Hoeller 0b078f2ff9 added Quartz 2.1 loadClass variant (SPR-8727) 2011-11-11 09:54:28 +00:00
Rossen Stoyanchev 2a39f34d33 SPR-8803 Refine UriComponentsBuilder.replaceQueryParam().
If no values are given, the query parameter is removed.
2011-11-10 15:08:24 +00:00
Costin Leau dc88a7c8ba SPR-8830
SPR-8082
SPR-7833
+ add support for CacheDefinitions declarations inside XML
+ more integration tests
2011-11-09 17:53:51 +00:00
Costin Leau e4c88553d8 + rename test (as otherwise it gets picked even if it's abstract) 2011-11-09 10:52:22 +00:00
Costin Leau 473eaac117 + temporarily disable XML defs (since cache-update and cache-definition are not yet supported) 2011-11-09 10:44:14 +00:00
Costin Leau eddb0ac3be + introduced @CacheUpdate annotation
+ introduced @CacheDefinition annotation
+ introduced meta-annotation to allow multiple @Cache annotations
SPR-7833
SPR-8082
2011-11-09 10:00:44 +00:00
Rossen Stoyanchev c3f0f31243 SPR-8819 Fix issue in setting best matching pattern. 2011-11-08 20:00:42 +00:00
Rossen Stoyanchev b9a3d4577a SPR-8823 Fix test error. 2011-11-08 19:25:50 +00:00
Rossen Stoyanchev c9acaaf9d8 SPR-8823 ServletUriComponentsBuilder polish and reference doc update. 2011-11-08 17:49:38 +00:00
Rossen Stoyanchev d1d48ac940 SPR-8823 Add ServletUriComponentsBuilder. 2011-11-07 21:04:23 +00:00
Sam Brannen 1beb04cebf polishing 2011-11-06 17:26:30 +00:00
Rossen Stoyanchev bef75aab07 Polish synchronization of model attributes with the session. 2011-11-04 22:14:13 +00:00
Rossen Stoyanchev d3f4c69f00 SPR-8803 Add UriComponentsBuilder methods to replace path/query. 2011-11-04 16:43:03 +00:00
Rossen Stoyanchev 8889284517 SPR-8801 Set ignoreDefaultModelOnRedirect=false in MVC namespace and Java config. 2011-11-04 03:02:47 +00:00
Rossen Stoyanchev cd2fee035a SPR-8783 Update javadoc of MVC's AnnotationDrivenBeanDefinitionParser 2011-11-03 19:19:54 +00:00
Rossen Stoyanchev bba8bb6ec0 SPR-8661 Add disabled attribute to HiddenInputTag 2011-11-03 16:29:12 +00:00
Arjen Poutsma 78fbceff82 Added check for illegal characters when creating an encoded UriComponents object 2011-11-03 11:57:25 +00:00
Rossen Stoyanchev c290a4e68a SPR-8694 HTML5 updates to the "type" attribute of the Spring Form tags.
Since dynamic attributes were allowed in Spring 3, it raised the 
possibility to specify a type attribute on a number of the form tags.
Where it makes sense (see below) that attribute is now rejected
and reversely where it makes sense it is accepted.

InputTag allows types other than "text" but rejects type="radio" or 
type="checkbox" since there is a good reason for those to be used 
only in conjunction with the appropriate form library tags.

Other HTML input tags such as PasswordTag, HiddenInputTag, 
Checkbox(es)Tag and RadioBox(es)Tag check the dynamic attributes 
and reject them if they contain a type attribute since.
2011-11-02 21:38:50 +00:00
Arjen Poutsma e8dd35ce5e Added check for expanding already encoded UriComponents object 2011-11-02 11:49:45 +00:00
Rossen Stoyanchev 8337f4bf20 SPR-8789 Support request with multiple param values in FlahMap matching logic 2011-11-01 16:26:25 +00:00
Rossen Stoyanchev e6920a59fa SPR-8779 Use original URI in FlashMap match logic to account for URL rewriting. 2011-11-01 15:19:04 +00:00
Rossen Stoyanchev 1164f5a9fc SPR-8782 Raise helpful error when RedirectAttributes is used with old infrastructure classes. 2011-11-01 11:46:09 +00:00
Rossen Stoyanchev 5a6980b78b SPR-7943 Minor fix 2011-10-22 13:07:36 +00:00
Rossen Stoyanchev 57fe16e14b SPR-8755 Add Button tag. 2011-10-21 23:36:41 +00:00
Rossen Stoyanchev fd97c8d7a4 SPR-8770 Ensure RequestDataValueProcessor is invoked from RedirectView. 2011-10-21 22:16:08 +00:00
Juergen Hoeller 2980ef4c75 prepared for 3.1 RC2 2011-10-20 12:08:49 +00:00
Juergen Hoeller 79bcefa0ce optimized DefaultListableBeanFactory's PropertyDescriptor caching for concurrent access (SPR-7863) 2011-10-20 12:04:01 +00:00
Juergen Hoeller e2d9142c5a LocaleEditor and StringToLocaleConverter do not restrict variant part through validation (SPR-8637) 2011-10-20 11:53:02 +00:00
Juergen Hoeller 0c9e3fb3bd polishing 2011-10-20 11:21:54 +00:00
Juergen Hoeller 36616a0c2c fixed GenericTypeResolver to consistently return null if not resolvable (SPR-8698) 2011-10-20 11:17:42 +00:00
Juergen Hoeller 3bd9a3e3e0 RmiClientInterceptor detects nested SocketException as connect failure as well (SPR-8628) 2011-10-20 11:09:14 +00:00
Juergen Hoeller f7b9eb8fe3 added proper "contentLength()" implementation to ByteArrayResource (SPR-8709) 2011-10-20 10:59:44 +00:00
Juergen Hoeller 2fdc2b5822 fixed StandardServlet/PortletEnvironment to check for JNDI (for Google App Engine compatibility) 2011-10-20 10:46:16 +00:00
Juergen Hoeller 3f73f51966 fixed MethodInvokingJobDetailFactoryBean's Quartz 2.0 support 2011-10-20 10:27:28 +00:00
Juergen Hoeller 0dfb617d8a refer to correct openSession() method for Hibernate 4.0 (SPR-8776) 2011-10-20 10:23:49 +00:00
Juergen Hoeller de5a007e46 cleanup of conversation dependencies 2011-10-20 09:56:07 +00:00
Juergen Hoeller ca5f38c5e4 marked Apache HttpComponents dependency as optional (SPR-8788); cleanup of conversation dependencies 2011-10-20 09:55:09 +00:00
Rossen Stoyanchev 3c649a6c66 Polish @EnableWebMvc javadoc 2011-10-17 22:59:54 +00:00
Rossen Stoyanchev 313ba395af Minor fix to name of attribute used to store FlashMap instances. 2011-10-17 21:30:09 +00:00
Rossen Stoyanchev 5d42a6242f SPR-8759 Provide methods to add or get status codes in SimpleMappingExceptionResolver as Map<String, Integer>. 2011-10-17 21:28:56 +00:00
Chris Beams dacfa6993a Fix assignment error in AbstractAsyncExecutionAspect
Issue: SPR-8772
2011-10-17 18:35:27 +00:00
Chris Beams 5360bd899d Fix warnings and polish LocalSessionFactoryBuilder 2011-10-13 03:56:51 +00:00
Sam Brannen e65366012d [SPR-8401] Added documentation for @ActiveProfiles in the "Annotations" section. 2011-10-12 21:34:02 +00:00
Chris Beams d98316e494 Update doc publication urls to static.s2.org 2011-10-12 07:04:55 +00:00
Chris Beams cb14697800 Remove stale duplicate copy of spring-cache XSD 2011-10-12 07:04:52 +00:00
Chris Beams 17ce06acec Update changelog re destroy method inference
Issue: SPR-8751
2011-10-12 03:56:17 +00:00
Chris Beams 38e90105a0 Support destroy method inference
Anywhere the value of a destroy method may be expressed, specifying
the value "(inferred)" now indicates that the container should attempt
to automatically discover a destroy method. This functionality is
currently limited to detecting public, no-arg methods named 'close';
this is particularly useful for commonly used types such as Hibernate
SessionFactory most JDBC DataSource implementations, JMS connection
factories, and so forth.

This special value is captured as the constant
AbstractBeanDefinition#INFER_METHOD, which in turn serves as the default
value of the @Bean#destroyMethod attribute.

For example in the following case

    @Bean
    public BasicDataSource dataSource() { ... }

the container will automatically detect BasicDataSource#close and invoke
it when the enclosing ApplicationContext is closed. This is exactly
equivalent to

    @Bean(destroyMethod="(inferred)")
    public BasicDataSource dataSource() { ... }

A user may override this inference-by-default convention simply by
specifying a different method

    @Bean(destroyMethod="myClose")
    public MyBasicDataSource dataSource() { ... }

or, in the case of a bean that has an otherwise inferrable 'close'
method, but the user wishes to disable handling it entirely, an empty
string may be specified

    @Bean(destroyMethod="")
    public MyBasicDataSource dataSource() { ... }

The special destroy method name "(inferred)" may also be specified in
an XML context, e.g.

    <bean destroy-method="(inferred)">
        or
    <beans default-destroy-method="(inferred)">

Note that "(inferred)" is the default value for @Bean#destroyMethod,
but NOT for the destroy-method and default-destroy-method attributes
in the spring-beans XML schema.

The principal reason for introducing this feature is to avoid forcing
@Configuration class users to type destroyMethod="close" every time a
closeable bean is configured. This kind of boilerplate is easily
forgotten, and this simple convention means the right thing is done
by default, while allowing the user full control over customization or
disablement in special cases.

Issue: SPR-8751
2011-10-12 02:09:04 +00:00
Chris Beams 8cafb7ee13 Fix warnings in DisposableBeanAdapter 2011-10-12 02:08:52 +00:00
Sam Brannen f0ded6a91f [SPR-8401] Added missing TransferServiceConfig code listing. 2011-10-11 23:32:10 +00:00
Sam Brannen dc95e49c27 [SPR-8240][SPR-8401] formatting and polishing. 2011-10-11 23:20:50 +00:00
Sam Brannen 027c25d823 [SPR-8401] Documented TestContext support for @ActiveProfiles in the reference manual. 2011-10-11 23:05:28 +00:00
Juergen Hoeller e1721976bb final preparations for 3.1 RC1 release 2011-10-11 22:08:01 +00:00
Juergen Hoeller 12c1f47733 extended LocalSessionFactoryBean options for Hibernate 4; factored out LocalSessionFactoryBuilder 2011-10-11 22:05:19 +00:00
Chris Beams d09faabcb6 Update changelog re @EnableAspectJAutoProxy
Issue: SPR-8138
2011-10-11 19:15:10 +00:00
Chris Beams 739775ca19 Introduce @EnableAspectJAutoProxy
Issue: SPR-8138
2011-10-11 18:51:41 +00:00
Chris Beams b08a6d32a4 Polish "What's new in Spring 3.1" re @Enable* 2011-10-11 18:51:32 +00:00
Chris Beams 5876307997 Update "What's new in Spring 3.1" re Hibernate 4.x 2011-10-11 18:51:30 +00:00
Chris Beams f60a40be44 Polish Environment subsystem Javadoc 2011-10-11 18:51:26 +00:00
Chris Beams 3920c5a158 Polish @ComponentScan/@Configuration/@Lazy Javadoc 2011-10-11 18:51:15 +00:00
Juergen Hoeller 1cea52b66b renamed mapKey/ValueTypeDescriptor methods back to getMapKey/ValueTypeDescriptor (for Spring 3.0.x compatibility) 2011-10-11 16:55:07 +00:00
Juergen Hoeller ba2c8fc592 deprecated JdoTemplate and co in favor of native PersistenceManager usage 2011-10-11 16:48:08 +00:00
Juergen Hoeller feed594ba4 deprecated JpaTemplate and co in favor of native EntityManager usage 2011-10-11 16:24:32 +00:00
Juergen Hoeller 0d02ef5fe5 removed conversation prototype from 3.1 codebase 2011-10-11 16:22:15 +00:00
Sam Brannen 60fb3efc2b [SPR-8240] Added new "Mixing XML resources and @Configuration classes" section to the testing chapter. 2011-10-11 12:39:57 +00:00
Rossen Stoyanchev 1aa1278e99 SPR-8725 Change modifier in WebMvcConfigurationSupport methods from package private to public.
Use of package private @Bean methods can cause issues if the class
is extended and the sub-class is in a different package. This is 
covered in detail in SPR-8756.
2011-10-11 10:43:08 +00:00
Chris Beams 9be6ddc946 Include Hibernate 4.x in Eclipse classpath 2011-10-11 05:31:31 +00:00
Chris Beams 2760542182 Add repro test case for package-private @Bean issue
Reproduces the issue described in SPR-8756 in addition to demonstrating
the suggested workaround.

Issue: SPR-8756, SPR-8725
2011-10-11 04:02:03 +00:00
Juergen Hoeller cfb380d653 fixed unbind failure through appropriate guard 2011-10-11 02:08:26 +00:00
Juergen Hoeller d54922642c made compilation work with Hibernate 4.0 next to Hibernate 3.x 2011-10-11 01:53:43 +00:00
Juergen Hoeller 3032b214c6 avoid hard JPA 2.0 dependency 2011-10-11 01:31:22 +00:00
Juergen Hoeller 6aaf7fefde removed Hibernate EntityManager 4.0 dependency since it is not needed for compilation and not for standard runs of the test suite either 2011-10-11 01:22:20 +00:00
Juergen Hoeller 0256f3d43e consistently use Unix line separator 2011-10-11 01:14:20 +00:00
Juergen Hoeller e58a45bff7 polishing 2011-10-11 01:13:41 +00:00
Juergen Hoeller 1f89243361 use internal Set for TransactionSynchronization objects in order to allow for equals/hashCode based replacement 2011-10-11 01:11:17 +00:00
Juergen Hoeller 4c49cc73b2 avoid NPE in case of no "hibernateProperties" specified 2011-10-11 01:10:07 +00:00
Juergen Hoeller e1a6bb2d2e committed initial Hibernate 4.0 support 2011-10-11 01:08:41 +00:00
Juergen Hoeller d02ac641cc further additions to manual changelog for 3.1 RC1 2011-10-11 01:02:55 +00:00
Juergen Hoeller 339c57e41a polishing 2011-10-11 01:00:31 +00:00
Juergen Hoeller 37c601c8dd HibernateJpaDialect exposes underlying Session for underlying SessionFactory 2011-10-11 00:58:47 +00:00
Juergen Hoeller 0ff83606df committed initial Hibernate 4.0 support 2011-10-11 00:53:01 +00:00
Sam Brannen 55f91e54c4 Corrected Javadoc: handleListenerException() and invokeErrorHandler() log at WARN level, not at ERROR level. 2011-10-10 22:13:45 +00:00
Juergen Hoeller 8bd1fc817a introduced extended WritableResource interface 2011-10-10 19:46:00 +00:00
Chris Beams f35dfd4107 Update stale external javadoc links
Certain external javadoc links were broken or out of date, namely
Hibernate, Java SE and EE 6, Quartz, and Apache Pluto. All resolve
properly now.

Issue: SPR-8720
2011-10-10 06:12:29 +00:00
Chris Beams 980c15d578 Distinguish between different bridge method types
Add BridgeMethodResolver#isJava6VisibilityBridgeMethodPair to
distinguish between (a) bridge methods introduced in Java 6 to
compensate for inheriting public methods from non-public superclasses
and (b) bridge methods that have existed since Java 5 to accommodate
return type covariance and generic parameters.

In the former case, annotations should be looked up from the original
bridged method (SPR-7900).  In the latter, the annotation should be
looked up against the bridge method itself (SPR-8660).

As noted in the Javadoc for the new method, see
http://stas-blogspot.blogspot.com/2010/03/java-bridge-methods-explained.html
for a useful description of the various types of bridge methods, as
well as http://bugs.sun.com/view_bug.do?bug_id=6342411, the bug fixed in
Java 6 resulting in the introduction of 'visibility bridge methods'.

Issue: SPR-8660, SPR-7900
2011-10-10 05:40:21 +00:00
Sam Brannen 6248135a4f [SPR-8240] Updating the "new in 3.1" chapter regarding new testing support; polishing the TestContext Framework section of the reference manual. 2011-10-09 23:32:01 +00:00
Sam Brannen 71396ac07b Polishing JavaDoc 2011-10-09 23:29:59 +00:00
Chris Beams 6837111bda Refactor AnnotationUtils#findAllAnnotationAttributes
Remove all convenience variants of #findAllAnnotationAttributes and
refactor the remaining method to accept a MetadataReaderFactory
instead of creating its own SimpleMetadataReaderFactory internally.
This allows clients to use non-default class loaders as well as
customize the particular MetadataReaderFactory to be used (e.g.
'simple' vs 'caching', etc).

Issue: SPR-8752
2011-10-09 20:32:21 +00:00
Chris Beams 3bb01ee68b Revert "Introduce (Annotation)SessionFactoryBuilder types"
This commit and the several before it back out the
SessionFactoryBuilder and AnnotationSessionFactoryBuilder types
recently introduced in 3.1 M2. This is in light of the impending
release of Hibernate 4.0 GA and our own support for it the new
org.springframework.orm.hibernate4 package (not yet committed).

This new package will have a similar, but far simpler, arrangement of
a single LocalSessionFactoryBuilder and LocalSessionFactoryBean pair.
Hibernate 3.x support will remain largely as-is, however the
HibernateTransactionManager introduced with SPR-8076 will remain.

This reverts commit 9e8259198f.

Issue: SPR-8066, SPR-7936, SPR-8076, SPR-8098, SPR-8096, SPR-7387
2011-10-09 07:55:52 +00:00
Chris Beams 25796448f6 Revert "removed double javadoc"
This reverts commit 2d26c4992e.
2011-10-09 07:55:38 +00:00
Chris Beams 0d43023571 Revert "All SFBuilder setters return 'this' & use varargs"
This reverts commit 0e2ce565c9.
2011-10-09 07:55:33 +00:00
Chris Beams 1a8531b401 Revert "Automatically close SessionFactory objects"
This reverts commit bb4f48dcb3.

Issue: SPR-8114
2011-10-09 07:55:28 +00:00
Chris Beams b82d5ae8da Revert "Implement SessionFactoryImplementor in SF proxies"
This reverts commit 08ccd19c76.

Issue: SPR-8469
2011-10-09 07:55:21 +00:00
Chris Beams 363e08df22 Revert "Auto-unwrap SessionFactoryBuilder-created proxies"
This reverts commit 7903d6489f.

Issue: SPR-8492
2011-10-09 07:55:14 +00:00
Chris Beams d122ecb42e Move AdviceMode from .config to .annotation package 2011-10-09 07:55:08 +00:00
Chris Beams 1819bee35f Revert deprecation of AbstractSingletonPFB and co
Removed formal deprecation warnings for AbstractSingletonFactoryBean and
its TransactionProxyFactoryBean and CacheProxyFactoryBean subclasses.

This is principally because TPFB is still used by Grails and could
conceivably be used to good effect by any third-party framework in a
similar fashion. CPFB is new with 3.1, but similar use is predictable.

Deprecations have been replaced by strong recommendations that users
avoid these types in modern Spring applications and favor the use of
namespaces and annotatinos, such as tx: and @Transactional (around
since Spring 2.x) and cache: and @Cacheable.

Issue: SPR-8680, SPR-8686
2011-10-09 07:54:54 +00:00
Chris Beams 9ba1d1437d Give ExtendedBeanInfo package-private visibility
Issue: SPR-8079
2011-10-09 07:54:44 +00:00
Chris Beams 870d903417 Add INFER_METHOD constant and update @Bean Javadoc
In anticipation of 'destroy method inference' feature, introduce
ConfigurationClassUtils#INFER_METHOD and update @Bean#destroyMethod to
reflect its use.

Issue: SPR-8751
2011-10-09 07:54:39 +00:00
Chris Beams 6b4ef0237c Add code examples to and polish @Bean Javadoc 2011-10-09 07:54:33 +00:00
Thomas Risberg dee9e280b0 SPR-7476 Improving named parameter parsing skipping escaped colons like '\:' and allowing for delimiting parameter names with curly brackets like :{p1} 2011-10-08 12:48:26 +00:00
Costin Leau e493887f45 + update cache docs whitespace for better rendering 2011-10-08 12:22:09 +00:00
Thomas Risberg 933e22320d SPR-7476 Improving named parameter parsing skipping escaped colons like '\:' and allowing for delimiting parameter names with curly brackets like :{p1} 2011-10-08 12:10:56 +00:00
Thomas Risberg 4f5248bb5c SPR-7476 Improving named parameter parsing skipping escaped colons like '\:' and allowing for delimiting parameter names with curly brackets like :{p1} 2011-10-08 11:48:45 +00:00
Costin Leau 40d88fd991 SPR-8730
+ more tests
2011-10-07 20:16:58 +00:00
Costin Leau a12ebbfded SPR-8730
+ expose key-generator in the XML namespace
2011-10-07 19:45:05 +00:00
Costin Leau e6d9b6308e some cache doc updates 2011-10-07 19:42:09 +00:00
Thomas Risberg aec82fbd4a SPR-7476 Improving named parameter parsing skipping escaped colons like '\:' and allowing for delimiting parameter names with curly brackets like :{p1} 2011-10-07 18:57:32 +00:00
Thomas Risberg 92d6e5a14c SPR-8270 Adding improved support for detecting current schema name for Oracle 2011-10-07 03:01:43 +00:00
Sam Brannen 1317b821b9 [SPR-7724] Example email addresses in the reference manual now use example.org as the domain name. 2011-10-07 01:23:26 +00:00
Thomas Risberg 118ee3fce8 SPR-8652 Fixing queryForLong and queryForInt implementation to use correct expected type 2011-10-06 23:58:38 +00:00
Thomas Risberg 0920f2d7d5 SPR-8235 SPR-7480 Updating H2 error codes 2011-10-06 23:19:05 +00:00
Rossen Stoyanchev facb40e5a6 SPR-7943 Add test case for inserting extra hidden fields 2011-10-06 21:19:54 +00:00
Rossen Stoyanchev 4199d772cc SPR-8718 Minor polish 2011-10-06 18:06:47 +00:00
Rossen Stoyanchev 369f6f032b SPR-7943 Minor fix 2011-10-06 14:17:44 +00:00
Rossen Stoyanchev cb5954ed02 SPR-8714 Do not create copy in map-to-map and collection-to-collection conversion if not necessary 2011-10-06 14:17:31 +00:00
Rossen Stoyanchev 00a726b098 SPR-8718 Prevent Converter<?,?> from converting target sub-type. 2011-10-06 14:17:12 +00:00
Chris Beams dfda4c32d5 Fix error in AbstractResource#contentLength Javadoc
Issue: SPR-8734
2011-10-02 19:45:52 +00:00
Sam Brannen ae1205a56c [SPR-8240] polishing 2011-09-30 09:44:57 +00:00
Sam Brannen 5e1d6b9a1b [SPR-8240] polishing 2011-09-29 22:19:30 +00:00
Sam Brannen 3f5135d809 consistent title-case for 1st and 2nd level sections 2011-09-29 22:05:02 +00:00
Sam Brannen 0b2592a70a [SPR-8240] polishing 2011-09-29 22:01:38 +00:00
Sam Brannen 5db7cca9a7 [SPR-8240] polishing the "Context management and caching" section of the reference manual and related Javadoc. 2011-09-29 21:36:06 +00:00
Sam Brannen 1bb5b21881 [SPR-8240] Introduced new "Context management with @Configuration classes" section; fleshing out sections on context configuration inheritance and context caching. 2011-09-29 20:54:26 +00:00
Sam Brannen 713017aedc polishing and formatting 2011-09-29 18:55:48 +00:00
Sam Brannen 2608744479 fixed numerous typos and formatting 2011-09-29 17:06:25 +00:00
Sam Brannen b38d022b84 Fixed broken link to non-existent mvc-multipart-resolver ID. 2011-09-29 16:48:34 +00:00
Sam Brannen a4953e7c22 [SPR-8240] Restructuring the "Context management and caching" section. 2011-09-29 13:51:34 +00:00
Sam Brannen bc6927e601 [SPR-8240] Documented ContextLoaders in the testing chapter. 2011-09-29 13:28:37 +00:00
Sam Brannen e7ce297cf3 [SPR-8240] Restructuring annotation content. 2011-09-29 12:54:39 +00:00
Sam Brannen ac4cd8c37b [SPR-8240] Documenting TestContext support for @Configuration classes in the reference manual; and polishing the testing content in general. 2011-09-29 12:08:05 +00:00
Sam Brannen 15f217c274 [SPR-8240] Documenting TestContext support for @Configuration classes in the reference manual. 2011-09-28 22:28:29 +00:00
Rossen Stoyanchev b08c7f6e00 SPR-6801 @ModelAttribute instantiation refinement.
Instantiate the model attribute from a URI var or a request param only
if the name matches and there is a registered Converter<String, ?>.
2011-09-27 22:48:12 +00:00
Chris Beams 34956d30b3 Fix doc typo in AbstractAutowireCapableBeanFactory 2011-09-27 18:16:20 +00:00
Rossen Stoyanchev a33d277509 Add ExceptionHandlerExceptionResolver tests for custom arg resolvers 2011-09-27 11:22:58 +00:00
Rossen Stoyanchev 7fec9d7fa8 SPR-7943 Add one missing call to RequestDataValueProcessor in FormTag. 2011-09-27 11:22:48 +00:00
Rossen Stoyanchev 57fffb147c SPR-7608 ALLOW EXCEPTION WHEN MODEL ATTR IS CREATED FROM URI VARIABLE
When a @ModelAttribute is instantiated from a URI variable with type
conversion, if conversion fails allow the exception to propagate. 
This is consistent with what happens on type conversion failure with
@PathVariable and other args that rely on type conversion.
2011-09-27 11:22:43 +00:00
Arjen Poutsma 5afe139285 SPR-8706 - UriUrils.decode() not properly rejecting invalid escaped URLs 2011-09-27 08:55:07 +00:00
Arjen Poutsma 67fda70cb8 SPR-8713 - DefaultResponseErrorHandler IOException Bug 2011-09-27 08:16:33 +00:00
Sam Brannen aa7a100807 [SPR-8178] re-enabled testPrintNull(). 2011-09-26 18:59:11 +00:00
Rossen Stoyanchev 3d50d416eb SPR-8718 Revert fix from earlier for now (need a different approach). 2011-09-26 17:58:49 +00:00
Sam Brannen 5309e43ea0 [SPR-8178] @Ignore-ing testPrintNull() until it is determined why changes to GenericConversionService broke this test. 2011-09-26 17:39:04 +00:00
Sam Brannen 052d3e7ccb [SPR-8718] now using correct JIRA ID in the comments. 2011-09-26 16:28:34 +00:00
Sam Brannen f752b47fcb [SPR-8178] @Ignore-ing testDefaultNumberFormatting() until it is determined why changes to GenericConversionService broke this test. 2011-09-26 16:24:51 +00:00
Rossen Stoyanchev 1d7a6c53da SPR-8718 Prevent ClassCastException when the target of Converter<?,?> is a super-class of the actual target. 2011-09-26 12:30:38 +00:00
Sam Brannen f6483cad3c [SPR-8222] Suppressing deprecation warnings for org.junit.internal.runners.model.MultipleFailureException, which has been deprecated in JUnit 4.9. 2011-09-26 11:13:59 +00:00
Rossen Stoyanchev 48f7dcc464 POLISH CREATION OF DATA BINDERS FOR @RequestMapping METHODS
Make it possible to hook in custom ServletRequestDataBinderFactory
by overriding RequestMappingHandlerAdapter. 

Create ExtendedServletRequestDataBinder to add URI template vars
to the binding values taking advantage of a new extension hook in
ServletRequestDataBinder to provide additional values to bind.
2011-09-26 09:27:09 +00:00
Rossen Stoyanchev 6bc4ea058c POLISH ARGUMENT RESOLVERS AND RETURN VALUE HANDLERS. 2011-09-24 11:34:07 +00:00
Rossen Stoyanchev fe7e2a7f54 Improvements to the way the content of RequestConditions is exposed.
RequestCondition types keep individual expression types (e.g. the
discrete header or param expressions) package private. Although the 
implementation of these types should remain private, there is no 
reason not to provide access to the underlying expression data --
e.g. for creating a REST endpoint documentation tool, or if you 
want to know which of the "consumes"/"produces" media types
are negated.

This change ensures that all RequestCondition types have a public
getter that makes available the basic expression data.
2011-09-23 18:20:27 +00:00
Rossen Stoyanchev fb526f534a SPR-8700 REFINE ORDER OF ARGUMENT RESOLUTION AND RETURN VALUE HANDLING.
1. Consider single-purpose return value types like HttpEntity, Model,
View, and ModelAndView ahead of annotations like @ResponseBody and
@ModelAttribute. And reversely consider multi-purpose return value 
types like Map, String, and void only after annotations like
@RB and @MA.

2. Order custom argument resolvers and return value handlers after the
built-in ones also clarifying the fact they cannot be used to override
the built-in ones in Javadoc throughout.

3. Provide hooks in RequestMappingHandlerAdapter that subclasses can use
to programmatically modify the list of argument resolvers and return
value handlers, also adding new getters so subclasses can get access
to what they need for the override.

4. Make SessionStatus available through ModelAndViewContainer and 
provide an argument resolver for it.

5. Init test and javadoc improvements.
2011-09-22 16:00:22 +00:00
Rossen Stoyanchev f200ccd899 SPR-8712 Expose BEST_MATCHING_PATTERN_ATTRIBUTE in RequestMappingHandlerMapping. 2011-09-20 10:09:52 +00:00
Rossen Stoyanchev 7a3f02bce9 SPR-8688 Don't use Servlet request params for form 'PUT' in ServletServerHttpRequest. 2011-09-20 09:18:47 +00:00
Rossen Stoyanchev c257afa515 SPR-7943 Add interface for HDIV integration and delegate to it from JSP form tags. 2011-09-19 21:32:45 +00:00
Sam Brannen 8b8be39d9f polishing 2011-09-17 11:59:46 +00:00
Rossen Stoyanchev 71cc38aaff SPR-6464 Update reference doc with FlashMap and RedirectAttributes information. 2011-09-16 16:44:11 +00:00
Rossen Stoyanchev b2d88ba858 SPR-6464 Polish following code review. 2011-09-15 18:12:30 +00:00
Arjen Poutsma aeba9d244a SPR-5973: now dealing with path followed by segments (and vice-versa) correctly. 2011-09-15 10:24:21 +00:00
Rossen Stoyanchev 1300da06a6 SPR-8593 Fix issue in ModelAndViewMethodReturnValueHandler with ModelAndView containing a View 2011-09-14 16:26:02 +00:00
Arjen Poutsma 38f05678c1 SPR-5973: UriComponents now encapsulates uri template variables 2011-09-14 14:36:49 +00:00
Arjen Poutsma 3f2ea7f50e SPR-5973: UriComponents now encapsulates a PathCompont, switching between string paths and path segment lists automatically. 2011-09-14 14:09:57 +00:00
Arjen Poutsma 782c2a4657 Removed ServletUriComponentsBuilder for now. 2011-09-14 14:01:50 +00:00
Arjen Poutsma 1b61f27f5b polishing 2011-09-14 14:01:21 +00:00
Chris Beams 10be0ef9e7 Clarify BeanFactory#containsBean Javadoc
Previously, #containsBean Javadoc advertised that a true return value
indicates that a call to #getBean for the same name would succeed.

This is actually not the case, and has never been.  The semantics
of #containsBean have always been to indicate whether a bean definition
with the given name is definied or a singleton instance with the given
name has been registered.

The Javadoc now reflects this accurately.

Issue: SPR-8690
2011-09-13 22:09:12 +00:00
Chris Beams bc57f72bbb Temporarily @Ignore failure in RequestContextTests
Issue: SPR-5973
2011-09-13 18:53:18 +00:00
Chris Beams 15a8f776b9 Clarify stereotype and exception translation Javadoc
Cite original inspiriation by Domain-Driven Design, but make clear the
flexible and general-purpose nature of Spring's stereotype annotations
such as @Repository and @Service.

Also update @Repository Javadoc with more explicit instructions about
switching on exception translation through use of
PersistenceExceptionTranslationPostProcessor, and update PETPP Javadoc
for style as well as concrete examples of 'resource factories' that
implement the PersistenceExceptionTranslator interface

Issue: SPR-8691
2011-09-13 17:53:15 +00:00
Keith Donald 1a2f96000e clarified repository definition from DDD and removed comparison with DAO to reduce confusion 2011-09-13 14:31:41 +00:00
Arjen Poutsma 663f056329 SPR-5973: UriComponents no longer a Map, moved all static methods from UriComponents to builder, added expand method to UriComponents 2011-09-13 14:12:54 +00:00
Arjen Poutsma dd1f3f8e0f Added MultiValueMap utility methods 2011-09-13 13:36:08 +00:00
Rossen Stoyanchev 28a696ba51 SPR-8676 Fix minor issue in how ServletServletHttpRequest detects form content-type requests 2011-09-13 12:35:05 +00:00
Rossen Stoyanchev de504fa613 SPR-8678 Use the lookup path to determine the media type by file name. 2011-09-13 09:16:42 +00:00
Rossen Stoyanchev 2799e710bc SPR-6464 Add 'setAlwaysUseRedirectAttributes' flag.
When set to 'true' the flag makes RedirectAttributes the only way to add 
attributes for a redirect thus ignoring the content of the default model 
even if RedirectAttributes is not in the list of controller method args.
2011-09-13 07:53:17 +00:00
Chris Beams a456a1a0e3 Improve annotation processing thread-safety
Commit http://bit.ly/nXumTs ensured that component methods and fields
marked with 'common annotations' such as @Resource, @PostConstruct and
@PreDestroy are invoked/assigned once and only once, even if multiple
instances of the CommonAnnotationBeanPostProcessor are processing the
same bean factory.

The implementation works against the InjectionMetadata API, adding and
removing these members from sets that track whether they are already
'externally managed', i.e. that another CABPP has already handled them,
thus avoiding redundant processing.

Prior to this change, the #remove operations against these sets were
not synchronized. In a single-threaded context this is fine thanks to
logic in AbstractAutowireCapableBeanFactory#doCreateBean that checks to
see whether a given bean definition has already been post processed.
However, as reported by SPR-8598, certain cases involving multiple
threads and annotated prototype-scoped beans can cause concurrent
modification exceptions during the #remove operation (ostensibly because
another thread is attempting to do the same removal at the same time,
though this has yet to be reproduced in isolation).

Now the sets originally introduced by the commit above are decorated
with Collections#synchronizedSet and any iterations over those sets
are synchronized properly. This change should have low performance
impact as such processing happens at container startup time (save for
non-singleton lookups at runtime), and there should be little
contention in any case.

Issue: SPR-8598
2011-09-12 23:05:01 +00:00
Arjen Poutsma c8add61a72 SPR-5973: Using UriComponents in more places, replaced UriBuilder by UriComponentsBuilder, UriComponents is now immutable. 2011-09-12 14:39:58 +00:00
Rossen Stoyanchev ce8bc8e7e4 SPR-6464 Add one more minor Javadoc comment 2011-09-09 17:05:47 +00:00
Rossen Stoyanchev 671744aa62 SPR-6464 Polish FlashMap changes. 2011-09-09 16:48:00 +00:00
Arjen Poutsma f0ed37c233 SPR-5973: UriUtils.parse returns UriComponents 2011-09-09 11:01:05 +00:00
Arjen Poutsma 65baafa032 SPR-5973: Made UriComponent enum inner type of UriComponents 2011-09-09 10:57:13 +00:00
Arjen Poutsma 6c58da0e55 SPR-5973: Added UriComponents type 2011-09-09 10:49:10 +00:00
Rossen Stoyanchev 56c8c69c4c SPR-8642 IMPROVE ERROR REPORTING WHEN RESOLVING MULTIPART REQUEST METHOD ARGUMENTS
Separate client from server errors as much as possible in this order:
- raise MultipartException when resolving a multipart arg and the 
  request is not a multipart request (400)
- raise IllegalArgumentException when the arg type is MultipartFile 
  but the request is not of type MultipartHttpServletRequest (500)
- raise MissingServletRequestPartException when a MultipartResolver
  is in use but the part is not found (400)
- detect presence of Servlet 3.0 before using standard multipart 
  parsing to find a request part or raise 
  IllegalArgumentException (500)

Unfortunately it is not always possible to separate client from 
server errors mainly because the Servlet 3.0 API does not 
distinguish between the case of 0 request parts vs multipart 
processing not being configured.
2011-09-09 09:09:10 +00:00
Arjen Poutsma b6c1e88e4a SPR-5973: Cleaning it up 2011-09-08 11:01:56 +00:00
Arjen Poutsma 5f208936ec Added parse methods 2011-09-07 13:58:51 +00:00
Arjen Poutsma 99f68d3620 SPR-5973: javadoc 2011-09-07 11:49:15 +00:00
Arjen Poutsma 420d11911b SPR-5973: Extract UriComponentTemplate out of UriTemplate 2011-09-07 11:26:22 +00:00
Arjen Poutsma 1d75e1b250 SPR-5973: Changed UriComponent from inner type to top-level enum 2011-09-07 10:40:40 +00:00
Arjen Poutsma 6b7e7d9b5c SPR-5973: UriBuilder 2011-09-07 09:07:09 +00:00
Arjen Poutsma f1c68f243e Changed ClientHttpRequestInterceptor array to List 2011-09-07 08:39:58 +00:00
Chris Beams 49b38190ee Fix typo in cache abstraction reference doc
Issue: SPR-8670
2011-09-06 21:03:02 +00:00
Arjen Poutsma 9a25efbbda SPR-5973: UriBuilder 2011-09-06 15:42:33 +00:00
Rossen Stoyanchev 498d81f696 SPR-8646 Encode URI template variables in the target URL of RedirectView. 2011-09-05 15:05:18 +00:00
Chris Beams 8759b20e46 Include javax.jdo 3.x in spring-orm template.mf
Prior to this change, spring-orm/template.mf was exclusive of javax.jdo
3.0.0. Now, after local testing against the newly-released jdo-api 3.0
jar, the template has been updated to allow for use in OSGi containers.
Note that actually updating build dependency descriptors to JDO 3.0 such
that the framework is continually tested against this version is covered
by a separate issue (SPR-8668).

Issue: SPR-8667, SPR-8655
2011-09-04 01:06:35 +00:00
Chris Beams 2e5f3559d3 Fix handling of @EnableLoadTimeWeaving AUTODETECT
Issue: SPR-8643
2011-09-03 22:37:16 +00:00
Chris Beams 4e522c0cc3 Fix Javadoc error in JdbcOperations
Issue: SPR-8664
2011-09-03 20:07:08 +00:00
Costin Leau d9de19d7b3 SPR-8653
+ refactor a bit the internals of CacheAspect to allow invocations that do not throw any exceptions (AspectJ)
2011-09-02 15:37:42 +00:00
Rossen Stoyanchev 91251812b1 Polish @ExceptionHandler method resolution. Allow subclasses to plug in additional @ExceptionHandler methods. 2011-09-02 11:04:23 +00:00
Costin Leau 04bcd77520 + temporarily revert change 2011-09-02 08:25:39 +00:00
Rossen Stoyanchev b6d7c85f6e SPR-7812 Provide separate methods for type and method-level custom request conditions. Polish javadoc in RequestMappingInfo and related HandlerMapping classes 2011-09-01 12:02:19 +00:00
Costin Leau ddfb2d3c58 + remove unneeded catch for exceptions inside AbstractCacheAspect.aj 2011-09-01 08:04:16 +00:00
Rossen Stoyanchev 37d22ad039 SPR-8611 Add detection of RedirectView when selecting the best view in ContentNegotiatingViewResolver. 2011-08-31 14:51:24 +00:00
Rossen Stoyanchev 7bf44f06a0 SPR-8596 Detect case in UriPathHelper where originating request query (before forwarding) is null. 2011-08-31 13:00:24 +00:00
Costin Leau ce70c985b4 + add documentation on declarative XML 2011-08-31 10:27:42 +00:00
Arjen Poutsma b06de49c72 Changed ClientHttpRequestInterceptor array to List 2011-08-31 09:03:19 +00:00
Arjen Poutsma 4a669d1a0a Removed UrlPathHelper, as it's provided by the superclass 2011-08-31 08:42:45 +00:00
Sam Brannen 1a34f6459d [SPR-8644][SPR-8633] introduced failing (ignored) test regarding support for invoking methods that accept var-args. 2011-08-30 14:20:12 +00:00
Sam Brannen 16fb3cb4b3 [SPR-8644] Introduced a failing (ignored) test that demonstrates that findMethod() does not currently support var-args. 2011-08-30 14:05:51 +00:00
Sam Brannen 1de71c6e37 [SPR-8222] Upgraded to JUnit 4.9. 2011-08-30 13:16:12 +00:00
Rossen Stoyanchev 6a06a17c47 SPR-6464 Add target request matching logic to DefaultFlashMapManager. 2011-08-29 08:37:43 +00:00
Chris Beams 71984b8038 Fix ExtendedBeanInfo indexed write method edge case
See comments at ExtendedBeanInfo#reproSpr8522

Issue: SPR-8522
2011-08-29 05:31:47 +00:00
Sam Brannen 2fc78fb8fd [SPR-8240] cleaned up and formatted the testing chapter. 2011-08-26 22:23:02 +00:00
Sam Brannen 7908d05c71 [SPR-8627] Deprecated @ExpectedException.
[SPR-8240] cleaned up and formatted the testing chapter.
2011-08-26 22:21:16 +00:00
Rossen Stoyanchev 0460a5eceb SPR-8536 Add exact matches when comparing 'produces' conditions (e.g. given Accept: text/*, method with text/* is preferred over text/plain). Also pick a media type alphabetically when two 'produces' condition media types match equally (e.g. given Accept: text/* method with text/plain is chosen over text/xhtml) 2011-08-25 13:09:14 +00:00
Rossen Stoyanchev 00ff018b39 SPR-6464 Uncommitted file from the last commit. 2011-08-25 08:11:17 +00:00
Rossen Stoyanchev baea01ac90 SPR-6464 Add RedirectAttributes and SmartView interfaces. 2011-08-25 07:50:07 +00:00
Chris Beams bd7fd57ad2 Fix cache ref doc typo: Eh{c=>C}acheCacheManager
Issue: SPR-8632, SPR-8635
2011-08-24 19:05:49 +00:00
Chris Beams 7d177ecfd4 Update Servlet 3.0 dependency in webmvc pom 2011-08-24 19:05:45 +00:00
Sam Brannen 7a1553472d [SPR-8633] Introduced generic invokeMethod() in ReflectionTestUtils. 2011-08-24 17:29:00 +00:00
Sam Brannen 4d99ddba8a [SPR-8633] Introduced generic invokeMethod() in ReflectionTestUtils. 2011-08-24 17:26:59 +00:00
Sam Brannen 72da569aa3 [SPR-8386][SPR-8387] Revised Javadoc in the TestContext framework regarding changes in 3.1. 2011-08-20 23:14:20 +00:00
Sam Brannen 1c7cc172d9 [SPR-8627] Deprecated @ExpectedException. 2011-08-20 18:39:36 +00:00
Sam Brannen 381ab6fcc2 [SPR-8627] Deprecated @ExpectedException. 2011-08-20 18:32:37 +00:00
Sam Brannen 960082dbb0 [SPR-8541] Oops! Fixed a minor logic error in DelegatingSmartContextLoader. 2011-08-20 17:52:04 +00:00
Sam Brannen 8ccedd452e [SPR-8541] Documented DelegatingSmartContextLoader. 2011-08-20 17:45:14 +00:00
Sam Brannen 466c3b4b2a [SPR-8541] Documented DelegatingSmartContextLoader. 2011-08-20 17:41:29 +00:00
Sam Brannen 0a88d4bae1 Fixed broken test: now verifying that an attempt to set a null active profile throws an IllegalArgumentException. 2011-08-20 14:58:58 +00:00
Chris Beams 2c239e30d5 Update spring-webmvc-portlet template.mf
Add Import-Template entry for org.spring-framework.jndi

Issue: SPR-8038
2011-08-20 10:23:08 +00:00
Chris Beams f0460ce6fd Register JndiPropertySource by default in portlet environments
Issue: SPR-8038, SPR-8545, SPR-8490
2011-08-20 03:02:37 +00:00
Chris Beams 6db594c79d Register JndiPropertySource by default in servlet environments
Prior to this change, StandardServletEnvironment evaluated a
"jndiPropertySourceEnabled" flag to determine whether or not to add a
JndiPropertySource.  Following the changes introduced in SPR-8490, there
is now no reason not to enable a JNDI property source by default. This
change eliminates the support for "jndiPropertySourceEnabled" and adds
a JndiPropertySource automatically.

Issue: SPR-8545, SPR-8490
2011-08-20 03:02:31 +00:00
Chris Beams 76bf72c9f8 Introduce ConfigurableEnvironment#addActiveProfile
Provides a convenient mechanism for activating an additional profile
while preserving those that are already active, as opposed to
calling #setActiveProfiles with the contents of #getActiveProfiles plus
the new profile.

Issue: SPR-8548
2011-08-20 03:02:20 +00:00
Chris Beams c0eeb8bacd Introduce AbstractEnvironment#validateProfile
Consolidates validation for profiles and provides a mechanism for
AbstractEnvironment subclasses to customize validation logic if
desired.
2011-08-20 03:02:12 +00:00
Chris Beams e19a2e7370 Reorganize and add comments to build.properties 2011-08-20 03:02:05 +00:00
Chris Beams 68d5d753ba Increase supported aspectj version 1.5.4 => 1.6.8 2011-08-20 03:02:01 +00:00
Chris Beams 1b176db8e7 Remove obsolete taglibs dependency from webmvc pom 2011-08-20 03:01:57 +00:00
Chris Beams 5946e66586 Update ejb and javax.resource deps in tx pom 2011-08-20 03:01:53 +00:00
Chris Beams 36c1813828 Update ejb, inject-tck, jsr166 deps in context pom 2011-08-20 03:01:49 +00:00
Chris Beams 711b84ab06 Update .core pom with jopt dependency
Issue: SPR-8482
2011-08-20 03:01:45 +00:00
Juergen Hoeller ef04ccca17 allow for Hibernate 4.0 2011-08-18 23:14:42 +00:00
Juergen Hoeller f32b8f81e4 allow for Quartz 2.0 2011-08-18 23:14:28 +00:00
Juergen Hoeller 90997e65cf fixed Hibernate Validator import range 2011-08-18 23:13:56 +00:00
Juergen Hoeller 9e375a860a polishing 2011-08-18 23:13:30 +00:00
Sam Brannen 87dad65ff0 [SPR-8622] Upgraded to JUnit 4.8.2 2011-08-18 16:06:31 +00:00
Sam Brannen 7f715ee803 Fixed minor typo in Javadoc. 2011-08-18 14:18:29 +00:00
Sam Brannen e16e3a9f60 Fixed source attachments in Eclipse classpath; sorted classpath entries. 2011-08-18 14:17:44 +00:00
Juergen Hoeller 28e6d9a692 added test for month sequence (SPR-7807) 2011-08-17 21:01:34 +00:00
Juergen Hoeller f6be50eda2 RequiredAnnotationBeanPostProcessor's skip attribute accepts "true" as String value as well (SPR-8617) 2011-08-16 22:41:11 +00:00
Costin Leau 63a217a40a + add XML support for cache abstraction (cache-advice) - DRAFT 2011-08-16 17:35:01 +00:00
Chris Beams a8476d05be Prune misplaced src directory 2011-08-15 21:52:54 +00:00
Chris Beams 9fce69849a Move misplaced integration test to proper location 2011-08-15 21:44:18 +00:00
Juergen Hoeller 9b9975f269 ForkJoinPoolFactoryBean etc 2011-08-15 21:35:48 +00:00
Juergen Hoeller 36084c348f fixed timeout assertion 2011-08-15 21:28:13 +00:00
Juergen Hoeller 20f748865e polishing 2011-08-15 21:23:53 +00:00
Juergen Hoeller cce1e2010d added HttpComponentsHttpInvokerRequestExecutor 2011-08-15 21:23:41 +00:00
Rossen Stoyanchev 152add37d5 SPR-6464 Add getInputFlashMap and getOutputFlashMap methods to RequestContextUtils 2011-08-15 21:01:52 +00:00
Juergen Hoeller f0db3d0992 polishing 2011-08-15 20:57:59 +00:00
Juergen Hoeller c564049b23 consistent "connectTimeout" and "readTimeout" properties (SPR-8615) 2011-08-15 20:57:42 +00:00
Juergen Hoeller 4acb0fa284 introduced ForkJoinPoolFactoryBean for Java 7 (alternative: add new jsr166.jar to Java 6) 2011-08-15 16:41:55 +00:00
Rossen Stoyanchev aa46d18125 SPR-6464 FlashMap polish 2011-08-15 12:48:33 +00:00
Rossen Stoyanchev 224bce1b64 SPR-8612 Allow explicit status code in HTTP 1.0 compatibility mode 2011-08-15 12:25:28 +00:00
Rossen Stoyanchev 936c83b030 SPR-6464 Add RedirectModel 2011-08-14 22:32:42 +00:00
Sam Brannen 84ff2b49a6 Polishing Javadoc and suppressing warnings. 2011-08-14 17:11:31 +00:00
Sam Brannen a94e3785b8 Polishing Javadoc and suppressing warnings. 2011-08-14 17:02:45 +00:00
Rossen Stoyanchev d746dcaa63 SPR-5628 Use MediaType to parse the content type in HttpPutFormContentFilter 2011-08-14 12:19:06 +00:00
Sam Brannen 9a40021f18 [SPR-8386][SPR-8387] Refined logging regarding detection of default resource locations and default configuration classes. 2011-08-13 15:38:45 +00:00
Sam Brannen bfbd7def33 Documented recent changes to the TestContext framework in the changelog 2011-08-13 14:57:48 +00:00
Sam Brannen a298c2dde8 [SPR-8386][SPR-8387] Redesign of DelegatingSmartContextLoader and the SmartContextLoader SPI:
- Removed generatesDefaults() and supports() from the SmartContextLoader SPI and modified the DelegatingSmartContextLoader algorithm accordingly.
- DelegatingSmartContextLoader no longer operates on a list of candidate loaders but rather on explicit instances of GenericXmlContextLoader and AnnotationConfigContextLoader.
- Updated Javadoc regarding DelegatingSmartContextLoader as the new default loader.
- Updated and polished Javadoc regarding changes in 3.1.
- Now enforcing @ContextConfiguration's restriction on declaring locations or classes but not both.
2011-08-13 14:31:00 +00:00
Sam Brannen 2d6340af74 Deleting unnecessary TODOs and suppressing warnings. 2011-08-13 13:38:54 +00:00
Juergen Hoeller 03c267e93a added "connectTimeout" and "readTimeout" properties to SimpleClientHttpRequestFactory (SPR-8614) 2011-08-12 22:56:12 +00:00
Rossen Stoyanchev 45efe6184c SPR-6464 FlashMap polish 2011-08-12 18:32:30 +00:00
Sam Brannen 367dcf13ce Suppressing deprecation warnings in MockPageContext. 2011-08-12 15:29:56 +00:00
Juergen Hoeller 49e61d2680 overridden @PersistenceContext annotations on subclass methods are being processed correctly (SPR-8594) 2011-08-12 13:54:17 +00:00
Juergen Hoeller b9ebdd28fb polishing 2011-08-12 10:02:12 +00:00
Rossen Stoyanchev c97257b16f SPR-6464 Fix minor issue 2011-08-11 10:25:16 +00:00
Rossen Stoyanchev 6f1818a604 SPR-6464 Use the redirect URL and its request parameters (if any), instead of a synthetic key, to match a FlashMap instance to its intended recepient request. This should help to prevent conflicts in most cases transparently. Only if necessary a controller can add extra request parameters to distinguish the request even more uniquely. 2011-08-10 16:53:03 +00:00
Chris Beams 3ead3cf859 Improve wording of scoped-proxy example in ref doc
Issue: SPR-8591
2011-08-09 14:45:26 +00:00
David Syer 47f45ff743 SPR-8585: add generic composite filter 2011-08-09 10:17:35 +00:00
David Syer 296099f222 SPR-8592: add SpEL support in <jdbc:/> 2011-08-09 10:17:10 +00:00
David Syer 0c0ab97a84 Switch servlet dependency to a public one 2011-08-09 10:16:33 +00:00
Rossen Stoyanchev 1df0cd9f20 SPR-6464 Drop @FlashAttributes, add ResponseContext, ViewResponse, and RedirectResponse types for annotated controllers to use to prepare a redirect response with flash attributes; Add FlashMap and FlashMapManager and update DispatcherServlet to discover and invoke the FlashMapManager. 2011-08-08 14:00:07 +00:00
Chris Beams 11597c906d Fix typo in reference documentation
Issue: SPR-8579
2011-08-05 18:43:33 +00:00
Juergen Hoeller b6e82048fc removed GenericConversionService logging in order to avoid toString side effects (and to avoid isTraceEnabled overhead; SPR-8297) 2011-08-04 17:22:14 +00:00
Chris Beams 6404440cbf Fix typo in SmartLifecycle Javadoc
Issue: SPR-8570
2011-08-04 14:07:36 +00:00
Rossen Stoyanchev fc4ea16ba0 Replace RequestBodyNotValidException and RequestPartNotValidException with MethodArgumentNotValidException and add MethodParameter information to the exception message. 2011-08-03 15:10:10 +00:00
Rossen Stoyanchev 3c7e44ada4 SPR-8536 When two methods match a request for any content type (i.e. Accept=*/* or no Accept header), choose the one that doesn't define any 'Accept' media types by default. This addresses an important use case where methods serving browsers typically don't specify Accept media types. 2011-08-03 11:22:46 +00:00
Juergen Hoeller 8f23c66512 SpringBeanAutowiringSupport is able to process @Value annotations on any given target instance (SPR-8574) 2011-08-03 10:19:27 +00:00
Chris Beams 272f145132 Clarify Lifecycle#stop documentation
Issue: SPR-8570
2011-08-03 06:01:20 +00:00
Juergen Hoeller 8745024969 added getContentAsByteArray() and getContentAsString() methods (SPR-8575); actually implemented forward, include and handlePageException methods 2011-08-02 23:52:54 +00:00
Juergen Hoeller df1f3d40bd polishing 2011-08-02 19:16:50 +00:00
Juergen Hoeller 0a48936f4f ContentNegotiatingViewResolver properly handles invalid accept headers (SPR-7712) 2011-08-02 19:13:56 +00:00
Rossen Stoyanchev 3fb753bc0c SPR-8448 Use URI template vars rather than path vars in RedirectView 2011-08-02 08:27:26 +00:00
Rossen Stoyanchev 98ad8633bd SPR-8524 Add flag to AbstractCachingViewResolver to suppress subsequent resolution of unresolved view names. 2011-08-01 10:20:49 +00:00
Chris Beams 9f4a46e24c Auto-unwrap SessionFactoryBuilder-created proxies
SessionFactory proxies created by (Annotation)SessionFactoryBuilder now
implement InfrastructureProxy to ensure they are automatically unwrapped
for transaction resource management purposes.

Issue: SPR-8492
2011-07-30 18:05:34 +00:00
Chris Beams 35d2ab3bf9 Document Lifecycle#stop concurrency semantics
Issue: SPR-8570
2011-07-29 21:39:42 +00:00
Juergen Hoeller fa7f13016e multipart handling etc 2011-07-28 20:44:12 +00:00
Juergen Hoeller 5521f86f4a removed unused Servlet dependency 2011-07-28 20:27:04 +00:00
Juergen Hoeller 39616d4a25 polishing 2011-07-28 20:26:34 +00:00
Juergen Hoeller c864908779 Spring JSP tags do not use their own expression support on Servlet 3.0 containers by default; added support for web.xml context-param "springJspExpressionSupport" (explicit "true"/"false") 2011-07-28 20:25:18 +00:00
Juergen Hoeller bbcf358a9d jdbc:script's "separator" and "execution" attributes work nested with embedded-database as well; added "encoding" attribute to jdbc:script element; general revision of DatabasePopulator configuration and execution code 2011-07-28 14:19:53 +00:00
Juergen Hoeller 1baf2a3981 polishing 2011-07-28 11:15:11 +00:00
Chris Beams 226256e264 Respect <description> within <entry> per beans XSD
Prior to this change, a parsing exception would be thrown if a
<description> element was placed within a <map><entry/></map>
element. The beans XSD has always permitted this arrangement,
but BeanDefinitionParserDelegate did not respect it. The latter now
simply ignores any <description> element, rather than failing.

Issue: SPR-8563
2011-07-28 02:21:22 +00:00
Juergen Hoeller f432f3043f DefaultListableBeanFactory allows for init methods to register further bean definitions (again; SPR-7757) 2011-07-27 22:51:26 +00:00
Juergen Hoeller fad865fbad polishing 2011-07-27 22:38:59 +00:00
Juergen Hoeller 4385367f2d optimized getMethodResolver implementation to actually benefit from ConcurrentHashMap 2011-07-27 22:26:05 +00:00
Juergen Hoeller e63e6cdbde polishing 2011-07-27 21:57:59 +00:00
Juergen Hoeller 19c2672dc3 polishing 2011-07-27 21:52:18 +00:00
Rossen Stoyanchev f4adf227be SPR-6464 Add @FlashAttributes annotation and FlashStatus method argument 2011-07-27 21:46:36 +00:00
Juergen Hoeller 2c504012ad HtmlUtils properly escapes single quotes as well 2011-07-27 21:22:04 +00:00
Juergen Hoeller 38837eddfd HtmlUtils properly escapes single quotes as well 2011-07-27 20:35:41 +00:00
Rossen Stoyanchev 9347ac358c SPR-8540 Minor Freemarker import related documentation fix 2011-07-27 11:14:31 +00:00
Chris Beams b85440f2b6 Deprecate AbstractSingletonProxyFactoryBean 2011-07-26 22:29:14 +00:00
Chris Beams 3c2e48738a Remove CacheProxyFactoryBean 2011-07-26 22:29:09 +00:00
Chris Beams 2b371a7c9a Deprecate TransactionProxyFactoryBean 2011-07-26 22:29:04 +00:00
Chris Beams c85ebd9a5a Polish AnnotationUtils Javadoc 2011-07-26 19:55:11 +00:00
Rossen Stoyanchev f4b7cfea38 SPR-8483 Update reference documentation with multipart request-related changes: @RequestPart, Servlet 3.0 multipart reuqests, javax.servlet.http.Part method argument types. 2011-07-26 15:49:44 +00:00
Rossen Stoyanchev 75ad185558 SPR-8561 Permit null values for simple controller method arguments types without annotations. 2011-07-26 12:36:01 +00:00
Juergen Hoeller 3a6beb601e copy txt files as well 2011-07-26 09:25:22 +00:00
Rossen Stoyanchev 38a6660777 SPR-8543 Fix issue in AnnotationMethodHandlerAdapter with extracting URI template variable from URL with file extension 2011-07-26 08:26:09 +00:00
Juergen Hoeller 30f363bbc9 copy css and js resources as well 2011-07-26 01:08:23 +00:00
Juergen Hoeller ff8ebbb9c4 moved OpenSessionInViewTests back to orm module 2011-07-26 01:07:59 +00:00
Juergen Hoeller 8bae96bdd7 fixed HibernateMultiEntityManagerFactoryIntegrationTests failure 2011-07-26 00:59:41 +00:00
Juergen Hoeller d8f29cb746 polishing 2011-07-26 00:46:39 +00:00
Juergen Hoeller 83df082930 moved OpenSessionInViewTests back to orm module 2011-07-26 00:46:07 +00:00
Juergen Hoeller 771c59f88a polishing 2011-07-26 00:39:13 +00:00
Juergen Hoeller d7cd11a48c consistent update of HeaderValueHolder class 2011-07-26 00:39:01 +00:00
Juergen Hoeller 6ad8a4a79a fixed OpenEntityManagerInViewTests through the addition of a local copy of our Servlet API mocks; restoredOpenPersistenceManagerInViewTests 2011-07-26 00:38:05 +00:00
Rossen Stoyanchev 2cf2fc195e SPR-5628 Add HttpPutFormContentFilter in order to make form encoded data available via ServletRequest.getParameter*() 2011-07-25 18:58:34 +00:00
Juergen Hoeller c31b17fef2 JpaTransactionManager etc can find EntityManagerFactory by "persistenceUnitName" property now, falling back to retrieval of a unique EntityManagerFactory bean by type (analogous to @PersistenceUnit / @PersistenceContext) 2011-07-25 12:28:16 +00:00
Juergen Hoeller bbab294116 added Jetty dependency 2011-07-25 12:27:49 +00:00
Juergen Hoeller 637ce0f01c removed double javadoc 2011-07-25 12:27:30 +00:00
Juergen Hoeller aeacf9278f JpaTransactionManager etc can find EntityManagerFactory by "persistenceUnitName" property now, falling back to retrieval of a unique EntityManagerFactory bean by type (analogous to @PersistenceUnit / @PersistenceContext) 2011-07-25 12:26:27 +00:00
Juergen Hoeller 676ab5f0b1 restored OpenEntityManagerInViewTests 2011-07-25 12:15:33 +00:00
Juergen Hoeller 179dad8c24 defensive checking that a provided class actually implements WebApplicationInitializer (SPR-8557); avoid early initialization of Commons Logging (using ServletContext logging instead) 2011-07-25 11:33:08 +00:00
Juergen Hoeller 2218cdb16f polishing 2011-07-25 10:57:50 +00:00
Sam Brannen 672fed621b Cleaning up unused imports. 2011-07-23 15:23:41 +00:00
Rossen Stoyanchev fd7e0b405b SPR-8515 Check for traversal to parent directory via ../ in resource requests 2011-07-22 16:27:33 +00:00
Juergen Hoeller 5d2a84f39a fixed test 2011-07-22 11:20:18 +00:00
Juergen Hoeller 79ed87e3d5 updated cache aspect after CacheAspectSupport base class changes 2011-07-22 10:12:07 +00:00
Juergen Hoeller df3761e3f6 introduced AnnotationUtils.getAnnotation(AnnotatedElement, annotationType) 2011-07-22 09:34:42 +00:00
Juergen Hoeller abdae3d26b general revision of cache package; added ConcurrentMapCacheManager 2011-07-22 09:32:56 +00:00
Michael Isvy 02362f4347 SPR-7858
Updating references to @Resource usage
2011-07-22 01:18:29 +00:00
Chris Beams f3d00da080 Use Geronimo j2ee-connector API in JMS pom 2011-07-21 23:26:25 +00:00
Rossen Stoyanchev 3363d05879 SPR-8483 Add integration test for accessing multipart request parts with @RequestPart 2011-07-21 16:24:33 +00:00
Juergen Hoeller 1b26b4744f fixed ignored test 2011-07-21 10:34:32 +00:00
Juergen Hoeller 48de81deec refined JBoss 6.0 note 2011-07-21 09:51:23 +00:00
Juergen Hoeller 7a6d8d94cd multipart etc 2011-07-21 09:12:19 +00:00
Juergen Hoeller 7d8aa05c40 added "acceptProxyClasses" flag to RemoteInvocationSerializingExporter 2011-07-21 09:04:42 +00:00
Juergen Hoeller 2c199cf190 updated javadoc for server-specific LoadTimeWeavers 2011-07-21 08:36:40 +00:00
David Syer f800a026cb Fix typo in MVC docs 2011-07-21 08:25:27 +00:00
Juergen Hoeller 57cb1f2777 improved ExposeInvocationInterceptor error message with respect to advice ordering (SPR-8544) 2011-07-21 07:38:08 +00:00
Juergen Hoeller 8bf019b675 fixed @ExceptionHandler exception type matching (ExceptionDepthComparator; SPR-8231) 2011-07-21 07:15:26 +00:00
Sam Brannen d0cd678089 [SPR-8387] Added TODO. 2011-07-20 22:22:03 +00:00
Sam Brannen 072271d9e9 [SPR-8549] Documented the equals() method implementation in MergedContextConfiguration. 2011-07-20 22:18:55 +00:00
Sam Brannen 461119973b [SPR-8387] deleted resolved TODO. 2011-07-20 22:14:23 +00:00
Sam Brannen 8224af1938 [SPR-8549] ContextCache is now keyed by MergedContextConfiguration instead of String; MergedContextConfiguration now implements custom hashCode() and equals() methods and no longer generates a context cache key. 2011-07-20 22:06:05 +00:00
Juergen Hoeller 2d7af57149 fixed DispatcherServletTests breakage 2011-07-20 21:04:29 +00:00
Juergen Hoeller 571535352b revised Servlet 3.0 based StandardServletMultipartResolver for correct param/file distinction; added multipart content type and headers access to MultipartRequest (dropping the previous header access solution on MultipartFile); MultipartFilter uses a Servlet 3.0 based StandardServletMultipartResolver by default 2011-07-20 20:46:53 +00:00
Sam Brannen 21f3f59cb7 [SPR-8387] Log messages now refer to default detection instead of default generation. 2011-07-20 20:38:02 +00:00
Juergen Hoeller 0df4631788 alignment with backported 3.0.6 code (SPR-8538) 2011-07-20 19:59:41 +00:00
Chris Beams 718f025d64 Force lazy-init to false when parsing scheduled:task
A <scheduled:task> element declared within a
<beans default-lazy-init="true"> element represents a contradiction in
terms: such a task will never be executed.

For this reason, we now override any inherited lazy-init settings
when parsing <scheduled:task> elements, forcing lazy-init to false
for the underlying ScheduledTaskRegistrar bean.

Thanks to Mike Youngstrom for contributing an initial patch.

Issue: SPR-8498
2011-07-19 23:00:12 +00:00
Juergen Hoeller 576b8fec31 ConvertiblePair implements equals and hashCode (SPR-8459) 2011-07-19 15:51:19 +00:00
Juergen Hoeller 69c9abf2b8 updated Quartz support package for full Quartz 2.0 support (SPR-8275) 2011-07-19 15:25:10 +00:00
Rossen Stoyanchev cc7c64a371 Remove unnecessary javax.servlet dependency 2011-07-19 14:04:15 +00:00
Rossen Stoyanchev e787887f46 SPR-8532 Exclude Tiles transitive deps on 'com.springsource.javax.servlet' from 'com.springsource.org.apache.tiles.jsp' and 'com.springsource.org.apache.tiles.servlet' only. 2011-07-19 11:04:27 +00:00
Costin Leau 1d690ab99f SPR-8533
+ add LTW support for JBoss 7
(renamed existing classes to MC (JBoss 5&6) and introduced Modules (JBoss 7))
2011-07-19 07:24:47 +00:00
Juergen Hoeller d97a5bf889 minor javadoc revision 2011-07-18 21:50:15 +00:00
Juergen Hoeller 7e4982d6ae updated dependencies 2011-07-18 21:41:21 +00:00
Juergen Hoeller 94ac883eb1 polishing 2011-07-18 21:37:24 +00:00
Chris Beams 236b0305e8 Refactor execution of config class enhancement
This change returns the invocation order of
ConfigurationClassPostProcessor#enhanceConfigurationClasses to its
pre-3.1 M2 state. An earlier (and now unnecessary) refactoring in
service of @Feature method processing caused the change that this now
reverts.
2011-07-18 21:23:55 +00:00
Chris Beams 4f89459c3d Polish whitespace on JpaTransactionManager 2011-07-18 21:23:43 +00:00
Juergen Hoeller 65ad44dadc polishing 2011-07-18 20:50:35 +00:00
Rossen Stoyanchev 2568a3c2c6 SPR-8001 Recognize case when MultipartRequest is null and argument is of type MultipartFile and raise helpful exception. 2011-07-18 13:49:47 +00:00
Rossen Stoyanchev b8c723d080 SPR-8532 Upgrade org.springframework.web.servlet to Servlet 3.0 (as provided dependency) and add support for javax.servlet.Part parameter 2011-07-18 12:06:11 +00:00
Sam Brannen f874ed9790 [SPR-8387] Fleshed out the implementation of DelegatingSmartContextLoader and corresponding tests. 2011-07-17 17:16:12 +00:00
Sam Brannen 9d7bc31f0d polishing 2011-07-17 16:35:22 +00:00
Sam Brannen e7298a88d6 [SPR-8387] Fixed logic errors in DelegatingSmartContextLoader.processContextConfiguration() and ContextConfigurationAttributes.hasResources(). 2011-07-15 20:01:18 +00:00
Sam Brannen e34fa6abb1 [SPR-8387] Fixed logic error in DelegatingSmartContextLoader.processContextConfiguration(). 2011-07-15 19:19:29 +00:00
Sam Brannen b8624b470c [SPR-8387] Introduced hasResources() in ContextConfigurationAttributes; plus minor polishing. 2011-07-15 19:03:16 +00:00
Sam Brannen d2e6f82aa3 [SPR-8387] Fleshing out the implementation of processContextConfiguration() in DelegatingSmartContextLoader. 2011-07-15 17:15:45 +00:00
Sam Brannen 12eb9d7ed6 [SPR-8387] Fleshing out unit tests for DelegatingSmartContextLoader. 2011-07-15 16:12:34 +00:00
Juergen Hoeller cc725d7e5c extended Servlet API mocks for Servlet 3.0 forward compatibility as far as possible; made MockHttpServletResponse compatible with Servlet 3.0 getHeader(s) method returning Strings (SPR-8529); added getHeaderValue(s) method to MockHttpServletResponse for raw value access 2011-07-15 14:51:01 +00:00
Juergen Hoeller c0e429a9a5 polishing 2011-07-15 14:48:51 +00:00
Juergen Hoeller 5937779bb1 call setEnvironment before other awareness methods rather than after; fixed AccessControlContext applicability check 2011-07-15 14:40:38 +00:00
Juergen Hoeller 18ab057e90 extended Servlet API mocks for Servlet 3.0 forward compatibility as far as possible; made MockHttpServletResponse compatible with Servlet 3.0 getHeader(s) method returning Strings (SPR-8529); added getHeaderValue(s) method to MockHttpServletResponse for raw value access 2011-07-15 14:16:31 +00:00
Costin Leau 4e1cb2b823 move default value wrapper into support package (rather then interceptor) 2011-07-15 14:13:22 +00:00
Chris Beams fd42a65c6c Allow ConfigurationCPP to process multiple registries
Prior to this change, an instance of ConfigurationClassPostProcessor
would throw IllegalStateException if its
postProcessBeanDefinitionRegistry method were called more than once.
This check is important to ensure that @Configuration classes are
not proxied by CGLIB multiple times, and works for most normal use
cases.

However, if the same CCPP instance is used to process multiple
registries/factories/contexts, this check creates a false negative
because it does not distinguish between invocations of
postProcessBeanDefinitionRegistry across different registries.

A use case for this, though admittedly uncommon, would be creating
a CCPP instance and registering it via
ConfigurableApplicationContext#addBeanDefinitionPostProcessor against
several ApplicationContexts. In such a case, the same CCPP instance
will post-process multiple different registry instances, and throw the
above mentioned exception.

With this change, CCPP now performs lightweight tracking of the
registries/beanFactories that it has already processed by recording
the identity hashcodes of these objects.  This is only slightly more
complex than the previous boolean-based 'already processed' flags, and
prevents this issue (however rare it may be) from occurring.

Issue: SPR-8527
2011-07-13 23:30:57 +00:00
Chris Beams c5463a2e52 Move ImportSelector.Context to a top-level class
Issue: SPR-8411, SPR-8494
2011-07-13 23:28:53 +00:00
Juergen Hoeller 0c2a6395e7 revised package-level request and response classes 2011-07-13 23:14:02 +00:00
Costin Leau f5fdedea60 + fix compilation error 2011-07-13 13:51:20 +00:00
Costin Leau b82ab4950d + removed unneeded generic 2011-07-13 12:58:09 +00:00
Chris Beams a2a98efa13 Remove references to 'bold' text in reference docs
<emphasis role="bold"> blocks do not render properly, probably due to
conflicting CSS used for syntax highlighting. For the moment, any
mentions of bold text (e.g. "see bold text in the snippet below") have
been removed to avoid confusion as reported in SPR-8520.  SPR-8526 has
been created to address the underlying issue of getting bold to work
even with syntax highlighting.

Issue: SPR-8520, SPR-8526
2011-07-11 18:29:37 +00:00
Juergen Hoeller 81a27ce484 an EntityManagerFactoryBean is only deserializable through a SerializedEntityManagerFactoryBeanReference 2011-07-11 13:50:34 +00:00
Juergen Hoeller 7861eff298 prototype-based TargetSource is only deserializable through a SingletonTargetSource 2011-07-11 13:37:49 +00:00
Chris Beams 431e935011 Fix APC registration for @EnableTransactionManagement
Prior to this change, @EnableTransactionManagement (via the
ProxyTransactionManagementConfiguration class) did not properly
register its auto-proxy creator through the usual AopConfigUtils
methods.  It was trying to register the APC as a normal @Bean method,
but this causes issues (SPR-8494) with the logic in
AopConfigUtils#registerOrEscalateApcAsRequired, which expects the APC
bean definition to have a beanClassName property.  When the APC is
registered via a @Bean definition, it is actually a
factoryBean/factoryMethod situation with no directly resolvable
beanClass/beanClassName.

To solve this problem, ImportSelector#selectImports has been refactored
to accept an ImportSelector.Context instance. This object contains the
AnnotationMetadata of the importing class as well as the enclosing
BeanDefinitionRegistry to allow for the kind of conditional bean
registration necessary here. In this case, the bean definition that
must be registered conditionally is that of the auto-proxy creator.
It should only be registered if AdviceMode == PROXY, and thus the
ImportSelector is an appropriate place to make this happen.  It must
happen as a BeanDefinition (rather than a @Bean method) for
compatibility with AopConfigUtils, and working with the
BeanDefinitionRegistry API allows for that. This change does mean that
in certain cases like this one, #selectImports has container modifying
side effects. Documentation has been updated to reflect.

Issue: SPR-8411, SPR-8494
2011-07-11 01:17:19 +00:00
Chris Beams d8d9e3fc27 Revert "Fix APC registration for @EnableTransactionManagement"
@PostConstruct added to ProxyTransactionManagementConfiguration cases
ConcurrentModificationException (as detailed previously in SPR-8397.
Backing out for now until a better solution can be devised.

This reverts commit 235b729514.
2011-07-08 09:44:29 +00:00
Chris Beams f1ef3e4dcd Fix APC registration for @EnableTransactionManagement
Prior to this change, @EnableTransactionManagement (via the
ProxyTransactionManagementConfiguration class) did not properly
register its auto-proxy creator through the usual AopConfigUtils
methods.  It was trying to register the APC as a normal @Bean method,
but this causes issues (SPR-8494) with the logic in
AopConfigUtils#registerOrEscalateApcAsRequired, which expects the APC
bean definition to have a beanClassName property.  When the APC is
registered via a @Bean definition, it is actually a
factoryBean/factoryMethod situation with no directly resolvable
beanClass/beanClassName.

Rather than trying to rework how AopConfigUtils works, a @PostConstruct
method has been added to ProxyTransactionManagementConfiguration to call
the usual AopConfigUtils registration methods.

Issue: SPR-8411, SPR-8494
2011-07-07 22:37:28 +00:00
Chris Beams 5aa24af126 Implement SessionFactoryImplementor in SF proxies
SessionFactoryBuilderSupport implementations create DisposableBean
proxies for SessionFactory objects created using #buildSessionFactory.

Prior to this change, these proxies create problems when working agaist
SessionFactoryUtils.getDataSource(SessionFactory), because this method
expects the given SessionFactory to implement Hibernate's
SessionFactoryImplementor interface (which the stock SessionFactoryImpl
does).

With this change, the DisposableBean proxies created by SFBuilders
now also implement SessionFactoryImplementor to satisfy this and
probably other such cases.

Issue: SPR-8469
2011-07-07 19:42:07 +00:00
Sam Brannen c3f9e845e0 [SPR-7858] polishing formatting, grammar, etc. 2011-07-07 11:55:00 +00:00
Chris Beams 807d612978 Determine FactoryBean object type via generics
For the particular use case detailed in SPR-8514, with this change we
now attempt to determine the object type of a FactoryBean through its
generic type parameter if possible.

For (a contrived) example:

@Configuration
public MyConfig {
    @Bean
    public FactoryBean<String> fb() {
        return new StringFactoryBean("foo");
    }
}

The implementation will now look at the <String> generic parameter
instead of attempting to instantiate the FactoryBean in order to call
its #getObjectType() method.

This is important in order to avoid the autowiring lifecycle issues
detailed in SPR-8514.  For example, prior to this change, the following
code would fail:

@Configuration
public MyConfig {
    @Autowired Foo foo;

    @Bean
    public FactoryBean<String> fb() {
        Assert.notNull(foo);
        return new StringFactoryBean("foo");
    }
}

The reason for this failure is that in order to perform autowiring,
the container must first determine the object type of all configured
FactoryBeans.  Clearly a chicken-and-egg issue, now fixed by this
change.

And lest this be thought of as an obscure bug, keep in mind the use case
of our own JPA support: in order to configure and return a
LocalContainerEntityManagerFactoryBean from a @Bean method, one will
need access to a DataSource, etc -- resources that are likely to
be @Autowired across @Configuration classes for modularity purposes.

Note that while the examples above feature methods with return
types dealing directly with the FactoryBean interface, of course
the implementation deals with subclasses/subinterfaces of FactoryBean
equally as well.  See ConfigurationWithFactoryBeanAndAutowiringTests
for complete examples.

There is at least a slight risk here, in that the signature of a
FactoryBean-returing @Bean method may advertise a generic type for the
FactoryBean less specific than the actual object returned (or than
advertised by #getObjectType for that matter). This could mean that an
autowiring target may be missed, that we end up with a kind of
autowiring 'false negative' where FactoryBeans are concerned. This is
probably a less common scenario than the need to work with an autowired
field within a FactoryBean-returning @Bean method, and also has a clear
workaround of making the generic return type more specific.

Issue: SPR-8514
2011-07-06 09:15:37 +00:00
Chris Beams 605f0e7a22 Introduce GenericTypeResolver#resolveReturnTypeArgument
Issue: SPR-8514
2011-07-06 09:15:32 +00:00
Chris Beams 7c25c84ee2 Deprecate/move CGLIB methods AopUtils=>ClassUtils
isCglibProxy* methods in AopUtils are useful in lower-level modules,
i.e. those that cannot depend on .aop.  Therefore copied these methods
to ClassUtils; deprecated the existing ones in AopUtils and now
delegating to the new location; switched all usage of
AopUtils#isCglibProxy* within the framework to use
ClassUtils#isCglibProxy* instead.
2011-07-06 09:15:27 +00:00
Chris Beams 78b60947ad Rename JMX tests to avoid jmxremote_optional error
Even after applying @Ignore to these tests at the class level, they
still run (and fail) under ant when the jmxremote_optional jar is not
present. See the issues mentioned below for information on how these
tests will be re-enabled.

Issue: SPR-8089, SPR-8093, SPR-8458
2011-07-06 09:13:17 +00:00
Michael Isvy 4aeaaa083f SPR-7858
removed references to JSR 330  since there is now a dedicated JSR 330 section inside beans-standard-annotations.xml
2011-07-06 06:15:27 +00:00
Michael Isvy a590318b3c SPR-7858
removed reference to JSR 330's @Named since there is now a dedicated JSR 330 section inside beans-standard-annotations.xml
2011-07-06 06:14:48 +00:00
Michael Isvy 1bd75e5af8 SPR-7858
minor wording change
2011-07-06 06:13:21 +00:00
Michael Isvy cf348f206f SPR-7858
removed reference to @Provider
2011-07-06 06:12:46 +00:00
Juergen Hoeller c68021760d fixed TypeDescriptor rendering (SPR-8508) 2011-07-05 22:06:14 +00:00
Juergen Hoeller 352f053a71 JavaMailSenderImpl detects and respects "mail.transport.protocol" property in existing Session (SPR-8501) 2011-07-04 22:31:03 +00:00
Juergen Hoeller c07eb6bb9a added "disabled" property to EhCacheFactoryBean 2011-07-04 22:14:05 +00:00
Juergen Hoeller b0a6ebfb61 fixed package declaration 2011-07-04 22:04:31 +00:00
Juergen Hoeller e5b1c4366c added JBoss dependency (SPR-8505); updated WebSphere dependency 2011-07-04 21:37:09 +00:00
Juergen Hoeller 38290485de switched from readResolve to readObject 2011-07-04 21:21:33 +00:00
Juergen Hoeller 57998293c8 optimized debug logging in case of non-convertible collection (SPR-8499) 2011-07-04 09:43:08 +00:00
Juergen Hoeller df8e9b3393 DataBinder etc 2011-07-03 22:39:08 +00:00
Juergen Hoeller 6cd55b7986 ContextLoader and FrameworkServlet support "contextId" parameter for custom serialization id 2011-07-03 22:36:42 +00:00
Juergen Hoeller 36b582682d added "autoGrowNestedPaths" property to ConfigurableWebBindingInitializer 2011-07-03 21:24:06 +00:00
Juergen Hoeller 22939b6d05 properly wrap IndexOutOfBoundsException even for List 2011-07-03 20:24:12 +00:00
Juergen Hoeller b8f7d324af regular IndexOutOfBoundsException if index beyond auto-grow limit 2011-07-03 20:12:18 +00:00
Juergen Hoeller b9fe1b3250 restored original array behavior (no default growth of arrays) 2011-07-03 20:05:07 +00:00
Juergen Hoeller 4c75054f90 DataBinder uses a default limit of 256 for array/collection auto-growing (SPR-7842) 2011-07-03 19:26:49 +00:00
Juergen Hoeller 022ac3166c added joptsimple dependency 2011-07-03 16:24:55 +00:00
Chris Beams 4262aed9c8 Refactor BeanFactoryLocator to use getBean(Class)
Prior to this change, (Context)SingletonBeanFactoryLocator used
BeanFactoryUtils#beanOfType(ListableBeanFactory, Class) to locate the
bean of type BeanFactory.

The more modern approach is to use BeanFactory#getBean(Class), which
removes a dependency on ListableBeanFactory interface while at the same
time opening the implementation up to respecting autowiring exclusions,
primary metadata, etc.

Issue: SPR-8489
2011-07-02 22:22:33 +00:00
Chris Beams b5b2add5cf Rename {DEFAULT_=>}COMMAND_LINE_PROPERTY_SOURCE_NAME
For consistency with all other constants representing default
property source names, such as
StandardServletEnvironment#SERVLET_CONTEXT_PROPERTY_SOURCE_NAME and
StandardEnvironment#SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME

Issue: SPR-8482
2011-07-02 21:39:52 +00:00
Chris Beams d9ee958d88 Refactor JndiPropertySource
Prior to this change, JndiPropertySource worked directly against a JNDI
Context instance as its 'source' object.  This works well enough, but is
not nearly as fully-featured as Spring's existing JndiLocatorDelegate.

This change refactors JndiPropertySource from relying on an underlying
Context to relying on an underlying JndiLocatorDelegate.  By default,
the delegate's "resourceRef" property is set to true, meaning that the
implementation will always try to prepand a given name with
"java:comp/env/" before looking up the name, and upon failure will drop
back to the given name sans prefix.

See JndiPropertySource Javadoc for complete details.

Issue: SPR-8490
2011-07-02 21:26:44 +00:00
Chris Beams ce0a0ff3d4 Move JNDI_PROPERTY_SOURCE_ENABLED_FLAG constant
Move JNDI_PROPERTY_SOURCE_ENABLED_FLAG from JndiPropertySource to
StandardServletEnvironment, as this is the only context in which the
constant makes sense.
2011-07-02 21:26:38 +00:00
Chris Beams ea6d363c1e Return null from JndiPropertySource on lookup failure
Issue: SPR-8490
2011-07-02 21:26:30 +00:00
Sam Brannen e94d1e314f fixed typo and formatting in Javadoc 2011-07-01 17:33:13 +00:00
Chris Beams fecd6edf75 Fix unnecessary casts in Servlet*PropertySource 2011-06-30 22:34:08 +00:00
Chris Beams 1eb5811347 Introduce CommandLinePropertySource and impls
Users may now work with command line arguments as a source of
properties for use with the PropertySource and Environment APIs.
An implementation based on the jopt library and a "simple"
implementation requiring no external libraries are are provided
out-of-the box.

See Javadoc for CommandLinePropertySource, JOptCommandLinePropertySource
and SimpleCommandLinePropertySource for details.

Issue: SPR-8482
2011-06-30 22:33:56 +00:00
Rossen Stoyanchev e0d2e20fc4 8483 Add support for MultipartFile arg type in RequestPartMethodArgumentResolver 2011-06-30 21:04:23 +00:00
Costin Leau 26dbfba6c0 SPR-8477
+ add no-op cache implementations suitable for cache declarations w/o a backing store
2011-06-30 18:17:39 +00:00
Rossen Stoyanchev a58bd3073d SPR-8431 Extract RedirectView URL creation into separate method available for subclasses to use 2011-06-30 09:13:51 +00:00
Chris Beams 4756badc1d Prevent NPE in SpringServletContainerInitializer
Issue: SPR-8496
2011-06-29 17:33:07 +00:00
Rossen Stoyanchev 0dae1a6bd8 SPR-8447 Provide sufficient contextwherever possible when exceptions are raised in new @MVC classes. 2011-06-29 15:36:18 +00:00
Rossen Stoyanchev 3a87d8e7cb SPR-8483 Add support for @RequestPart annotated method parameters 2011-06-28 19:22:33 +00:00
Juergen Hoeller 3bbefb3e65 fixed getHeaderNames signature 2011-06-28 14:08:47 +00:00
Juergen Hoeller 0371f569ec added headers support to MultipartFile abstraction 2011-06-27 23:02:13 +00:00
Rossen Stoyanchev 78470782d4 SPR-8487 Ensure setters for argument resolvers and return value handlers replace the defaults completely. 2011-06-27 22:23:10 +00:00
Keith Donald 8504830da1 javadoc update 2011-06-27 21:37:34 +00:00
Keith Donald c9d73e2bde SPR-8465 2011-06-27 21:36:48 +00:00
Rossen Stoyanchev 1fd8f77989 SPR-7608 Add several sections to the reference docs on working with the @ModelAttribute annotation. Specifically the goal was to cover the abitlity for an @ModelAttribute argument to be instantiated from a URI template variable with the help of a Converter or a PropertyEditor. 2011-06-27 21:12:58 +00:00
Sam Brannen 8e497d9627 [SPR-8387] polishing 2011-06-26 17:13:09 +00:00
Sam Brannen 4aed64ea4b [SPR-8387] skeleton for DelegatingSmartContextLoaderTests. 2011-06-26 17:01:32 +00:00
Sam Brannen 4cbe2ae00a [SPR-8387] Introduced supports(MergedContextConfiguration) method in the SmartContextLoader SPI; updated existing loaders accordingly; and fleshed out implementation of and tests for the new DelegatingSmartContextLoader. 2011-06-26 16:46:18 +00:00
Sam Brannen 19fc2004f5 [SPR-8387] refined logging. 2011-06-26 15:47:30 +00:00
Sam Brannen 4ef895a018 [SPR-8387] Initial draft of the new DelegatingSmartContextLoader. 2011-06-26 15:39:58 +00:00
Sam Brannen b49d11f84a [SPR-8387] refined logging for failed generation of defaults; polishing JavaDoc. 2011-06-26 15:36:07 +00:00
Sam Brannen 3eb4f1d78b fixed typo 2011-06-25 15:53:43 +00:00
Chris Beams 24a8a05f24 Polish WebApplicationInitializer Javadoc 2011-06-25 03:49:54 +00:00
David Syer bd0f68d095 SPR-5749: Add defensive matching using target class loader
* Changes to ASpectJExpressionPointcut plus some tests in Spring AOP
* plus some tests in groovy support
2011-06-24 17:23:43 +00:00
Rossen Stoyanchev 1e07af8827 SPR-7608 Add fallback mechanism for instantiating a model attribute from a path variable 2011-06-24 17:18:53 +00:00
Rossen Stoyanchev 8e240d814b SPR-6909 Improve extension hooks in DefaultDataBinderFactory and subclasses. 2011-06-24 12:04:16 +00:00
Rossen Stoyanchev 2122cbcb1b SPR-8484 Add path variables to the model via AbstractView.render(..) rather than HandlerMethodArgumentResolver 2011-06-24 10:09:28 +00:00
Rossen Stoyanchev df5e4d6d56 SPR-7746 Add examples of using regex in URI template vars and working with 'Last-Modified' HTTP requests 2011-06-23 15:28:57 +00:00
Rossen Stoyanchev efaa941672 SPR-8476 Translate JsonMappingExceptions to HttpMessageNotReadableException (and thus response status code 400) consistent with JsonParseExceptions 2011-06-23 13:17:18 +00:00
Rossen Stoyanchev 69bba30ed8 SPR-8429 Add test cases for missing header, cookie, and pathvar values 2011-06-23 12:47:54 +00:00
Rossen Stoyanchev 465712c845 Add boolean flag in RequestMappingHandlerMapping to indicate if type- or method-level @RequestMapping annotation is being introspected 2011-06-22 22:29:26 +00:00
Juergen Hoeller 1c1bc9b3df DefaultListableBeanFactory etc 2011-06-22 20:57:21 +00:00
Juergen Hoeller c0dfbdeebc DefaultListableBeanFactory is only deserializable through a SerializedBeanFactoryReference 2011-06-22 20:56:23 +00:00
Juergen Hoeller 4664366aca getBean(name, type) attempts type conversion if necessary (SPR-8480) 2011-06-22 20:54:02 +00:00
Juergen Hoeller e0d558b084 getBean(name, type) attempts type conversion if necessary (SPR-8480) 2011-06-22 20:52:28 +00:00
Rossen Stoyanchev 2d29439130 SPR-7787 Allow qualifiers in regular expressions of URI template patterns. 2011-06-22 20:39:10 +00:00
Rossen Stoyanchev 54c82a53cd SPR-8452 Provide getter for statusCodes property of SimpleMappingExceptionResolver 2011-06-22 19:29:35 +00:00
Rossen Stoyanchev 5797fe7f62 SPR-7210 Add setModelKey and setModelKeys to MappingJacksonJsonView for consistency with MarshallingView. 2011-06-22 19:08:44 +00:00
Sam Brannen 6fa451733e [SPR-8386] polishing 2011-06-22 13:21:11 +00:00
Rossen Stoyanchev 564f0ec3c3 SPR-8444 Added MapAccessor and EnvironmentAccessor to EL context in the eval tag 2011-06-21 16:50:00 +00:00
Rossen Stoyanchev 5f76ad809f SPR-8429 Return 400 instead of 500 for required header/cookie/pathvar. This is also more in line with jax-rs. 2011-06-21 15:03:12 +00:00
Chris Beams 41e5d55d52 Fix bridge method detection for class hierarchies
Prior to this change, @Autowired injection against an instance of a
subclass having different visibility than its superclass would fail
if the @Autowired method is declared only in the superclass. This is due
to an apparent change in the rules around bridge method generation
between Java 5 and Java 6, and possibly even varying across compiler
vendors.

Now, BridgeMethodResolver is used consistently when detecting
@Autowired, @Inject and @Resource metadata to bypass these bridge
methods if they exist.

Issue: SPR-7900
2011-06-21 14:59:37 +00:00
Rossen Stoyanchev 8292491a53 SPR-6164 Add option to disable '.*' pattern matching in RequestMappingHandlerMapping and PatternsRequestCondition 2011-06-21 11:29:44 +00:00
Sam Brannen 2b5d2e5a0a [SPR-8386] ContextLoader resolution once again ignores the inheritLocations flag on @ContextConfiguration. 2011-06-20 21:49:44 +00:00
Rossen Stoyanchev a7ff8a2efa SPR-8464 Fix problem in test with date formatting 2011-06-20 20:51:26 +00:00
Sam Brannen 102674be20 [SPR-8386] Completed JavaDoc for ContextLoaderUtils regarding the SmartContextLoader SPI. 2011-06-20 19:44:30 +00:00
Rossen Stoyanchev 40fb1b21e1 SPR-8464 Fix bug with detecting annotations on handler method arguments and consolidate anotation detection tests. 2011-06-20 19:32:27 +00:00
Sam Brannen 82d09d432e [SPR-8386] Completed JavaDoc for AnnotationConfigContextLoader regarding the SmartContextLoader SPI. 2011-06-20 17:30:52 +00:00
Sam Brannen f7a849f9f4 [SPR-8386] AbstractContextLoader now adheres to the SmartContextLoader contract by verifying the existence of generated default resource locations. 2011-06-20 16:20:14 +00:00
Sam Brannen b00a6ccea5 [SPR-8386] polishing JavaDoc. 2011-06-20 14:33:08 +00:00
Sam Brannen 4b026756ae [SPR-7960] Documented inheritProfiles attribute of @ActiveProfiles. 2011-06-20 14:32:39 +00:00
Rossen Stoyanchev c41caa3c2f SPR-8462 2011-06-20 11:46:43 +00:00
Chris Beams 4fb811572e Compensate for Windows paths in XmlBeanFactoryTests
Issue: SPR-8439
2011-06-20 08:44:24 +00:00
Chris Beams 2d9ced04b1 Clarify BeanPostProcessor ordering rules in ref doc
Issue: SPR-7550
2011-06-20 06:48:36 +00:00
Sam Brannen 95ae6344c5 [SPR-8386] refining JavaDoc for MergedContextConfiguration and related classes. 2011-06-20 01:17:25 +00:00
Rossen Stoyanchev 6007801537 SPR-7812 Add CustomRequestCondition, PatternsRequestCondition, and other condition related tests 2011-06-19 22:52:52 +00:00
Sam Brannen 4d27cde6b7 [SPR-8386] fleshing out JavaDoc for SmartContextLoader and related classes. 2011-06-19 22:41:18 +00:00
Sam Brannen 81d8ce5597 [SPR-8395] AnnotationConfigContextLoader now supports default configuration classes with arbitrary names 2011-06-19 20:40:15 +00:00
Sam Brannen 427f31cb9c polishing 2011-06-19 17:40:08 +00:00
Sam Brannen a77cf0f652 [SPR-8395][SPR-8386] AnnotationConfigContextLoader now generates a list of default configuration classes by finding all non-private, non-final, static, inner classes of the test class that are annotated with @Configuration; updated JavaDoc in AbstractGenericContextLoader and AnnotationConfigContextLoader to reflect changes resulting from the SmartContextLoader integration. 2011-06-19 17:36:25 +00:00
Sam Brannen c070a4b0a4 polishing Javadoc 2011-06-19 14:07:59 +00:00
Sam Brannen 568d451d60 ignoring patch files 2011-06-19 13:44:35 +00:00
Sam Brannen d904bcbf03 [SPR-8386] AnnotationConfigContextLoader now only considers static inner classes annotated with @Configuration when generating default configuration classes. 2011-06-18 19:58:53 +00:00
Sam Brannen 46639c5a1d [SPR-8386] Polishing SmartContextLoader SPI; AnnotationConfigContextLoader now only considers static inner classes annotated with @Configuration as configuration classes. 2011-06-18 19:45:39 +00:00
Rossen Stoyanchev bede025eb9 SPR-7812 Remove remaining (empty) condition packages after moving classes 2011-06-17 23:29:07 +00:00
Rossen Stoyanchev aacdd36e04 SPR-7812 Move condition package under mvc 2011-06-17 23:26:21 +00:00
Rossen Stoyanchev 4826cae064 SPR-7812 Add CustomRequestCondition 2011-06-17 23:19:14 +00:00
Sam Brannen 7dd6932910 polishing developer documentation 2011-06-17 21:51:01 +00:00
Sam Brannen 9a56deb283 [SPR-8386] SmartContextLoader enhancements:
- introduced processContextConfigurationAttributes() method in SmartContextLoader SPI
- refactored AnnotationConfigContextLoader, AbstractContextLoader, AbstractGenericContextLoader, ContextLoaderUtils, and TestContext implementations to take advantage of the SmartContextLoader SPI, MergedContextConfiguration, and ContextConfigurationAttributes
- deleted ResourceTypeAwareContextLoader
- deleted ContextLoaderUtils.LocationsResolver and implementations
- moved context key generation from TestContext to MergedContextConfiguration
2011-06-17 21:49:06 +00:00
David Syer 8e35734856 SPR-6268: check AnnotationUtils works with Groovy concrete classes (plus remove compiler warnings) 2011-06-17 13:35:57 +00:00
Rossen Stoyanchev e5eceafa3f SPR-7278 extension hook to extend the @ExceptionHandler methods for a controller 2011-06-17 13:14:34 +00:00
David Syer 64fd0b081d SPR-6268: Add proxy-target-class to <lang:groovy/> 2011-06-17 12:14:01 +00:00
Chris Beams 5bfeb34b89 Fix non-compilable example in mvc ref doc
Issue: SPR-7750
2011-06-17 10:14:36 +00:00
Chris Beams 4fc386a4f5 Provide default ParameterNameDiscoverer for AACBF
Prior to this change, AbstractAutowireCapableBeanFactory did not support
a default ParameterNameDiscoverer.  This meant that attempting to use
<constructor-arg name=".."> syntax would fail (with a fairly obscure
exception) as that feature depends on a ParameterNameDiscoverer to
introspect the constructor arguments.

This lack of a default was originally intended to avoid a dependency on
ASM, but now that (a) .asm is a built-in module and (b) .beans has a
non-optional compile-time dependency on .asm, there is no reason not to
provide this default.

The net effect is that in a number of locations throughout the
framework, namely in GenericApplicationContext and
AbstractRefreshableApplicationContext, it is no longer necessary to
explicitly call AACBF#setParameterNameDiscoverer. This also means that
using a naked BeanFactory (likely for testing scenarios) is that much
easier.

Issue: SPR-8184
2011-06-17 09:47:19 +00:00
Chris Beams 8cb5c36512 Consolidate tests related to @Config inheritance
Issue: SPR-8183
2011-06-17 09:46:19 +00:00
Rossen Stoyanchev 96b0752ddb SPR-7812 RequestCondition refactoring with the possibility for custom request conditions in mind. 2011-06-17 09:39:49 +00:00
Arjen Poutsma 3a332e556c SPR-8457 - XMLEventStreamReader.getText() fails for COMMENT and ENTITY_REFERENCE events 2011-06-17 09:07:12 +00:00
Arjen Poutsma 7c504853cd SPR-8457 - XMLEventStreamReader.getText() fails for COMMENT and ENTITY_REFERENCE events 2011-06-17 09:06:02 +00:00
Chris Beams e79e08d7f7 Prefer / or /app/* over /main in servlet examples 2011-06-16 22:42:50 +00:00
Chris Beams 5dc2d56600 Fix regression with covariant property return types
Prior to this change, the Property class introduced in 3.1 M2 validated
read/write property method pairs based on whether their parameter/return
types were equal to one another.  This precluded the valid possibility
of read method that returns a subtype of the write method's parameter
type, and represented a regression against 3.1 M1 and earlier versions.

The implementation now uses isAssignableFrom rather than a straight
equals check against the types.

Issue: SPR-8432
2011-06-16 07:53:42 +00:00
Chris Beams cc814519c8 Revert "Re-enable ignored JMX tests"
As of SPR-8093, jmxremote_optional.jar is present on the build
server in jre/lib/ext, but it is not by default present on local
developer / user machines, meaning that the build ends up broken
by default.

Issue: SPR-8089, SPR-8093, SPR-8458
2011-06-16 06:34:23 +00:00
Chris Beams 0e9e63e082 Preserve shadowed fields in DirectFieldAccessor
Prior to this change, DirectFieldAccessor would ignore fields shadowed
in subclasses, favoring the last field processed, which happens to be
the most super declaration based on the way ReflectionUtils.doWithFields
works.

Because the locally shadowed field may be of a different type that the
superclass declaration, it is most correct to preserve and work with
the shadowed field.

Issue: SPR-8398
2011-06-16 06:33:44 +00:00
Chris Beams 2aaf14e96f Update pom and .classpath to reflect Castor upgrade
Issue: SPR-8341 SPR-8453
2011-06-16 04:36:53 +00:00
Rossen Stoyanchev 23f31d453f SPR-8448 Remove URI template vars from the model before appending to query string in RedirectView 2011-06-15 21:07:37 +00:00
Juergen Hoeller f288060ad8 restored support for String-to-ContextResource conversion (SPR-8383) 2011-06-15 15:40:12 +00:00
Chris Beams ca6e112742 Clarify TransactionCallback Javadoc
Issue: SPR-8390
2011-06-15 13:04:07 +00:00
Arjen Poutsma 5c6bd2a1b6 Ignoring test failing on build server, though it works locally. No idea why. 2011-06-15 12:26:43 +00:00
Arjen Poutsma deca69e374 SPR-8453 - SpringOXM CastorMarshaller tests 2011-06-15 11:45:23 +00:00
Arjen Poutsma 35aa378527 Minor changes 2011-06-15 11:13:04 +00:00
Arjen Poutsma 680f9692c8 SPR-8341 - Spring OXM CastorMarshaller unmarshalling methods 2011-06-15 11:09:58 +00:00
Arjen Poutsma 3b1190121f SPR-8453 - SpringOXM CastorMarshaller tests 2011-06-15 11:04:02 +00:00
Arjen Poutsma 0346fbc154 Upgrade to Castor 1.3.2 2011-06-15 10:52:16 +00:00
Arjen Poutsma 6d45e1bb12 Upgrade to Castor 1.3.2 2011-06-15 10:39:04 +00:00
Arjen Poutsma 352d61bef2 Javadoc 2011-06-15 10:37:58 +00:00
Rossen Stoyanchev ab033086f9 SPR-8454 Introduce Registration style objects, rename several Spring MVC *Configurer helpers to *Registry, add more tests 2011-06-15 08:06:42 +00:00
Juergen Hoeller 889f8886f6 support for Hibernate 4.0 as a JPA provider 2011-06-14 22:45:29 +00:00
Juergen Hoeller cb1ddb334b consistent dependency on Hibernate Validator 4.1.0.GA 2011-06-14 21:39:17 +00:00
Juergen Hoeller 5c1e86b47f refined WebLogic RMI descriptor to only mark 'getTargetInterfaceName' method as idempotent (SPR-8369) 2011-06-14 15:07:23 +00:00
Juergen Hoeller 695f1613b2 refined EntityManagerFactory proxy exception (SPR-4383) 2011-06-14 15:02:40 +00:00
Arjen Poutsma 9765fefeac SPR-8309 - Spring OXM schema improvement for CastorMarshaller 2011-06-14 13:46:32 +00:00
Arjen Poutsma ac7d48e5a8 Fixing tests 2011-06-14 13:16:45 +00:00
Arjen Poutsma c42671a78a SPR-7911 - Better handling of 204 No Content in RestTemplate 2011-06-14 10:37:49 +00:00
Arjen Poutsma 01d2082090 SPR-7931 - Checking for @XmlRootElement annotation should be made optional in Jaxb2Marshaller 2011-06-14 09:46:18 +00:00
Rossen Stoyanchev fa0b683161 Extract base class from RequestMappingHandlerMapping, one that allows for discovering request mappings from something other than annotations 2011-06-14 09:20:07 +00:00
Juergen Hoeller b2be59c2e4 prepared for 3.1 RC1 release 2011-06-14 00:14:09 +00:00
Juergen Hoeller 878ff89014 added further conversion tests (triggered by 3.0.6 backports) 2011-06-13 23:57:53 +00:00
Juergen Hoeller 6c3cc786d0 added further conversion tests (triggered by 3.0.6 backports) 2011-06-13 23:43:46 +00:00
Juergen Hoeller 90c3d04958 revised JMS CachedConnectionFactory to avoid unnecessary rollback calls on Session return (SPR-8437); fixed JMS CachedConnectionFactory to fully synchronize its Session list (SPR-8436) 2011-06-13 22:32:42 +00:00
Juergen Hoeller 168d9648b9 revised JMS CachedConnectionFactory to avoid unnecessary rollback calls on Session return (SPR-8437); fixed JMS CachedConnectionFactory to fully synchronize its Session list (SPR-8436) 2011-06-13 21:42:11 +00:00
Rossen Stoyanchev 883ac319bc SPR-8430 Rename WebMvcConfiguration to DelegatingWebMvcConfiguration, make it public and make delegation methods final 2011-06-13 12:20:25 +00:00
Chris Beams 25e2537c17 Fix html{Encoding=>Escape} typo in spring.tld.xml
Issue: SPR-8380
2011-06-13 08:41:06 +00:00
Chris Beams 9b45d50b9b Add missing isDebugEnabled guard in FrameworkServlet
Issue: SPR-8085
2011-06-13 08:31:15 +00:00
Chris Beams 234bca6462 Resolve ${...} placeholders in @PropertySource
Issue: SPR-8442
2011-06-13 04:23:08 +00:00
Chris Beams 799785abad Polish @EnableScheduling Javadoc 2011-06-12 06:56:37 +00:00
Chris Beams 2d68b726b5 Add syntax highlighting to Javadoc where necessary
Issue: SPR-8426
2011-06-12 06:56:17 +00:00
Sam Brannen c0131fe108 Polishing Eclipse classpath settings 2011-06-11 19:56:48 +00:00
Sam Brannen f5bed462bf Fixed Eclipse classpath regarding Commons IO and Codec 2011-06-11 19:26:38 +00:00
Juergen Hoeller 4a11765dfd avoid Logger.getGlobal() - it's Java 7 only... 2011-06-09 23:15:27 +00:00
Juergen Hoeller e1d81e04bc prepared Spring's DataSource and RowSet adapters for forward compatibility with JDBC 4.1 2011-06-09 23:09:55 +00:00
Rossen Stoyanchev fdeeeac5d0 SPR-8430 2011-06-09 15:12:02 +00:00
Juergen Hoeller 1b9574131c shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 13:26:46 +00:00
Juergen Hoeller e11dc8597d shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 13:10:09 +00:00
Juergen Hoeller b5520bc01a shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 13:01:09 +00:00
Juergen Hoeller 11f90023dc shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 12:50:55 +00:00
Rossen Stoyanchev 00d57907a3 Introduce base class for WebMvcConfiguration 2011-06-09 11:17:45 +00:00
Juergen Hoeller c60511bf04 shortened build properties "org.junit.version" to "junit.version" and "org.testng.version" to "testng.version"; reverted SLF4J version back to 1.5.3 (for Hibernate 3.3.1 compatibility) 2011-06-09 09:58:15 +00:00
Juergen Hoeller 9f3026a4e6 prefer use of varargs over arrays in bean property setters (for programmatic consumption) 2011-06-09 09:15:11 +00:00
Chris Beams c17df6db8a Update javadoc memory and doc publication settings 2011-06-09 02:54:52 +00:00
Chris Beams ae61aa3555 Revert introduction of AnnotationConfigCapableAC
Per review with Juergen in light of SPR-8413, which will revisit the
overall structure of ACAC and ACWAC.

Issue: SPR-8365, SPR-8413
2011-06-09 02:54:34 +00:00
Chris Beams 3b50fc8d86 Add @EnableLoadTimeWeaving to "New in 3.1" ref doc 2011-06-09 02:53:57 +00:00
Juergen Hoeller 3b704272e3 polishing 2011-06-08 22:52:43 +00:00
Juergen Hoeller fc11102e34 updated dependencies 2011-06-08 22:51:21 +00:00
Juergen Hoeller 3741ac7dd0 added section on JPA EntityManagerFactory bootstrapping without persistence.xml 2011-06-08 08:03:03 +00:00
Juergen Hoeller d5b9b26fea extended coverage of JSF 2.0 implicit attributes: "viewScope", "flash", "resource" 2011-06-08 00:12:50 +00:00
Juergen Hoeller cac42ef233 fixed pattern list test 2011-06-07 23:24:30 +00:00
Juergen Hoeller 02e79f5673 final preparations for 3.1 M2 2011-06-07 22:34:52 +00:00
Juergen Hoeller cd933c7f84 full support for arbitrary nesting of collections in fields (SPR-8394); proper type detection in nested collections within arrays 2011-06-07 22:34:35 +00:00
Juergen Hoeller d940811d8b full support for arbitrary nesting of collections in fields (SPR-8394); proper type detection in nested collections within arrays 2011-06-07 22:33:23 +00:00
Keith Donald 15e009f3a0 added utility method to reduce code duplication 2011-06-07 20:44:02 +00:00
Keith Donald 0601f0e520 assignability examples 2011-06-07 20:14:02 +00:00
Keith Donald 1e39b0bbbc implemented collection/map converter conditional matching checks; updated SpEL to reflect this behavior 2011-06-07 20:00:28 +00:00
Juergen Hoeller df460f4486 added "packagesToScan" feature to LocalContainerEntityManagerFactoryBean (avoiding persistence.xml) 2011-06-07 16:56:47 +00:00
Keith Donald e5d551587a fixed failing test; initial conditional converter impls for collections, arrays, and maps 2011-06-07 15:56:51 +00:00
Keith Donald a60cb43c6a added back element type checks in TypeDescriptor#isAssignable; clarified semantics in javadoc 2011-06-07 15:33:44 +00:00
Rossen Stoyanchev 7dcd71c543 SPR-7994 Add missing optional flag for Rome library in spring-web 2011-06-07 15:01:35 +00:00
Keith Donald 5e3a5202fb restored TypeDescriptor getElementType, getMapKeyType, and getMapValueType compatibility; StringToCollection and Array Converters are now conditional and check targetElementType if present; TypeDesciptor#isAssignable no longer bothers with element type and map key/value types in checking assignability for consistency elsewhere; improved javadoc 2011-06-07 02:51:44 +00:00
Keith Donald a1a7c32052 string to collection and array converters now are conditional and apply target element type match 2011-06-06 22:48:00 +00:00
Thomas Risberg 38041acc87 fixed duplicate section ids 2011-06-06 13:30:41 +00:00
Chris Beams 4a3c1292bc Preserve DefaultContextLoadTimeWeaver no-arg ctor
Issue: SPR-8317
2011-06-06 13:15:10 +00:00
Arjen Poutsma fa3e9bdfdd SPR-7439 - JSON (jackson) @RequestBody marshalling throws awkward exception 2011-06-06 10:33:04 +00:00
Sam Brannen 4f1e74877a Added log entries for recent TestContext framework changes. 2011-06-06 09:52:33 +00:00
Chris Beams 620018d16b Introduce @EnableLoadTimeWeaving
Issue: SPR-8317
2011-06-06 08:31:18 +00:00
Chris Beams bce9149947 Polish WebApplicationInitializer Javadoc 2011-06-06 08:30:36 +00:00
David Syer 6933a1af28 SPR-6717: Added support for database destroy scripts 2011-06-06 07:28:25 +00:00
Thomas Risberg 97e047ed66 added check for existing configuration of generated keys before calling update with a KeyHolder. (SPR-7564) 2011-06-06 00:52:01 +00:00
Rossen Stoyanchev b06b5502e0 Updates to whats new in Spring 3.1 section 2011-06-05 21:45:31 +00:00
David Syer 32ebf18429 SPR-5937: add param map to freemarker url macro 2011-06-05 21:02:02 +00:00
David Syer c2e62f098a Add ignorable log file to .gitignore 2011-06-05 21:01:37 +00:00
Sam Brannen 4f96edd901 [SPR-8240][SPR-8401] Documenting @Configuration class and @ActiveProfiles support in the TestContext framework. 2011-06-05 19:23:29 +00:00
Sam Brannen 7307f3d513 Introduced toClassArray(Collection<Class<?>>). 2011-06-05 19:13:13 +00:00
Sam Brannen 5976beca80 polishing 2011-06-05 19:12:58 +00:00
Thomas Risberg 189cc262ad updated codes for Sybase (SPR-8125) 2011-06-05 19:05:06 +00:00
Keith Donald 76283ed321 narrow and elementType/keyValueType tests 2011-06-05 18:51:37 +00:00
Keith Donald a40f6585b4 added convert(Object, TypeDescriptor) convenience method; collection and map tests 2011-06-05 18:36:58 +00:00
Keith Donald 8c6890605a null type descriptor handling 2011-06-05 17:52:26 +00:00
Keith Donald 5f8faa3ae7 improved null handling and javadoc 2011-06-05 17:41:08 +00:00
Thomas Risberg 0adcb2ad2e Added batchUpdate method taking a Collection, a batch size and a ParameterizedPreparedStatementSetter as arguments (SPR-6334) 2011-06-05 16:42:24 +00:00
Keith Donald cfb387383b broke out to top-level class for readability 2011-06-05 08:37:08 +00:00
Keith Donald c09227a712 removed dependency on java.beans 2011-06-05 08:29:14 +00:00
Keith Donald 94d690fb2c javadoc and polishing 2011-06-05 07:14:34 +00:00
Keith Donald 2127b16051 catch ConversionFailedException and fallback to default container conversion logic rather than propogate exception 2011-06-05 06:04:49 +00:00
Keith Donald 9ece4a88a9 perform narrowing in reflective property accessor read methods as well 2011-06-05 06:01:48 +00:00
Keith Donald c306afed63 polishing 2011-06-05 05:46:27 +00:00
Keith Donald c84cccf06d revised TypeDescriptor NULL and element/mapKey/mapValue type semantics 2011-06-05 04:43:18 +00:00
Chris Beams a2a4929c14 Add "What's new in Spring 3.1" to ref docs
Issue: SPR-8399
2011-06-04 12:46:28 +00:00
Chris Beams 3af4cdb0f1 Rename ref docs section new-in-3 => new-in-3.0 2011-06-04 12:45:58 +00:00
Chris Beams ea2da0b6be Remove unused 'new-in-2' ref doc xml 2011-06-04 12:45:31 +00:00
Chris Beams 1bf8634db1 Fix broken links in ref docs 2011-06-04 12:45:11 +00:00
Keith Donald 5db1687d29 added TypeDescriptor resolveCollectionElement and Map key/value types 2011-06-04 05:38:51 +00:00
Sam Brannen 9c3c1c64b3 [SPR-8386] polishing JavaDoc 2011-06-03 22:51:53 +00:00
Sam Brannen dbe96b5cf9 [SPR-7326] MergedContextConfiguration now ensures that it holds non-null arrays with proper semantics for TestContext's cache key generation. 2011-06-03 22:46:43 +00:00
Sam Brannen 3f58da1cd6 [SPR-7326] Added unit tests to verify proper semantics of TestContext's cache key generation. 2011-06-03 21:38:05 +00:00
Mark Fisher 72420c79cb SPR-8205 added support for a 'trigger' attribute (bean ref) on scheduled-task elements 2011-06-03 18:54:21 +00:00
Sam Brannen da41c9bb11 polishing 2011-06-03 16:19:41 +00:00
Sam Brannen f3f29412d4 Increased timeout in calls to assertStopWatchTimeLimit() to increase stability of the build. 2011-06-03 15:44:08 +00:00
Sam Brannen 0d4469d8e3 Suppressing warnings for deprecation of SimpleJdbcTemplate; polishing JavaDoc; using TestNG assertions in TestNG tests. 2011-06-03 14:10:16 +00:00
Sam Brannen 266e1096ce polishing 2011-06-03 13:40:45 +00:00
Sam Brannen 2b17ee0911 [SPR-6184] AnnotationConfigContextLoader now defines "$ContextConfiguration" as the resource suffix for generated default @Configuration class names. 2011-06-03 13:39:15 +00:00
Sam Brannen 39583d23fd [SPR-6184] AnnotationConfigContextLoader now defines "$ContextConfiguration" as the resource suffix for generated default @Configuration class names. 2011-06-03 13:11:06 +00:00
Rossen Stoyanchev 16fc083310 SPR-8391 Minor documentation fixes 2011-06-03 09:50:12 +00:00
Rossen Stoyanchev f1ad53d570 SPR-6709 Update changelog and add one test 2011-06-03 09:38:22 +00:00
Rossen Stoyanchev d2a99de9fc Add ModelFactory test for HttpSessionRequiredException 2011-06-03 09:38:16 +00:00
Oliver Gierke c7a350cde7 SPR-7477 - Added lazy-init attribute to jee namespace 2011-06-03 08:51:56 +00:00
Chris Beams 385d8e9482 Fix system environment tests on all platforms
Issue: SPR-8245
2011-06-03 05:16:35 +00:00
Keith Donald a1b7af5c9c broke out pkg private classes from TypeDescriptor to improve manageability and testability 2011-06-03 03:09:05 +00:00
Keith Donald 07f985ac91 more tests; several assertions for the programmer 2011-06-03 02:18:22 +00:00
Keith Donald 08180e97f8 javadoc polishing 2011-06-03 02:01:28 +00:00
Keith Donald a8dbac6d8d more tests 2011-06-03 01:55:41 +00:00
Keith Donald 0f6d890d97 javadoc 2011-06-03 00:51:17 +00:00
Keith Donald 6f146737f4 simplified TypeDescriptor usage and updated use of the API across BeanWrapper and SpEL; collapsed PropertyTypeDescriptor into TypeDescriptor for simplicity and ease of use; improved docs 2011-06-02 23:37:19 +00:00
Rossen Stoyanchev 9d2ee7061c SPR-6709 Handle RequestBodyNotValidException and update reference docs 2011-06-02 18:27:50 +00:00
Sam Brannen bfecedf5e2 Reverted Dave's changes to Eclipse project settings since we do not use Maven to build. 2011-06-02 17:59:52 +00:00
Sam Brannen 2913964b41 [SPR-7960][SPR-8386] Supporting declarative configuration of bean definition profiles in the TestContext framework:
- TextContext now works with MergedContextConfiguration instead of locations and loader
- TextContext now builds context caching key from MergedContextConfiguration
- Test context caching is now based on locations, classes, active profiles, and context loader
- TextContext now delegates to SmartContextLoader or ContextLoader as appropriate
- AbstractContextLoader now implements SmartContextLoader
- AbstractGenericContextLoader now sets active profiles in the GenericApplicationContext 
- Introduced integration tests for profile support in the TCF for both XML and annotation config
2011-06-02 17:51:37 +00:00
Sam Brannen ab704fdaba [SPR-8393] AnnotatedBeanDefinitionReader's constructor now inherits the Environment of supplied BeanDefinitionRegistry. 2011-06-02 17:35:02 +00:00
Sam Brannen 74b169e886 [SPR-8393] AnnotatedBeanDefinitionReader's constructor now inherits the Environment of supplied BeanDefinitionRegistry. 2011-06-02 17:33:12 +00:00
Rossen Stoyanchev 18f5d90235 SPR-6709 Support @Valid with @RequestBody method arguments 2011-06-02 17:21:44 +00:00
David Syer 14edc9fc03 SPR-7364: added separator property to database populator to deal with things like PL/SQL 2011-06-02 16:22:26 +00:00
Sam Brannen ac735d73ac [SPR-7960][SPR-8386] First draft of SmartContextLoader SPI, MergedContextConfiguration, and ContextConfigurationAttributes. 2011-06-02 14:45:22 +00:00
Chris Beams cee9da36eb Mention code alternatives in context and mvc XSDs 2011-06-02 14:45:00 +00:00
Chris Beams 9ca9287e35 Polish @Primary Javadoc 2011-06-02 14:44:26 +00:00
Chris Beams aa0c64d2f2 Polish @EnableScheduling Javadoc and related XSD 2011-06-02 14:43:59 +00:00
Chris Beams 3e5c6306be Polish @EnableAsync Javadoc and related XSD 2011-06-02 14:42:26 +00:00
Chris Beams 066daaf5be Polish @EnableTransactionManagement Javadoc and XSD 2011-06-02 14:29:06 +00:00
David Syer 645631ad2e SPR-6688: Add tests and explicit detection of \ in sql script extractor 2011-06-02 14:28:58 +00:00
Chris Beams e0ad6500be Rename TransactionManagementConfigurer callback
Renamed TransactionManagementConfigurer#createTransactionManager()
to #annotationDrivenTransactionManager() to better reflect the fact
that the implemented method is optionally eligible for @Bean annotation.

See Javadoc for details.
2011-06-02 14:28:16 +00:00
Rossen Stoyanchev ce78a519f6 SPR-8059 fix issue with != param condition 2011-06-02 12:29:26 +00:00
Costin Leau 7be1b5c3f5 revised cache abstraction
+ remove generic signature on key generator (as the type is not used anywhere)
+ add a small improvement to CacheAspect to nicely handle the cases where the aspect is pulled in but not configured
2011-06-02 10:01:14 +00:00
Chris Beams 8227cb6243 Introduce ConfigurableConversionService interface
Consolidates ConversionService and ConverterRegistry interfaces;
implemented by GenericConversionService.

ConfigurablePropertyResolver#getConversionService now returns this
new type (hence so too does
ConfigurableEnvironment#getConversionService). This allows for
convenient addition / removal of Converter instances from Environment's
existing ConversionService.  For example:

    ConfigurableApplicationContext ctx = new ...
    ConfigurableEnvironment env = ctx.getEnvironment();
    env.getConversionService().addConverter(new FooConverter());

Issue: SPR-8389
2011-06-02 06:50:42 +00:00
Chris Beams 6ae04eb7e6 Polish ConfigurablePropertyResolver Javadoc 2011-06-02 06:50:00 +00:00
Chris Beams 0304a4b74d Revert "Introduce Ordered#NOT_ORDERED"
This reverts commit da914bcfb4 and also
removes the use of Ordered#NOT_ORDERED from EnableTransactionManagement
and ProxyTransactionManagementConfiguration in favor of defaulting to
Ordered#LOWEST_PRIORITY, which is actually the default that results
when no 'order' attribute is specified in XML.
2011-06-02 06:49:15 +00:00
Sam Brannen cf2563bdf5 [SPR-8388] Cleared up confusing documentation regarding PropertyResolver and Environment. 2011-06-01 21:05:23 +00:00
Sam Brannen 919b996027 [SPR-8388] Improved documentation on default registered PropertyEditors; fixed typos and grammar in JavaDoc; suppressed warnings due to generics; etc. 2011-06-01 20:54:48 +00:00
Sam Brannen 4642cca893 [SPR-6184] Introduced AnnotationConfigContextLoader to provide TestContext support for @Configuration classes 2011-06-01 16:13:40 +00:00
Sam Brannen ff2a603f2f [SPR-7960] Trimming profiles for good measure. 2011-06-01 15:04:34 +00:00
Sam Brannen 24a97805ef [SPR-7960] Renamed @ActivateProfiles to @ActiveProfiles and fleshed out JavaDoc. 2011-06-01 14:40:53 +00:00
Sam Brannen 0c775416a6 [SPR-8089][SPR-8093] Re-enabled ignored JMX tests based on the feedback that jmxremote_optional.jar is now present "jre/lib/ext/ in both 1.5 and 1.6 JDKs on the build server". 2011-06-01 14:12:03 +00:00
Sam Brannen 3a2afde41d [SPR-7960] Renamed resolveActivatedProfiles() to resolveActiveProfiles(). 2011-06-01 12:59:47 +00:00
Sam Brannen f64344b296 [SPR-7960] resolveActivatedProfiles() now resolves a unique set of activated profiles 2011-06-01 12:56:50 +00:00
Sam Brannen 13b7f1a31b fixed typos 2011-06-01 12:55:26 +00:00
Sam Brannen 6981ee566c [SPR-7960] No longer tracking empty activated profiles. 2011-05-31 22:29:14 +00:00
Sam Brannen c7473f9124 [SPR-7960] No longer tracking empty activated profiles. 2011-05-31 22:12:53 +00:00
Chris Beams 67661693fe Ignore failing tests on Windows
Attempt to access and modify the system environment works on OS X /
Linux but not under Windows. Does not represent any real failure for
production code - the need to modify the system environment is a
testing concern only, and one we can probably live without, considering
the losing battle necessary to make such a hack cross-platform.

Issue: SPR-8245
2011-05-31 10:58:24 +00:00
Chris Beams c3675b44b4 Polish WebApplicationInitializer Javadoc 2011-05-31 06:42:36 +00:00
Chris Beams 14d50e3482 Fix failing system environment tests on Windows
Issue: SPR-8245
2011-05-31 06:42:06 +00:00
Chris Beams 4feacf31e7 Polish AdviceMode Javadoc 2011-05-31 06:41:35 +00:00
Chris Beams 847b54f3b1 Sort WebApplicationInitializers properly
Issue: SPR-7672
2011-05-31 01:12:34 +00:00
Sam Brannen 0067618b35 [SPR-7960] Initial support for @ActivateProfiles in tests. 2011-05-30 22:00:12 +00:00
Sam Brannen f5a39ae7ff [SPR-7960] Initial support for @ActivateProfiles in tests. 2011-05-30 21:59:12 +00:00
Juergen Hoeller e5702cd3de final preparations for 3.1 M2 release 2011-05-30 13:18:16 +00:00
Chris Beams 948aa4f589 Introduce DelegatingFilterProxy constructors
Issue: SPR-7672
2011-05-30 12:57:19 +00:00
Chris Beams 1e1a05e9f8 Polish DelegatingFilterProxy Javadoc 2011-05-30 12:56:32 +00:00
Chris Beams e36b5e9b7e Introduce ContextLoader(Listener) constructors
Constructors have been added to both ContextLoader and
ContextLoaderListener to support instance-based programmatic
registration of listeners within ServletContainerInitializer
implementations in Servlet 3.0+ environments, and more particularly
when using Spring 3.1's WebApplicationInitializer SPI.

Issue: SPR-7672
2011-05-30 12:56:01 +00:00
Chris Beams 2b4328023e Improve ApplicationContextInitializer sorting
ContextLoader and FrameworkServlet now use
AnnotationAwareOrderComparator to support @Order usage; previously
supported only implementation of the Ordered interface.
2011-05-30 12:55:33 +00:00
Chris Beams 2eea63eec5 Introduce Framework/DispatcherServlet constructors
Constructors have been added to both FrameworkServlet and
DispatcherServlet to support instance-based programmatic registration
of Servlets within ServletContainerInitializer implementations in
Servlet 3.0+ environments, and more particularly when using Spring 3.1's
WebApplicationInitializer SPI.

This change also renames the method added to FrameworkServlet in
SPR-8185 from #initializeWebApplicationContext to #applyInitializers.
The reason being that a method named #initWebApplicationContext was
already present and the names overlapped confusingly.

Issue: SPR-7672, SPR-8185
2011-05-30 12:54:48 +00:00
Chris Beams c4d98278e9 Fix DispatcherServlet warnings 2011-05-30 12:54:24 +00:00
Chris Beams fb9fb00c04 Update GenericWAC to implement ConfigurableWAC
GenericWebApplicationContext now implements
ConfigurableWebApplicationContext in order to be compatible with
Framework/DispatcherServlet and ContextLoader/Listener, especially with
regard to changes in SPR-7672 that allow for programmatic use of these
types within Servlet 3.0+ environments.  For the first time, it's now
reasonable to imagine injecting a GWAC into DispatcherServlet; the most
robust way to accommodate this possibility is for GWAC to implement
CWAC.

The implementation is in name only, allowing for interchangable use of
GWAC anywhere, for example, an XWAC could otherwise go.  Methods such
as setConfigLocation will throw UnsupportedOperationException if the
configLocation value actually contains text.  Other methods are
implemented as no-ops or to throw UOE as appropriate.

Issue: SPR-7672
2011-05-30 12:53:57 +00:00
Chris Beams c9e67b2ef2 Introduce Servlet 3.0 WebApplicationInitializer
WebApplicationInitializer provides a programmatic alternative to the
traditional WEB-INF/web.xml servlet container deployment descriptor
for Servlet API 3.0+ environments.

This is done by building atop the new ServletContainerInitializer
support in Servlet 3.0. See SpringServletContainerInitializer for
complete details. And see WebApplicationInitializer Javadoc for
typical usage examples.

Issue: SPR-7672
2011-05-30 12:53:32 +00:00
Juergen Hoeller 2b51759113 fixed reflective class names 2011-05-29 22:00:14 +00:00
Juergen Hoeller 788a65b8e7 compatibility with Quartz 2.0 variant of the JobFactory interface 2011-05-29 21:45:19 +00:00
Juergen Hoeller 8e169a2782 updated Quartz scheduling package to support Quartz 1.8 as well 2011-05-29 21:29:40 +00:00
Juergen Hoeller f1b9b8e924 preparations for 3.1 M2 release 2011-05-29 20:55:44 +00:00
Juergen Hoeller e1d9457b7d CustomNumberEditor generically declares numberClass as subclass of Number (matching NumberUtils) 2011-05-29 20:55:15 +00:00
Juergen Hoeller 0d69b80385 polishing 2011-05-29 20:53:34 +00:00
Juergen Hoeller 98c6a2784f RemoteExporter uses an opaque proxy for 'serviceInterface' exposure (no AOP interfaces exposed) 2011-05-29 20:52:37 +00:00
Juergen Hoeller a966cba97f fixed JPA 2.0 timeout hints to correctly specify milliseconds (SPR-8086) 2011-05-29 20:52:03 +00:00
Juergen Hoeller c303b22e30 updated IntelliJ dependency descriptors 2011-05-29 20:43:52 +00:00
Juergen Hoeller af8aff3e49 added StandardServletMultipartResolver for Servlet 3.0 2011-05-29 20:38:23 +00:00
Rossen Stoyanchev 127115671c SPR-8218 MVC chapter updates 2011-05-27 17:09:53 +00:00
Chris Beams 367a0c2933 Upgrade javax.servlet dependency to 3.0 for .web
In support of SPR-7672 which will support code-based configuration
alternatives to web.xml using new features in the Servlet 3.0 API.

This upgrade does *not* force Spring users to upgrade to Servlet 3.0
capable containers.  Compatibility with and support for
javax.servlet >= 2.4 remains.

Issue: SPR-7672
2011-05-26 13:34:21 +00:00
Chris Beams 2ceeff370a Allow multiple locations via @PropertySource#value
Issue: SPR-8314
2011-05-25 10:52:25 +00:00
Chris Beams 0756a6abfe Polish PropertySource and Environment Javadoc 2011-05-25 10:52:03 +00:00
Arjen Poutsma 37d955b35b Added tests for @RequestMaping produces and consumes 2011-05-25 09:21:44 +00:00
Keith Donald f43d0e1003 Revised converter search algorithm to favor super classes before interface hierarchy 2011-05-24 22:20:54 +00:00
Keith Donald ad93d20a6c SPR-6749 2011-05-24 19:40:14 +00:00
Keith Donald 47e3f0948d polish 2011-05-24 18:32:01 +00:00
Keith Donald 01cbfd4f6f added null binding check for primitives for all conversion results; polishing 2011-05-24 17:53:18 +00:00
Rossen Stoyanchev c5833b192e SPR-7353 Use canWrite to narrow down list of producible types 2011-05-24 17:22:22 +00:00
Keith Donald d02e37a307 added new ConverterRegistry operation; polishing 2011-05-24 03:47:50 +00:00
Keith Donald e25fbf2533 added symmetry to ToString converters: SPR-8306 2011-05-23 23:00:43 +00:00
Sam Brannen e11d7c328f Added Eclipse project dependency on org.springframework.asm 2011-05-23 17:18:14 +00:00
Chris Beams c4363673dc Delegate parent environment to child app contexts
Calls to AbstractApplicationContext#setParent delegate the parent
context environment to the child.

This ensures that any property sources added to the parent are available
to the child as well as ensuring that any profiles activated are
activated everywhere.

Child contexts may still choose to replace their environment (through an
ApplicationContextInitializer, for example).  In any case, however, in
the root/child web application context relationship established by
ContextLoader + DispatcherServlet, the child is guaranteed to have
already been given the parent environment by the time it is delegated
to any ACIs.

See AbstractApplicationContext#setParent for implementation

See FrameworkServlet#createWebApplicationContext for order in which
setParent then initializeWebApplicationContext are called.

Issue: SPR-8185
2011-05-23 10:04:00 +00:00
Chris Beams c696e195fa Introduce AnnotationConfigCapableApplicationContext
AnnotationConfigApplicationContext and
AnnotationConfigWebApplicationContext both expose #register and #scan
methods as of the completion of SPR-8320. This change introduces a new
interface that declares each of these methods and refactors ACAC and
ACWAC to implement it.

Beyond information value, this is useful for implementors of the
ApplicationContextInitializer interface, in that users may create an ACI
that works consistently across ACAC and ACWAC for standalone (e.g.
testing, batch) or web (e.g. production) use.

Issue: SPR-8365,SPR-8320
2011-05-23 10:03:23 +00:00
Chris Beams e128ee2464 Introduce AnnotationConfigWAC #scan and #register
Primarily for use in conjunction with ApplicationContextInitializer,
these new #scan and #register methods mirror those in
AnnotationConfigApplicationContext. #setConfigLocation
and #setConfigLocations methods remain for compatibility with
ContextLoader-style initialization, but have been locally overridden
and documented clearly.

AnnotationConfigWebApplicationContext#loadBeanDefinitions Javadoc has
also been updated to explain the processing logic for each of these
potential inputs.

Issue: SPR-8320
2011-05-23 10:02:50 +00:00
Chris Beams 56720fc42c Support "contextInitializerClasses" init-param
FrameworkServlet now has support equivalent to ContextLoader and its
"contextInitializerClasses" context-param introduced in 3.1 M1.

This allows users to specify ApplicationContextInitializers at the root
(ContextLoader) level and/or at the DispatcherServlet level.

Issue: SPR-8366
2011-05-23 10:02:18 +00:00
Chris Beams 3c6254df90 Polish FrameworkServlet Javadoc; fix warnings 2011-05-23 10:01:49 +00:00
Keith Donald 7430fcd904 SPR-8364 2011-05-23 07:38:27 +00:00
Keith Donald 5c67dbf424 revised findCommonElement handling within TypeDescriptor.forObject(Object); we now fully introspect the collection elements to resolve the common type. We also support nested introspection e.g. collections of collections. Object.class is used to indicate no common type, and TypeDescriptor.NULL is used to indicate a null element value 2011-05-23 05:21:02 +00:00
Keith Donald 79f9d1cfc6 moved applyIndexedObject internal, now invoked inside forObject static factory method 2011-05-23 01:08:18 +00:00
Keith Donald 4d6a5849f7 SPR-8364 2011-05-22 19:10:40 +00:00
Chris Beams 4a6101a697 Guard against null in #visitInnerClass
Issue: SPR-8358,SPR-8186
2011-05-21 01:39:50 +00:00
Chris Beams 95b1dbadb0 Register nested @Configuration classes automatically
The following is now possible:

@Configuration
public class AppConfig {
    @Inject DataSource dataSource;

    @Bean
    public MyBean myBean() {
        return new MyBean(dataSource);
    }

    @Configuration
    static class DatabaseConfig {
        @Bean
        DataSource dataSource() {
            return new EmbeddedDatabaseBuilder().build();
        }
    }
}

public static void main(String... args) {
    AnnotationConfigApplicationContext ctx =
        new AnnotationConfigApplicationContext(AppConfig.class);
    ctx.getBean(MyBean.class);     // works
    ctx.getBean(DataSource.class); // works
}

Notice that the @Import annotation was not used and that only AppConfig
was registered against the context. By virtue of the fact that
DatabaseConfig is a member class of AppConfig, it is automatically
registered when AppConfig is registered. This avoids an awkward and
redundant @Import annotation when the relationship is already implicitly
clear.

See @Configuration Javadoc for details.

Issue: SPR-8186
2011-05-21 01:20:33 +00:00
Chris Beams 5b2c7c4e58 Introduce ClassMetadata#getMemberClassNames
ClassMetadata implementations can now introspect their member (nested)
classes. This will allow for automatic detection of nested
@Configuration types in SPR-8186.

Issue: SPR-8358,SPR-8186
2011-05-21 01:20:03 +00:00
Chris Beams 76e3d2855a Polish @Configuration-related Javadoc 2011-05-21 01:19:25 +00:00
Rossen Stoyanchev 5fa7f24794 SPR-7353 Respect 'produces' condition in ContentNegotiatingViewResolver, improve selection of more specific media type in a pair 2011-05-20 17:02:20 +00:00
Chris Beams c481d2e9fb Rename {Default=>Standard}PortletEnvironment
Issue: SPR-8348
2011-05-20 03:57:35 +00:00
Chris Beams f893b62a9b Rename {DefaultWeb=>StandardServlet}Environment
Issue: SPR-8348
2011-05-20 03:55:56 +00:00
Chris Beams c06752ef72 Rename {Default=>Standard}Environment
Issue: SPR-8348
2011-05-20 03:53:37 +00:00
Chris Beams 615fcff7ae Polish Environment-related Javadoc 2011-05-20 03:50:41 +00:00
Chris Beams 7271ba8182 Introduce AbstractEnvironment#customizePropertySources
This new hook in the AbstractEnvironment lifecycle allows for more
explicit and predictable customization of property sources by
subclasses.  See Javadoc and existing implementations for detail.

Issue: SPR-8354
2011-05-20 03:50:14 +00:00
Chris Beams c4a13507f0 Introduce reserved default profile support
AbstractEnvironment and subclasses now register a reserved default
profile named literally 'default' such that with no action on the part
of the user, beans defined against the 'default' profile will be
registered - if no other profiles are explicitly activated.

For example, given the following three files a.xml, b.xml and c.xml:

    a.xml
    -----
    <beans> <!-- no 'profile' attribute -->
        <bean id="a" class="com.acme.A"/>
    </beans>

    b.xml
    -----
    <beans profile="default">
        <bean id="b" class="com.acme.B"/>
    </beans>

    c.xml
    -----
    <beans profile="custom">
        <bean id="c" class="com.acme.C"/>
    </beans>

bootstrapping all of the files in a Spring ApplicationContext as
follows will result in beans 'a' and 'b', but not 'c' being registered:

    ApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("a.xml");
    ctx.load("b.xml");
    ctx.load("c.xml");
    ctx.refresh();
    ctx.containsBean("a"); // true
    ctx.containsBean("b"); // true
    ctx.containsBean("c"); // false

whereas activating the 'custom' profile will result in beans 'a' and
'c', but not 'b' being registered:

    ApplicationContext ctx = new GenericXmlApplicationContext();
    ctx.load("a.xml");
    ctx.load("b.xml");
    ctx.load("c.xml");
    ctx.getEnvironment().setActiveProfiles("custom");
    ctx.refresh();
    ctx.containsBean("a"); // true
    ctx.containsBean("b"); // false
    ctx.containsBean("c"); // true

that is, once the 'custom' profile is activated, beans defined against
the the reserved default profile are no longer registered. Beans not
defined against any profile ('a') are always registered regardless of
which profiles are active, and of course beans registered
against specific active profiles ('c') are registered.

The reserved default profile is, in practice, just another 'default
profile', as might be added through calling env.setDefaultProfiles() or
via the 'spring.profiles.default' property.  The only difference is that
the reserved default is added automatically by AbstractEnvironment
implementations.  As such, any call to setDefaultProfiles() or value set
for the 'spring.profiles.default' will override the reserved default
profile.  If a user wishes to add their own default profile while
keeping the reserved default profile as well, it will need to be
explicitly redeclared, e.g.:

    env.addDefaultProfiles("my-default-profile", "default")

The reserved default profile(s) are determined by the value returned
from AbstractEnvironment#getReservedDefaultProfiles().  This protected
method may be overridden by subclasses in order to customize the
set of reserved default profiles.

Issue: SPR-8203
2011-05-20 03:49:15 +00:00
Chris Beams 415057c184 Remove AbstractEnvironment#getPropertyResolver
Method is obsolete now that Environment (thus AbstractEnvironment as
well) implements the ConfigurablePropertyResolver interface.
2011-05-20 03:48:19 +00:00
Chris Beams 818467b9e5 Consolidate Environment tests 2011-05-20 03:47:48 +00:00
Rossen Stoyanchev 0bf92782ea SPR-8352 Init and apply MappedInterceptors from AbstractHandlerMapping 2011-05-19 16:45:25 +00:00
Arjen Poutsma 60aa598c03 SPR-8296 - Extension for CastorMarshaller - additional unmarshaller properties 2011-05-19 14:01:35 +00:00
Arjen Poutsma dd8a9cce05 SPR-8295 - Extension for CastorMarshaller - additional marshaller properties 2011-05-19 13:34:36 +00:00
Rossen Stoyanchev 5ac2e4418f SPR-8350 ContentNegotiatingViewResolver initialization for nested ViewResolvers 2011-05-19 13:07:15 +00:00
Rossen Stoyanchev 100fed47f3 SPR-7353 Doc update for consumes/produces + changelog update 2011-05-19 13:05:53 +00:00
Costin Leau b39673aa79 revised cache abstraction
- removed generics from Cache/CacheManager (they add no value since it's an SPI not API)
+ update docs and tests
+ renamed ConcurrentCacheFactoryBean to ConcurrentMapCacheFactoryBean
2011-05-18 18:34:41 +00:00
Costin Leau dadd0f57ee revised cache abstraction
- removed AbstractDelegatingCache (a cache is not a map, no need to offer a template)
+ renamed ConcurrentCache to ConcurrentCacheMap
2011-05-18 17:43:13 +00:00
Arjen Poutsma 1eaca65720 @RequestMapping.consumes() and produces() now default to an empty array, instead of */* 2011-05-18 11:34:47 +00:00
Arjen Poutsma a618bcc8cd Exposing HttpServletRequest/Response in ServletServerHttpRequest/Response 2011-05-18 11:24:57 +00:00
Chris Beams 4520ea8690 Revert #processConfigBeanDefinitions to 3.0.x API
Revert signature of
ConfigurationClassPostProcessor#processConfigBeanDefinitions to its form
found in the 3.0.x line.  Refactorings made during 3.1 development
caused otherwise package-private types such as
ConfigurationClassBeanDefinitionReader to escape through this public
method, causing issues for STS as well as being a general design issue.

Upon review, the refactorings could easily be backed out in favor of a
simpler approach, and this has been done.

This also means that ConfigurationClassBeanDefinitionReader can return
to package-private visibility, and this change has been made as well.

Issue: SPR-8200
2011-05-18 08:53:46 +00:00
Chris Beams 6fcea8b99d Remove ConfigurationClassParser from public API
Issue: SPR-8200
2011-05-17 19:15:17 +00:00
Costin Leau 8dfcae535e revise cache API
+ update failing test
2011-05-17 18:16:07 +00:00
Costin Leau 0eb40e1e5e revise cache API
+ update failing test
2011-05-17 18:01:35 +00:00
Costin Leau dea1fc933f revise cache API
+ update failing AJ test
2011-05-17 17:35:01 +00:00
Costin Leau 861e481755 revise cache API
+ update failing test
2011-05-17 17:09:49 +00:00
Costin Leau 3699a037a5 revise cache API
+ add missing files (remember to check "show unversioned files")
2011-05-17 16:58:15 +00:00
Costin Leau 0b917e3f9c revise cache API
- eliminate unneeded methods
+ introduced value wrapper (name still to be decided) to avoid cache race conditions
+ improved name consistency
2011-05-17 16:50:00 +00:00
Rossen Stoyanchev af1dfd3577 Use request attribute to check producible media types when writing to the response body 2011-05-17 13:02:48 +00:00
Arjen Poutsma 1bbdb0d2ff minor fix. 2011-05-17 12:22:21 +00:00
Arjen Poutsma b0a4be7cd1 Only respect RequestMappingInfos that have a pattern match in handleNoMatch 2011-05-17 10:07:36 +00:00
Arjen Poutsma ad2e0d4587 SPR-7353 - @ResponseBody and returned HttpEntity now respect @RequestMapping.produces() 2011-05-17 09:45:57 +00:00
Rossen Stoyanchev 57c757afc5 SPR-2692 Update mvc chapter with URI template support in redirect: view names 2011-05-16 13:24:42 +00:00
Oliver Gierke d14d82612d SPR-8336 - Fixed broken test case.
Converted the test to JUnit 4.
2011-05-14 06:44:51 +00:00
Oliver Gierke f8bf8742e1 SPR-8336 - Added constructor to AnnotationTypeFilter to allow matching interfaces as well.
Reviewed by Chris.
2011-05-14 06:22:44 +00:00
Rossen Stoyanchev 1784df8d3e SPR-6996 Add mvc:interceptor bean references 2011-05-13 18:06:55 +00:00
Costin Leau 700a02b094 SPR-8334
+ commit missing configs
2011-05-13 16:09:33 +00:00
Costin Leau cc519e7c6d SPR-8334
+ commit missing configs
2011-05-13 15:59:22 +00:00
Rossen Stoyanchev 5c0e22e7a8 SPR-8289 Ensure BeanNameUrlHandlerMapping and default HandlerAdapters are never 'turned off' through the MVC namespaces 2011-05-13 15:46:37 +00:00
Costin Leau 4dd5ae16b2 SPR-8256
+ fix small doc typo
2011-05-13 15:40:12 +00:00
Costin Leau a986d758e7 SPR-
+ remove duplicate class
2011-05-13 15:37:10 +00:00
Arjen Poutsma bb2cc8457f SPR-7353 - Added equivalent of JAX-RS @Produces to Spring MVC 2011-05-13 09:43:45 +00:00
Chris Beams a557878a6f Document @Autowired and @Value limitations
@Autowired, @Value and other annotations cannot be applied within
Spring Bean(Factory)PostProcessor types, because they themselves
are processed using BeanPostProcessors.  Javadoc and reference docs
have been updated to reflect.

Issue: SPR-4935, SPR-8213
2011-05-13 03:41:29 +00:00
Chris Beams df5bab3454 Remove "@BeanAge" from reference documentation
Issue: SPR-8327
2011-05-13 03:40:26 +00:00
Andy Clement f8a2dd3f65 SPR-8211: property accessor ordering correction and removal of unnecessary duplicates 2011-05-12 16:40:44 +00:00
Rossen Stoyanchev b46598965e Add method to allow further validation of request mapping infos at startup + other minor javadoc updates. 2011-05-12 15:03:36 +00:00
Chris Beams 2afeb08e3c Fix @Autowired+@PostConstruct+@Configuration issue
A subtle issue existed with the way we relied on isCurrentlyInCreation
to determine whether a @Bean method is being called by the container
or by user code.  This worked in most cases, but in the particular
scenario laid out by SPR-8080, this approach was no longer sufficient.

This change introduces a ThreadLocal that contains the factory method
currently being invoked by the container, such that enhanced @Bean
methods can check against it to see if they are being called by the
container or not.  If so, that is the cue that the user-defined @Bean
method implementation should be invoked in order to actually create
the bean for the first time.  If not, then the cached instance of
the already-created bean should be looked up and returned.

See ConfigurationClassPostConstructAndAutowiringTests for
reproduction cases and more detail.

Issue: SPR-8080
2011-05-12 12:28:13 +00:00
Chris Beams 57206db152 Refine ignored @PropertySource log warning
If the enclosing environment does not implement ConfigurableEnvironment,
then @PropertySource annotations are ignored because there is no way to
add them to the Environment. Now checking first to see if there are any
@PropertySource annotations present before issuing the warning.

Issue: SPR-8314
2011-05-12 12:27:14 +00:00
Arjen Poutsma 8190b4f70a Javadoc 2011-05-12 09:00:39 +00:00
Andy Clement 580f35f6ee SFW-8228 2011-05-11 23:41:30 +00:00
Andy Clement 2f733bedc5 SFW-8224: distance can be used when computing method matches in ReflectiveMethodResolver 2011-05-11 21:44:24 +00:00
Sam Brannen 5d8de5c449 polishing 2011-05-11 20:09:08 +00:00
Rossen Stoyanchev 726e920857 Rename EnableMvcConfiguration->EnableWebMvc, refine method names in WebMvcConfigurer, fix issue with MappedInterceptors 2011-05-11 18:02:07 +00:00
Chris Beams c8bc54e0cc Introduce @PropertySource
Allows a convenient mechanism for contributing a PropertySource to the
enclosing Spring Environment. See @PropertySource Javadoc for
complete details and PropertySourceAnnotationTests for examples.

Issue: SPR-8314
2011-05-11 13:28:33 +00:00
Chris Beams 314a054a9b Introduce ResourcePropertySource
Allows convenient creation of a Properties-based PropertySource from a
Spring Resource object or resource location string such as
"classpath:com/myco/app.properties" or "file:/path/to/file.properties"

Issue: SPR-8328
2011-05-11 13:28:05 +00:00
Arjen Poutsma 9b0c66dc6c Make HTTP methods a RequestCondition 2011-05-11 10:38:30 +00:00
Chris Beams 80f0eabbd9 Add MockEnvironment to .integration-tests 2011-05-11 07:51:32 +00:00
Chris Beams 404f798048 Support 'required properties' precondition
Users may now call #setRequiredProperties(String...) against the
Environment (via its ConfigurablePropertyResolver interface) in order
to indicate which properties must be present.

Environment#validateRequiredProperties() is invoked by
AbstractApplicationContext during the refresh() lifecycle to perform
the actual check and a MissingRequiredPropertiesException is thrown
if the precondition is not satisfied.

Issue: SPR-8323
2011-05-11 07:36:04 +00:00
Chris Beams 3622c6f340 Pull up default getProperty variants to base class
Issue: SPR-8322
2011-05-11 07:35:16 +00:00
Chris Beams dc2d5c107f Add default-value getProperty convenience variants
Issue: SPR-8322
2011-05-11 06:09:06 +00:00
Chris Beams 693204aef8 Polish @Configuration Javadoc
Add note that nested @Configuration classes must be static.
2011-05-11 06:08:40 +00:00
Chris Beams 52bef0b7b0 Allow static modifier on @Bean methods
Declaring @Bean methods as 'static' is now permitted, whereas previously
it raised an exception at @Configuration class validation time.

A static @Bean method can be called by the container without requiring
the instantiation of its declaring @Configuration class. This is
particularly useful when dealing with BeanFactoryPostProcessor beans,
as they can interfere with the standard post-processing lifecycle
necessary to handle @Autowired, @Inject, @Value, @PostConstruct and
other annotations.

static @Bean methods cannot recieve CGLIB enhancement for scoping and
AOP concerns. This is acceptable in BFPP cases as they rarely if ever
need it, and should not in typical cases ever be called by another
@Bean method.  Once invoked by the container, the resulting bean will
be cached as usual, but multiple invocations of the static @Bean method
will result in creation of multiple instances of the bean.

static @Bean methods may not, for obvious reasons, refer to normal
instance @Bean methods, but again this is not likely a concern for BFPP
types. In the rare case that they do need a bean reference, parameter
injection into the static @Bean method is technically an option, but
should be avoided as it will potentially cause premature instantiation
of more beans that the user may have intended.

Note particularly that a WARN-level log message is now issued for any
non-static @Bean method with a return type assignable to BFPP.  This
serves as a strong recommendation to users that they always mark BFPP
@Bean methods as static.

See @Bean Javadoc for complete details.

Issue: SPR-8257, SPR-8269
2011-05-10 11:55:41 +00:00
Chris Beams 859185d086 Test interaction of @ComponentScan and @Import 2011-05-10 11:54:37 +00:00
Arjen Poutsma 71aae405d5 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-05-10 09:23:00 +00:00
Costin Leau 7f247a6b27 SPR-8256
+ doc updates
2011-05-09 17:40:23 +00:00
Arjen Poutsma b058d1e07a Made comparators public, as they are needed elsewhere. 2011-05-09 11:20:49 +00:00
Rossen Stoyanchev 8d0ab1d2e5 Refine HandlerMethod registration to allow detection by handler instance as well as by bean name 2011-05-08 19:31:29 +00:00
Chris Beams d0c31ad84c Allow recursive use of @ComponentScan
Prior to this change, @ComponentScan annotations were only processed at
the first level of depth.  Now, the set of bean definitions resulting
from each declaration of @ComponentScan is checked for configuration
classes that declare @ComponentScan, and recursion is performed as
necessary.

Cycles between @ComponentScan declarations are detected as well. See
CircularComponentScanException.

Issue: SPR-8307
2011-05-08 13:49:35 +00:00
Chris Beams c2b030a50d Polish @EnableScheduling Javadoc 2011-05-08 13:48:02 +00:00
Chris Beams 7e398f101c Rename AsyncConfigurer#get{+Async}Executor 2011-05-07 09:32:03 +00:00
Chris Beams 358cbf4301 Polish @EnableScheduling Javadoc 2011-05-07 09:31:13 +00:00
Chris Beams b7f4f2b546 Expose return-value-handlers in mvc namespace
Mirroring the MvcConfigurer#addCustomReturnValueHandlers callback which
allows for providing a list of HandlerMethodReturnValueHandler types
2011-05-06 19:13:44 +00:00
Chris Beams 1efb82d7cb Rename RequestMapping types for concision
Remove 'Method' from RequestMappingHandlerMethodMapping and
RequestMappingHandlerMethodAdapter
2011-05-06 19:13:05 +00:00
Chris Beams 2092a31f9d Rename DataBinderFactory subtypes for concision 2011-05-06 19:12:14 +00:00
Chris Beams 446dfdbff2 Introduce @EnableMvcConfiguration 2011-05-06 19:11:19 +00:00
Chris Beams 01e5120a26 Introduce @EnableTransactionManagement 2011-05-06 19:10:25 +00:00
Chris Beams d9a89529f0 Introduce @EnableScheduling 2011-05-06 19:09:24 +00:00
Chris Beams de50789cb6 Introduce @EnableAsync
Introduce @EnableAsync#order

AsyncAnnotationBeanPostProcessor's 'order' property is now mutable;
@EnableAsync's 'order()' attribute allows for setting it, but must
have a default value, thus uses the new Ordered#NOT_ORDERED
constant - a reserved negative number very unlikely to be otherwise
used that may be interpreted as 'not ordered', useful in annotation
defaulting scenarios where null is not an option.

Introduce first working cut of AsyncConfiguration

Remove AsyncCapability
2011-05-06 19:08:53 +00:00
Chris Beams cf0fc278bb Introduce @Role
As a mechanism for setting the 'role' hint on BeanDefinitions created
via component-scanning or @Bean methods.
2011-05-06 19:08:10 +00:00
Chris Beams 17892a8ab2 Introduce Ordered#NOT_ORDERED
To provide a reasonable default value for annotations that expose
int-returning #order attributes.
2011-05-06 19:07:41 +00:00
Chris Beams 7b999c676f Introduce ReflectionUtils#getUniqueDeclaredMethods
This change is in support of certain polymorphism cases in
@Configuration class inheritance hierarchies.  Consider the following
scenario:

@Configuration
public abstract class AbstractConfig {
    public abstract Object bean();
}

@Configuration
public class ConcreteConfig {
    @Override
    @Bean
    public BeanPostProcessor bean() { ... }
}

ConcreteConfig overrides AbstractConfig's #bean() method with a
covariant return type, in this case returning an object of type
BeanPostProcessor.  It is critically important that the container
is able to detect the return type of ConcreteConfig#bean() in order
to instantiate the BPP at the right point in the lifecycle.

Prior to this change, the container could not do this.
AbstractAutowireCapableBeanFactory#getTypeForFactoryMethod called
ReflectionUtils#getAllDeclaredMethods, which returned Method objects
for both the Object and BeanPostProcessor signatures of the #bean()
method.  This confused the implementation sufficiently as not to
choose a type for the factory method at all.  This means that the
BPP never gets detected as a BPP.

The new method being introduced here, #getUniqueDeclaredMethods, takes
covariant return types into account, and filters out duplicates,
favoring the most specific / narrow return type.

Additionally, it filters out any CGLIB 'rewritten' methods, which
is important in the case of @Configuration classes, which are
enhanced by CGLIB.  See the implementation for further details.
2011-05-06 19:07:25 +00:00
Chris Beams 2bc3527f76 Consolidate annotation processing constants
Consolidating internal bean name and aspect class name constats within
AnnotationConfigUtils to allow access from both the context.config
and context.annotation packages without creating a relationship between
the two of them (they are unrelated leaf nodes in the packaging
currently).

The .transaction module does not have a similar utils class and already
has a relationship from transaction.config -> transaction.annotation,
so placing the constants in .annotation.TransactionManagementCapability
to be referenced by .config.AnnotationDrivenBeanDefinitionParser
2011-05-06 19:06:37 +00:00
Chris Beams 9a271ce6c9 Introduce ImportSelector interface
Allows @Enable* a layer of indirection for deciding which @Configuration
class(es) to @Import.

The @Import annotation may now accept @Configuration class literals
and/or ImportSelector class literals.
2011-05-06 19:06:02 +00:00
Chris Beams cdb01cbd37 Introduce ImportAware interface
@Configuration classes may implement ImportAware in order to be injected
with the AnnotationMetadata of their @Import'ing class.

Includes the introduction of a new PriorityOrdered
ImportAwareBeanPostProcessor that handles injection of the
importing class metadata.
2011-05-06 19:05:42 +00:00
Chris Beams 89005a5b70 Process all meta and local @Import declarations
Includes the introduction of AnnotationUtils#findAllAnnotationAttributes
to support iterating through all annotations declared on a given type
and interrogating each for the presence of a meta-annotation. See tests
for details.
2011-05-06 19:05:15 +00:00
Chris Beams 856da7edb9 Provide dedicated @ComponentScan processing
@ComponentScan is now checked for explicitly and handled immediately
when parsing @Configuration classes.
2011-05-06 19:04:35 +00:00
Chris Beams cd4fb665d9 Delegate ComponentScanBDP environment to scanner
Enables @Profile filtering within ComponentScanBeanDefinitionParser
2011-05-06 19:04:11 +00:00
Chris Beams 111fb71fe1 Remove "Feature" support introduced in 3.1 M1
Feature-related support such as @Feature, @FeatureConfiguration,
and FeatureSpecification types will be replaced by framework-provided
@Configuration classes and convenience annotations such as
@ComponentScan (already exists), @EnableAsync, @EnableScheduling,
@EnableTransactionManagement and others.

Issue: SPR-8012,SPR-8034,SPR-8039,SPR-8188,SPR-8206,SPR-8223,
SPR-8225,SPR-8226,SPR-8227
2011-05-06 19:03:52 +00:00
Chris Beams 0a790c143f Rename ConfigurationClassMethod => BeanMethod 2011-05-06 19:01:56 +00:00
Chris Beams f683f781c5 Revert deprecation of BDRU#registerWithGeneratedName
The overloading necessary to preserve the new signature as well as
the old causes ambiguities leading to deprecation warnings in some
caller scenarios.
2011-05-06 19:01:35 +00:00
Chris Beams 84a63b6d4b Prevent empty calls to ACAC #register and #scan 2011-05-06 19:01:11 +00:00
Chris Beams d2faef44fa Add comment on DisposableBean use in @Configuration
Issue: SPR-7901
2011-05-06 19:00:55 +00:00
Chris Beams d3678caa37 Polish Javadoc 2011-05-06 19:00:38 +00:00
Chris Beams f30b7e3125 Fix generics and serialization warnings 2011-05-06 19:00:14 +00:00
Chris Beams 6d84f06d8c Remove unused MethodMetadata#getMethodReturnType
Introduced to support checking return types on @Bean methods but never
actually used.  May be reintroduced as necessary in the future.
2011-05-06 18:59:26 +00:00
Chris Beams 4b5208faad Introduce PropertyResolver#getPropertyAsClass 2011-05-06 18:59:05 +00:00
Chris Beams 275d43dfde Rename Property{SourcesProperty}ResolverTests 2011-05-06 18:58:41 +00:00
Chris Beams c51c340881 Update MockEnvironment / MockPropertySource types
Reflecting signature changes in getProperty() methods
2011-05-06 18:57:41 +00:00
Sam Brannen 3e2cc7dd19 polishing 2011-05-06 15:35:40 +00:00
Sam Brannen ddc9bbb555 [SPR-6184] Simplifying ContextLoader implmementation:
- Removed AbstractGenericContextLoader's createGenericApplicationContext() method.
- AnnotationConfigContextLoader now uses an AnnotatedBeanDefinitionReader instead of working with an AnnotationConfigApplicationContext.
- AnnotationConfigContextLoader now uses the supplied GenericApplicationContext to load configuration classes.
2011-05-06 12:05:56 +00:00
Rossen Stoyanchev c91ab1ad6e Resolve custom args after annotated args, set PATH_WITHIN_HANDLER_MAPPING attribute, and rename resolver for @ExceptionHandler methods 2011-05-03 15:39:13 +00:00
Rossen Stoyanchev 50117dce40 SPR-6909 Include URI template vars in data binding 2011-04-26 11:54:54 +00:00
Chris Beams 5c27a04210 Automatically close SessionFactory objects
SessionFactory objects created by
SessionFactoryBuilderSupport#buildSessionFactory are now DisposableBean
proxies that call SessionFactory#close and release any threadlocal
DataSource object.

This is the same behavior that has always occurred during LSFBean and
ASFBean destruction lifecycles (and still does). This destruction logic
has now been factored out into
SessionFactoryBuilderSupport#closeHibernateSessionFactory such that all
SFB types can reuse it easily.

Note that LSFBean and ASFBean are subclasses, respectively, of SFBuilder
and ASFBuilder and they each must disable the DisposableBean proxying in
order to avoid duplicate attempts at closing the SessionFactory. See
the implementations of wrapSessionFactoryIfNeccesary() for details.

Issue: SPR-8114
2011-04-26 10:15:30 +00:00
Chris Beams 88e2277bff Fix typo in aop reference documentation
Issue: SPR-8268
2011-04-26 07:44:40 +00:00
Rossen Stoyanchev ed9d9a402b SPR-7543 Add @PathVariables to the model 2011-04-21 15:18:45 +00:00
Arjen Poutsma a4716c2a94 Buffering RequestFactory that allows for multiple response body reads. 2011-04-21 15:09:44 +00:00
Rossen Stoyanchev 945cf43e2d Remove consumes from @RequestMapping 2011-04-21 14:54:55 +00:00
Rossen Stoyanchev acb9433e5c SPR-8247 review changes 2011-04-21 11:40:24 +00:00
Arjen Poutsma ab654a7a06 added toString to HttpEntity 2011-04-21 11:39:20 +00:00
Costin Leau 5206f5bc9a SPR-8238
+ add NPE test
2011-04-21 08:07:12 +00:00
Costin Leau e1d19d6c24 SPR-8238
+ add handling for null arguments to prevent NPE in default key generation
2011-04-21 08:00:42 +00:00
Rossen Stoyanchev d14c7f2d09 SPR-8247 2011-04-20 21:41:17 +00:00
Rossen Stoyanchev 57d327d1ff SPR-8255 2011-04-20 08:43:57 +00:00
Rossen Stoyanchev 9c65973b33 SPR-8214 review unit tests 2011-04-15 18:42:58 +00:00
Rossen Stoyanchev 83ce399c47 SPR-8248 2011-04-15 06:42:18 +00:00
Thomas Risberg f5f738f2b4 SPR-6922 deprecated SimpleJdbcTemplate/SimpleJdbcOperations/SimpleJdbcDaoSupport in favor of JdbcTemplate/NamedParameterJdbcTemplate and related interfaces support classes 2011-04-14 18:44:40 +00:00
Rossen Stoyanchev aa065e8310 SPR-8214 Javadoc and polish 2011-04-13 23:15:19 +00:00
Sam Brannen 62d40dc7aa Added Apache Commons HTTP JARs to the Eclipse classpath. 2011-04-12 21:58:38 +00:00
Micha Kiener 8adb9a88d0 SPR-6416, adding basic conversation object tests, improving the access time of the conversation object 2011-04-12 19:51:50 +00:00
Micha Kiener 3244e0a644 SPR-6416, adding repository timeout setting tests 2011-04-12 18:11:18 +00:00
Micha Kiener 8098ced387 SPR-6416, adding conversation manager test 2011-04-12 16:02:46 +00:00
Micha Kiener 58b779355b SPR-6416, reshaping removal of hierarchical conversations and adding repository test 2011-04-12 14:53:09 +00:00
Rossen Stoyanchev 6e03b4dd64 SWF-8214 javadoc updates 2011-04-12 13:23:14 +00:00
Micha Kiener f812cd748e SPR-6416, initial commit for the conversation management 2011-04-12 13:21:18 +00:00
Rossen Stoyanchev 0c736776da SPR-8094 2011-04-12 10:46:57 +00:00
Arjen Poutsma 3690002dce SPR-6180 - Upgrade Apache HttpClient to version 4.0 2011-04-12 07:55:38 +00:00
Rossen Stoyanchev 5486649394 Add UriTemplateServletHandlerMethodTests 2011-04-11 17:18:07 +00:00
Rossen Stoyanchev 767513de4e Add UriTemplateServletHandlerMethodTests 2011-04-11 17:17:51 +00:00
Rossen Stoyanchev 23e37b6842 SPR-8234 Switch to strongly typed custom argument resolvers property 2011-04-11 15:50:04 +00:00
Arjen Poutsma 54bbcf3a42 SPR-6180 - Upgrade Apache HttpClient to version 4.0 2011-04-11 13:12:45 +00:00
Rossen Stoyanchev 313546ad1f SPR-8234 Argument resolver and return value handler configuration improvements 2011-04-11 12:37:33 +00:00
Sam Brannen 68b4687311 [SPR-6184] completed JavaDoc for @ContextConfiguration. 2011-04-10 23:20:05 +00:00
Rossen Stoyanchev 36970115ed Fix issues encountered in Greenhouse 2011-04-10 06:01:11 +00:00
Sam Brannen a16f3ba9dc [SPR-6184] completed JavaDoc for AnnotationConfigContextLoader; polished JavaDoc for other concrete context loaders. 2011-04-09 23:24:34 +00:00
Sam Brannen 174bf58308 [SPR-6184] added tests to verify support for @Configuration classes with TestNG; simplified existing TestNG tests using Spring 3.0 and 3.1 features. 2011-04-09 22:44:53 +00:00
Sam Brannen 522a879496 polishing 2011-04-09 21:40:08 +00:00
Sam Brannen 0584c26b2c [SPR-6184] additional sanity check tests analogous to those developed for [SPR-3896]. 2011-04-09 21:39:42 +00:00
Sam Brannen 22072b2414 [SPR-6184] polishing 2011-04-09 14:46:49 +00:00
Sam Brannen ef79d7cc8a [SPR-6184] Fleshed out JavaDoc for ResourceTypeAwareContextLoader and ContextLoaderUtils. 2011-04-09 14:34:16 +00:00
Sam Brannen 03961a81d6 Updated Eclipse code formatter settings for use with STS 2.6. Specifically, format_javadoc_comments=false, which requires that JavaDoc be formatted manually. 2011-04-09 13:31:02 +00:00
Sam Brannen b33478b4ba Added ? wildcard to suppress warnings. 2011-04-09 13:29:59 +00:00
Sam Brannen c50d38ef8d [SPR-6184] Introduced ResourceType enum for context loaders; documented tests. 2011-04-08 22:57:45 +00:00
Arjen Poutsma 28b6eae11a SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-04-08 13:33:58 +00:00
Arjen Poutsma 44b4f59c5e SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-04-08 12:06:53 +00:00
Arjen Poutsma 0cdb237576 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-04-08 11:12:54 +00:00
Arjen Poutsma ff89c0e55a SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-04-08 10:50:45 +00:00
Arjen Poutsma bf6693dbc5 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC 2011-04-08 09:26:17 +00:00
Rossen Stoyanchev 381af43f91 Javadoc updates 2011-04-07 22:16:41 +00:00
Rossen Stoyanchev 6fe0ff9e7b ModelAndViewContainer related refinements 2011-04-07 18:09:28 +00:00
Sam Brannen 3d8b476f58 fixed typo 2011-04-07 08:00:23 +00:00
Rossen Stoyanchev 2710870d9e SPR-8217 adding one class missed on last checkin 2011-04-06 20:33:10 +00:00
Rossen Stoyanchev 4c1f73ed83 SPR-8217 update MVC namespace to use HandlerMethod infrastructure 2011-04-06 20:28:47 +00:00
Rossen Stoyanchev ffec444434 Configurable arg resolvers and return value handlers 2011-04-06 16:55:21 +00:00
Rossen Stoyanchev ca9a3b4584 Replace ModelAndViewContainer parameter with Object 2011-04-06 15:30:19 +00:00
Rossen Stoyanchev 3ee6734424 SPR-8216 Replicate ServletAnnotationControllerTests for HandlerMethod infrastructure 2011-04-06 15:30:01 +00:00
Rossen Stoyanchev 28cdae2e50 SPR-8215 Fix issue with tests compiling 2011-04-06 11:52:18 +00:00
Rossen Stoyanchev acc75aa4b8 SPR-8215 Move HandlerMethod code into trunk 2011-04-06 11:30:59 +00:00
Arjen Poutsma 0f7d43ba90 Allow for customization of the media type for forms. 2011-04-05 09:48:09 +00:00
Chris Beams 158a392d80 Ignore non-prop 'set' methods in ExtendedBeanInfo
Previously, ExtendedBeanInfo would attempt to process methods named
exactly 'set'.  JavaBeans properties must have at least one character
following the 'set' prefix in order to qualify, and this is now
respected by EBI.

Thanks to Rob Winch for the patch fixing this problem.

Issue: SPR-8175
2011-04-05 03:45:38 +00:00
Sam Brannen eba33b6156 polishing 2011-04-04 22:06:05 +00:00
Sam Brannen 070b7b6afe polishing 2011-04-04 22:05:49 +00:00
Chris Beams 74f1e0e9d0 Touch up ApplicationContextInitializer Javadoc 2011-04-04 14:57:51 +00:00
Chris Beams 4f7bdbd3de Make ConfigurationClassBeanDefinitionReader public
Issue: SPR-8200
2011-04-04 14:14:17 +00:00
Arjen Poutsma fa4f90e648 SPR-7805 - Add support for package binding in the JibxMashaller 2011-04-04 08:50:15 +00:00
Sam Brannen 4dcc79d6eb [SPR-6184] Implemented recursive search for configuration classes; introduced LocationsResolver strategy in ContextLoaderUtils with ResourcePathLocationsResolver and ClassNameLocationsResolver implementations. 2011-04-03 23:10:28 +00:00
Sam Brannen f3d125626d [SPR-6184] Refactored internals of ContextLoaderUtils; @Ignore'd broken test. 2011-04-03 17:45:20 +00:00
Sam Brannen 293baeeb88 [SPR-6184] Updated TODOs. 2011-04-03 17:23:57 +00:00
Sam Brannen 523c090551 [SPR-6184] Added DefaultConfigClassInheritedTests to verify proper recursive search for configuration classes configured via @ContextConfiguration. This test is currently failing (as expected) and therefore @Ignore'd. 2011-04-03 17:22:43 +00:00
Sam Brannen 70f883303f Removed unnecessary declaration of @TestExecutionListeners. 2011-04-03 17:20:02 +00:00
Sam Brannen 5373b43a53 [SPR-6184] Extracted ContextLoader resolution functionality from TestContext into a new ContextLoaderUtils utility class. 2011-04-03 17:00:45 +00:00
Sam Brannen ad9c858bd2 [SPR-6184] Introduced ResourceTypeAwareContextLoader interface and removed dependency on AnnotationConfigContextLoader in TestContext. 2011-04-03 16:37:24 +00:00
Sam Brannen a60487655c polishing JavaDoc 2011-04-03 15:26:13 +00:00
Sam Brannen 744facbf64 [SPR-6184] Simplified AnnotationConfigContextLoader in TestContext. 2011-04-03 15:16:13 +00:00
Sam Brannen dd4d6e63ae [SPR-6184] AnnotationConfigContextLoader now generates a default configuration class name; fleshed out documentation of AnnotationConfigContextLoader; introduced sub-package and suite for configuration class tests. 2011-04-03 14:37:29 +00:00
Andy Clement 9202224bca SPR-8174: varargs and primitive handling in SpEL 2011-04-01 21:59:25 +00:00
Andy Clement b9d07b9c47 SPR-7840: comparator dealing with nulls 2011-04-01 18:51:35 +00:00
Chris Beams fadfc76443 All SFBuilder setters return 'this' & use varargs
Touch up a few setter methods across the SessionFactoryBuilder
hierarchy that were still returning void.

Use varargs... syntax wherever possible.
2011-03-31 14:28:30 +00:00
Chris Beams 4f6df87615 Fix obscure STS error
Remove all bean configuration files from .springBeans to avoid cryptic
STS error.
2011-03-31 14:28:08 +00:00
Rossen Stoyanchev 3f11fbafaa Predictable index position for BindingResult keys and parameter annotation convenience methods in MethodParameter 2011-03-31 14:16:37 +00:00
Chris Beams 006cbb25c5 Increase visibility of MapPropertySource constructor
Was protected due to oversight, now public.

Issue: SPR-8107
2011-03-31 12:29:32 +00:00
Chris Beams f5768fe00b Introduce (Annotation)SessionFactoryBuilder types
Large refactoring of existing *SessionFactoryBean hierarchy designed to
support configuration of Hibernate SessionFactory objects within
@Configuration class @Bean methods without forcing use of a
FactoryBean type, which is generally discouraged due to awkwardness
of programming model and lifecycle issues.  Refactored and new types
include:

    * Removal of AbstractSessionFactoryBean, replacing it with
      SessionFactoryBeanSupport abstract base class

    * Introduction of SessionFactoryBuilder and
      AnnotationSessionFactoryBuilder types, both direct subclasses of
      SessionFactoryBuilderSupport. These types are intended for direct
      use within @Bean methods. They expose method-chainable set*
      methods allowing for concise and convenient use. See JavaDoc
      on both types for usage examples.

    * LocalSessionFactoryBean and AnnotationSessionFactoryBean types are
      now subclasses, respectively, of the *Builder types above.

LSFB and ASFB backward-compatibility has been maintained almost
entirely. The one exception is that there is no longer a protected
convertHibernateAccessException() method available in the hierarchy.
This method was not likely often used anyway and has been replaced
by the new (and public) setPersistenceExceptionTranslator() which
accepts instances of type HibernateExceptionTranslator as introduced in
SPR-8076.

LSFB and ASFB setter method signatures have changed. They no longer
return void in standard JavaBeans style but rather, and due to extending
the *Builder types above, return the 'this' reference. This posed a
problem because the Spring container has to date been unable to detect
and provide dependency injection against non-void returning setter
methods. This limitation was due to the way that the default JavaBeans
Introspector class and its getBeanInfo() method works, and prompted the
introduction and intergration of ExtendedBeanInfo, already completed in
SPR-8079. So have no concern if you notice this signature change - it
all works.

Certain deprecations have been made:

    * All LSFB/ASFB methods related to Hibernate's CacheProvider SPI,
      reflecting its deprecation in Hibernate 3.3 in favor of the new
      RegionFactory SPI. Note these methods have been preserved only
      on the FactoryBean types. The new *SessionFactoryBuilder
      supertypes do not expose CacheProvider services at all.

    * All protected LSFB/ASFB methods that accept a Hibernate
      Configuration parameter, such as newSessionFactory(Configuration),
      postProcessMappings(Configuration) and
      postProcessConfiguration(Configuation), in favor of no-arg methods
      with the same names. Due to the nature of the hierarchy
      refactoring mentioned above, the Configuration instance is always
      available when these methods are called, thus no need to pass it
      in as a parameter.

In the process, our approach to automatic detection of Hibernate dialect
has been improved (it was in fact broken before). Thanks to James
Roper for his suggestion in SPR-7936 as to how to fix this.

See HibernateSessionFactoryConfigurationTests as a starting point for
understanding the new builder-style approach to SessionFactory creation.
Note especially use of the SessionFactoryBuilder#doWithConfiguration
method which allows for direct programmatic configuration of the Native
Hibernate (Annotation)Configuration API.

As a final note, AnnotationConfiguration has been deprecated in
Hibernate 3.6, and great pains have been taken to ensure that users
of any supported Hibernate version (3.2 -> 3.6) will never need to
(a) cast from Configuration to AnnotationConfiguration or (b)
experience deprecation warnings due to being forced to use the
AnnotationConfiguration API. Explore the JavaDoc around the
doWithConfiguration() method and HibernateConfigurationCallback type
for complete details.

Issue: SPR-8066, SPR-7936, SPR-8076, SPR-8098
2011-03-31 12:29:12 +00:00
Chris Beams b0b1116f4b Propagate wrapped exception in SessionFactoryUtils
Improve stack traces in certain Hibernate failure cases by properly
chaining the cause exception.

Issue: SPR-7933
2011-03-31 12:07:30 +00:00
Chris Beams 6809b234b1 Introduce HibernateExceptionTranslator
Designed to allow persistence exception translation of
HibernateException types without being forced to use
LocalSessionFactoryBean types.

Committed now in support of the forthcoming introduction of
*SessionFactoryBuilder types.

Issue: SPR-8076
2011-03-31 12:06:58 +00:00
Chris Beams 2f5085aef1 Introduce ExtendedBeanInfo
Decorator for instances returned from
Introspector#getBeanInfo(Class<?>) that supports detection and inclusion
of non-void returning setter methods. Fully supports indexed properties
and otherwise faithfully mimics the default
BeanInfo#getPropertyDescriptors() behavior, e.g., PropertyDescriptor
ordering, etc.

This decorator has been integrated with CachedIntrospectionResults
meaning that, in simple terms, the Spring container now supports
injection of setter methods having any return type.

Issue: SPR-8079
2011-03-31 12:06:36 +00:00
Sam Brannen ec1b230ae5 [SPR-6184] AnnotationConfigContextLoader now calls AnnotationConfigApplicationContext's register(Class<?>...) method in one go, via var-args. 2011-03-31 00:00:31 +00:00
Sam Brannen 732493951e [SPR-6184] AnnotationConfigContextLoader now extends AbstractGenericContextLoader; added new extension points to AbstractGenericContextLoader. 2011-03-30 23:50:19 +00:00
Sam Brannen 10640233dc [SPR-6184] Initial draft of the new AnnotationConfigContextLoader. 2011-03-29 23:42:59 +00:00
Sam Brannen 334e4f2212 [SPR-6184] Initial draft of the new AnnotationConfigContextLoader. 2011-03-29 23:38:37 +00:00
Sam Brannen b50338fd32 [SPR-6184] Work in Progress 2011-03-28 21:45:14 +00:00
Sam Brannen fa48a7b3a3 Updating JUnit and TestNG versions for IDEs and Maven. 2011-03-28 19:59:09 +00:00
Sam Brannen 6ed1b1ebf8 org.springframework.spring-parent can now be imported into Eclipse 2011-03-28 19:58:03 +00:00
Sam Brannen 8568250e77 [SPR-8089] Added TODOs. 2011-03-28 19:01:33 +00:00
Sam Brannen 45c6eb1d62 [SPR-8089] re-ignoring JMX tests that require the presence of jmxremote_optional.jar. 2011-03-28 18:38:34 +00:00
Sam Brannen 309fa92199 [SPR-8089] re-ignoring JMX tests that require the presence of jmxremote_optional.jar. 2011-03-28 18:26:30 +00:00
Sam Brannen daa074734f [SPR-8092] cleaning up ignored and broken ORM tests; suppressing warnings; fixed Eclipse classpath for tests. 2011-03-28 18:16:45 +00:00
Sam Brannen adfcc929fb [SPR-8091] developer notes 2011-03-28 18:09:14 +00:00
Costin Leau 5c3ceb8ef0 SPR-7971
+ add target object to KeyGenerator
2011-03-28 18:09:04 +00:00
Sam Brannen 71d70a6e06 [SPR-8089] cleaning up ignored and broken JMX tests; suppressing warnings; using generics where feasible; documented the jmxremote_optional.jar requirement in AbstractMBeanServerTests. 2011-03-28 17:57:01 +00:00
Sam Brannen 726564c84d Polishing and fixed broken support for @IfProfileValue in AbstractJpaTests (even though it's deprecated). 2011-03-28 17:23:48 +00:00
Sam Brannen d6be4c5a2a [SPR-8090] Fixed broken tests in Log4jWebConfigurerTests. 2011-03-28 17:20:40 +00:00
Sam Brannen 657b145ea2 [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-28 14:43:01 +00:00
Costin Leau a3a0e5165c SPR-8007
+ add more logging
2011-03-28 12:10:26 +00:00
Costin Leau eb4b68ffda SPR-8007
SPR-7832
+ expose the invocation params through the cache root object
+ update javadocs
2011-03-28 11:36:05 +00:00
Agim Emruli a20e73b148 fixed compile error in test with javac compiler 2011-03-24 11:06:32 +00:00
Chris Beams 6f80578a38 Ignore fragile test dependent on debug symbols
Issue: SPR-8078
2011-03-23 06:20:19 +00:00
Chris Beams f4e1cde33b Eliminate warnings in .validation package
Issue: SPR-8062
2011-03-18 06:47:12 +00:00
Chris Beams 150838bfc1 Remove TODOs related to profile logging
Issue: SPR-8031, SPR-7508, SPR-8057
2011-03-15 12:57:43 +00:00
Chris Beams b50ac7489b Resolve or eliminate Environment-related TODOs
Issue: SPR-8031, SPR-7508
2011-03-15 12:57:12 +00:00
Chris Beams d471266d44 @Feature methods accept @Value-annotated params
Previously errors were being raised when trying to inject @Value
annotated paramaters such as:

@Feature
public FeatureSpec feature(@Value("#{environment['foo']}") String foo) {
    return new FeatureSpec(foo);
}

This is not so much because dependency resolution of @Value-annotated
types was failing, but rather because the 'early bean reference'
proxying mechanism was throwing an exception if any final type was
detected as a parameter. This is of course because final types are
non-subclassable by CGLIB.  On review, however, it's obvious that
certain final types must be allowed for injection.  @Value injection
is an obvious one, but the rarer case of a Spring bean of type String
or int is another.

The explicit guard against final types as parameters to @Feature methods
has been removed. Final types are still checked for, however, and if
found, no proxing is attempted.  The dependency is immediately resolved
against the current BeanFactory and injected into the @Feature method.

This means that @Value injection, @Qualifier injection, etc all work
as expected, but does mean that premature bean instantiation may occur
if a user unwittingly injects non-String, non-primitive final bean types
as @Feature method parameters.

Issue: SPR-7974
2011-03-15 07:09:49 +00:00
Chris Beams 529817301f Docs reflect bean id change from xsd:ID->xsd:string
Issue: SPR-8054
2011-03-14 11:10:12 +00:00
Chris Beams 43676bd660 Deregister @Configuration CGLIB callbacks
CGLIB-enhanced @Configuration subclasses now implement DisposableBean
such that Enhancer.registerStaticCallbacks(subclass, null) is invoked
on container shutdown. This ensures that garbage collection can work
properly and avoids memory consumption issues for applications that
create and destroy many application contexts within the same JVM.

Issue: SPR-7901
2011-03-14 09:20:19 +00:00
Chris Beams 76ce418556 Fix context:property-placeholder XSD type hierarchy
context:property-placeholder extends 'propertyPlaceholder' type
defintion once again.  This relationship was inadvertently removed in
3.1 M1, and the effect was that XML tooling would raise errors on
use of attributes like 'location'.

The updated schema has also been published to

    http://www.springframework.org/schema/context/spring-context-3.1.xsd

Issue: SPR-8037
2011-03-13 19:12:50 +00:00
Chris Beams 8681536283 Polish imports 2011-03-13 19:12:10 +00:00
Sam Brannen c86bc2671a [SPR-8030] Updated reference manual regarding deprecation of JUnit 3.8 base classes. 2011-03-13 00:25:58 +00:00
Chris Beams 4cdb04ab25 Process @ImportResource with current ResourceLoader
Issue: SPR-7973
2011-03-12 12:24:38 +00:00
Chris Beams 704b229cc7 Test injection of Environment on @Feature methods
Issue: SPR-7975
2011-03-12 12:24:20 +00:00
Chris Beams 5cfbed8881 Test injection of special types on @Feature methods
Prove that injection of special container types such as ResourceLoader,
BeanFactory, etc already works with the current implementation of
@Feature methods.

Issue: SPR-7975
2011-03-11 12:40:51 +00:00
Chris Beams f17f970144 Allow other delimiters in profile XML attribute
Previously, only commas could delimit <beans profile="p1,p2"/>.  Now, as
with <bean alias="..."/>, the profile attribute allows for delimiting
by comma, space and/or semicolon.

BeanDefinitionParserDelegate.MULTI_VALUE_ATTRIBUTE_DELIMITERS has been
added as a constant to reflect the fact this set of delimiters is used
in multiple locations throughout the framework.
BDPD.BEAN_NAME_DELIMITERS now refers to the above and has been has been
preserved but deprecated for backward compat (though use outside the
framework is unlikely).

Changes originally based on user comment at
http://blog.springsource.com/2011/02/11/spring-framework-3-1-m1-released/comment-page-1/#comment-184455

Issue: SPR-8033
2011-03-11 04:08:10 +00:00
Chris Beams b5baa69f5d Fix 'Dymaic'->'Dynamic' typo in graphic (SPR-7715)
Also regenerate all OmniGraffle-based PNG graphics for color consistency
2011-03-10 14:09:11 +00:00
Chris Beams 5de35e8f92 Polishing 2011-03-10 14:08:58 +00:00
Sam Brannen 6993a8768a [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-09 11:47:53 +00:00
Sam Brannen c736e6b873 [SPR-8030] AbstractJUnit38SpringContextTests and AbstractTransactionalJUnit38SpringContextTests are now officially deprecated. 2011-03-09 11:45:43 +00:00
Costin Leau 8f6fcbda3c + fix missing tag 2011-03-07 12:59:04 +00:00
Costin Leau 08bccb28ae + revert back deleted resource 2011-03-06 18:19:19 +00:00
Costin Leau 4a589a78e1 + more configuration file 2011-03-06 17:14:10 +00:00
Costin Leau c3a635196b SPR-8015
+ update default key generator strategy to improve compatibility for implicit declaration on one arg method
+ updated docs
2011-03-06 17:13:24 +00:00
Costin Leau a4aca64007 + fix bug that prevented internal expression cache from being used 2011-03-06 17:06:28 +00:00
Costin Leau 5daad3e081 SPR-8006
+ fix contains/get race-condition of caches (by adding an extra cache call)
2011-03-06 12:27:46 +00:00
Costin Leau a20dd8095e + update copyright headers 2011-03-06 11:53:12 +00:00
Costin Leau fad2f2ca30 SPR-8006
SPR-8023
- remove unneeded method
2011-03-06 11:43:25 +00:00
Costin Leau 523a83ca28 SPR-8008
SPR-8023
+ fix bug in Ehcache cache that considered expired entries for key checks
2011-03-06 11:36:36 +00:00
Sam Brannen d7a8cf4b7e Fixed typos 2011-03-04 23:12:09 +00:00
Rossen Stoyanchev 56d50ba8a5 SPR-7406 Improve documentation on handler method parameter type conversion. 2011-03-04 19:59:16 +00:00
Rossen Stoyanchev 386d8fdaa6 SPR-6932 Add option to extract value from single-key models in MappingJacksonJsonView 2011-03-04 14:19:14 +00:00
Rossen Stoyanchev 761a836236 SPR-2692 Add URI template support to RedirectView 2011-03-03 15:54:29 +00:00
Rossen Stoyanchev 4027cbd952 Improve docs for MvcDefaultServletHandler container feature. 2011-03-01 14:32:34 +00:00
Oliver Gierke 98d798dbe4 SPR-8005 - Made GenericTypeResolver.getTypeVariableMap(…) and resolvetype(…) public. 2011-02-28 17:09:09 +00:00
Arjen Poutsma bc342df08f @MVC 2.0: AbstractAnnotationMAR -> AbstractNamedValueMAR 2011-02-25 11:05:14 +00:00
Costin Leau 9dbab116fd + add missing # to SpEL variables 2011-02-24 15:06:03 +00:00
Rossen Stoyanchev 9779ca191c SPR-7976 Add MvcInterceptors features. 2011-02-22 16:13:04 +00:00
Arjen Poutsma 5a5fff5221 Added equals and hashcode 2011-02-22 13:33:24 +00:00
Juergen Hoeller 4889794bed final preparations for 3.1 M1 release 2011-02-10 23:20:28 +00:00
Juergen Hoeller 716aa6974c fixed scheduling tests 2011-02-10 23:04:40 +00:00
Juergen Hoeller 0d70e08ac3 exceptions thrown by @Scheduled methods will be propagated to a registered ErrorHandler (SPR-7723) 2011-02-10 22:50:16 +00:00
Juergen Hoeller 03190950d1 polishing 2011-02-10 22:19:10 +00:00
Chris Beams 6bfead259e Further compensation for STS version mismatch
Current STS version of Spring (3.0.5) does not contain
the BeanUtils.instantiateClass(Class<?>, Class<T>) signature
that was added in 3.1.0, therefore NoSuchMethodErrors are
being thrown when STS classloads and delegates to
3.1.0 NamespaceHandler and BeanDefinitionParser implementations
on the user project classpath.

In this case, it's AbstractSpecificationBeanDefinitionParser
doing the calling to the unknown new method.  In this specific
example, reverting back to the old single-arg signature is actually
not a problem, because it does accept Class<T> and returns an
instance of type T, which was the desired behavior in the first
place.

The newer signature remains in order to accommodate callers
who do not know the generic type of the Class to be instantiated
(i.e. Class<?>), but do know the type that it should be assignable
to -- this becomes the second argument Class<T>, and an instance
of type T is returned (if indeed it is assignable to the specified
type; otherwise IllegalArgumentException.
2011-02-10 17:59:26 +00:00
Chris Beams d7a8536bd7 Re-introduce and deprecate BDPD.initDefaults(Element)
For compatibility with Spring Integration's standalone usage of
BeanDefinitionParserDelegate.
2011-02-10 13:33:09 +00:00
Sam Brannen c9c436128f [SPR-7953] BeanDefinitionVisitor now actually visits factory method names. 2011-02-10 13:08:31 +00:00
Sam Brannen c84ef76fc3 [SPR-7953] BeanDefinitionVisitor now actually visits factory method names. 2011-02-10 13:01:58 +00:00
Juergen Hoeller a6d35d4801 prepared 3.1 M1 changelog 2011-02-10 02:07:14 +00:00
Juergen Hoeller ce761d3fe8 renamed AbstractPropertyPlaceholderConfigurer to PlaceholderConfigurerSupport 2011-02-10 02:01:02 +00:00
Juergen Hoeller df6be9f694 turned to package visibility 2011-02-10 01:58:21 +00:00
Juergen Hoeller 47c9278e32 renamed AbstractPropertyPlaceholderConfigurer to PlaceholderConfigurerSupport 2011-02-10 01:55:11 +00:00
Juergen Hoeller 93304b5ff2 removed ConversionService/TypeConverter convenience methods in order to restore 3.0's SPI (for backwards compatibility with implementers) 2011-02-10 01:36:57 +00:00
Juergen Hoeller cd584afe93 removed ConversionService/TypeConverter convenience methods in order to restore 3.0's SPI (for backwards compatibility with implementers) 2011-02-10 01:24:08 +00:00
Chris Beams b7d7fa7b7e Further compensations for STS; binary compat fixes
Defensively catch NoSuchMethodError when calling BDPD.getEnvironment()
and supply a DefaultEnvironment if not available.

Replace the single-arg constructor for BDPD and deprecate, preserving
binary compat particularly for Spring Integration who instantiates
this class directly, which is unusual.
2011-02-10 00:30:30 +00:00
Chris Beams 9cc125531b Fix STS compatibility issues; other improvements
Revert changes to ParserContext, ReaderContext, and XmlReaderContext

    These changes cause cross-version incompatibilities at tooling time
    -- for instance, an STS version that ships with Spring 3.0.5
    classloads the ParserContext defined in that version, whereas it
    classloads NamespaceHandlers and BeanDefinitionParsers (by default)
    from the user application classpath, which may be building against
    3.1.0. If so, the changes introduced to these types in 3.1.0 are
    incompatible with expectations in the 3.0.5 world and cause all
    manner of problems.  In this case, it was NoSuchMethodError due to
    the newly-added XmlReaderContext.getProblemReporter() method; also
    IncompatibleClassChangeError due to the introduction of the
    ComponentRegistrar interface on ParserContext.

    Each of these problems have been mitigated, though the solutions
    are not ideal. The method mentioned has been removed, and instead
    the problemReporter field is now accessed reflectively.
    ParserContext now no longer implements ComponentRegistrar, and
    rather a ComponentRegistrarAdapter class has been introduced that
    passes method calls through to a ParserContext delegate.

Introduce AbstractSpecificationBeanDefinitionParser

    AbstractSpecificationBeanDefinitionParser has been introduced in
    order to improve the programming model for BeanDefinitionParsers
    that have been refactored to the new FeatureSpecification model.
    This new base class and it's template method implementation of
    parse/doParse ensure that common concerns like (1) adapting a
    ParserContext into a SpecificationContext, (2) setting source and
    source name on the specification, and (3) actually executing the
    specification are all managed by the base class.  The subclass
    implementation of doParse need only actually parse XML, populate
    and return the FeatureSpecification object.  This change removed
    the many duplicate 'createSpecificationContext' methods that had
    been lingering.

Minor improvement to BeanDefinitionReaderUtils API

    Introduced new BeanDefinitionReaderUtils#registerWithGeneratedName
    variant that accepts BeanDefinition as opposed to
    AbstractBeanDefinition, as BeanDefinition is all that is actually
    necessary to satisfy the needs of the method implementation. The
    latter variant accepting AbstractBeanDefinition has been deprecated
    but remains intact and delegates to the new variant in order to
    maintain binary compatibility.
2011-02-09 16:44:26 +00:00
Thomas Risberg 939da34869 switched to create the PreparedStatementCreatorFactory using a list of SqlParameters to preserve type names (SPR-7699) 2011-02-09 13:58:30 +00:00
Arjen Poutsma 91debc3a35 Fixing compilation error with javac. 2011-02-09 09:39:29 +00:00
Chris Beams c58b63a982 Revert signature change in BDRU.registerWithGeneratedName
This change broke binary compatibility as evidenced by running
the greenhouse test suite and finding that Spring Integration's
AbstractConsumerEndpointParser.parseInternal fails with
NoSuchMethodError when trying to invoke.
2011-02-09 06:57:24 +00:00
Chris Beams b1756e2f17 Sync pom.xml deps with ivy.xml changes since 3.0.5 2011-02-09 06:56:53 +00:00
Chris Beams 2f7c2230f0 Include license.txt and notice.txt in module JARs 2011-02-09 06:56:40 +00:00
Chris Beams 906b50ef51 Add FeatureMethodErrorTests
Capture common mistakes with @Feature method declarations and ensure
that useful error messages are produced.
2011-02-09 06:54:02 +00:00
Sam Brannen 6926e0f563 Suppressing warnings, polishing JavaDoc, etc. 2011-02-08 22:50:45 +00:00
Sam Brannen e7c2713fd4 polishing JavaDoc 2011-02-08 22:08:38 +00:00
Chris Beams 2d76dde611 Rename ExecutorContext => SpecificationContext 2011-02-08 19:08:41 +00:00
Chris Beams c5063004eb Rename spring.{profile}.active => {profiles}
Same for spring.profiles.default
2011-02-08 19:07:46 +00:00
Chris Beams a2bc381ade Extract ProblemCollector interface 2011-02-08 19:07:03 +00:00
Juergen Hoeller 60414c9052 updated for the 3.1 M1 release 2011-02-08 16:58:34 +00:00
Juergen Hoeller 9bef79f5a8 removed assertions 2011-02-08 16:35:38 +00:00
Chris Beams b4fea47d5c Introduce FeatureSpecification support
Introduce FeatureSpecification interface and implementations

    FeatureSpecification objects decouple the configuration of
    spring container features from the concern of parsing XML
    namespaces, allowing for reuse in code-based configuration
    (see @Feature* annotations below).

    * ComponentScanSpec
    * TxAnnotationDriven
    * MvcAnnotationDriven
    * MvcDefaultServletHandler
    * MvcResources
    * MvcViewControllers

Refactor associated BeanDefinitionParsers to delegate to new impls above

    The following BeanDefinitionParser implementations now deal only
    with the concern of XML parsing.  Validation is handled by their
    corresponding FeatureSpecification object.  Bean definition creation
    and registration is handled by their corresponding
    FeatureSpecificationExecutor type.

    * ComponentScanBeanDefinitionParser
    * AnnotationDrivenBeanDefinitionParser (tx)
    * AnnotationDrivenBeanDefinitionParser (mvc)
    * DefaultServletHandlerBeanDefinitionParser
    * ResourcesBeanDefinitionParser
    * ViewControllerBeanDefinitionParser

Update AopNamespaceUtils to decouple from XML (DOM API)

    Methods necessary for executing TxAnnotationDriven specification
    (and eventually, the AspectJAutoProxy specification) have been
    added that accept boolean arguments for whether to proxy
    target classes and whether to expose the proxy via threadlocal.

    Methods that accepted and introspected DOM Element objects still
    exist but have been deprecated.

Introduce @FeatureConfiguration classes and @Feature methods

    Allow for creation and configuration of FeatureSpecification objects
    at the user level.  A companion for @Configuration classes allowing
    for completely code-driven configuration of the Spring container.

    See changes in ConfigurationClassPostProcessor for implementation
    details.

    See Feature*Tests for usage examples.

    FeatureTestSuite in .integration-tests is a JUnit test suite designed
    to aggregate all BDP and Feature* related tests for a convenient way
    to confirm that Feature-related changes don't break anything.
    Uncomment this test and execute from Eclipse / IDEA. Due to classpath
    issues, this cannot be compiled by Ant/Ivy at the command line.

Introduce @FeatureAnnotation meta-annotation and @ComponentScan impl

    @FeatureAnnotation provides an alternate mechanism for creating
    and executing FeatureSpecification objects.  See @ComponentScan
    and its corresponding ComponentScanAnnotationParser implementation
    for details.  See ComponentScanAnnotationIntegrationTests for usage
    examples

Introduce Default[Formatting]ConversionService implementations

    Allows for convenient instantiation of ConversionService objects
    containing defaults appropriate for most environments.  Replaces
    similar support originally in ConversionServiceFactory (which is now
    deprecated). This change was justified by the need to avoid use
    of FactoryBeans in @Configuration classes (such as
    FormattingConversionServiceFactoryBean). It is strongly preferred
    that users simply instantiate and configure the objects that underlie
    our FactoryBeans. In the case of the ConversionService types, the
    easiest way to do this is to create Default* subtypes. This also
    follows convention with the rest of the framework.

Minor updates to util classes

    All in service of changes above. See diffs for self-explanatory
    details.

    * BeanUtils
    * ObjectUtils
    * ReflectionUtils
2011-02-08 14:42:33 +00:00
Chris Beams b04987ccc3 Make ObjectUtils.addObjectToArray() generic 2011-02-08 13:01:29 +00:00
Costin Leau fb57316afa renamed EhcacheCacheManager to EhCacheCacheManager 2011-02-07 17:45:29 +00:00
Costin Leau ca2dbc1c59 renamed EhcacheCacheManager to EhCacheCacheManager 2011-02-07 17:44:41 +00:00
Costin Leau 4da39b48f7 moved cache abstraction from context.support to context 2011-02-07 17:41:25 +00:00
Keith Donald fbb1fa33a1 added support for Instant and MutableDateTime binding to JodaTime formatting system; allow for use of @DateTimeFormat on any ReadableInstant field 2011-02-04 20:17:52 +00:00
Keith Donald ff7f3aebea reordered interface operations for clarity 2011-02-04 18:20:05 +00:00
Keith Donald 7d1104e442 SPR-7875 2011-02-04 18:17:30 +00:00
Rossen Stoyanchev 37e0a90350 SPR-7327 Add minOccurs=0 to sub-elements of mvc:annotation-driven and add more tests 2011-02-03 22:56:13 +00:00
Rossen Stoyanchev 7aaad37120 SPR-7327 add <mvc:argument-resolvers> namespace element 2011-02-03 15:22:00 +00:00
Costin Leau 182b6a437c + fixed cache xsd minor typo 2011-02-01 10:20:09 +00:00
Costin Leau 44b5df0db1 SPR-7887
+ add javadoc on JBoss LTW for usage on JBoss 6.0
2011-02-01 10:19:23 +00:00
Costin Leau 9c071e5d19 SPR-4331
docs for LTW for WebSphere
2011-02-01 10:18:06 +00:00
Costin Leau f191be56d1 SPR-4331
LTW for WebSphere
2011-02-01 10:17:42 +00:00
Rossen Stoyanchev 93de9622fc Remove code for parsing mvc:formatters (SPR-7732) 2011-01-31 21:30:48 +00:00
Costin Leau 0c5a13cc96 SPR-7887
+ add note about JBoss 6
2011-01-31 16:53:56 +00:00
Arjen Poutsma c4a954a618 SPR-7494 - Introduce interceptors for RestTemplate 2011-01-28 14:24:52 +00:00
Arjen Poutsma 62425568b9 SPR-7494 - Introduce interceptors for RestTemplate 2011-01-28 09:17:00 +00:00
Rossen Stoyanchev abff2b959b SPR-7912 Add tests for FormattingConversionServiceFactoryBean, update reference docs, and remove mvc:formatters 2011-01-27 11:26:19 +00:00
Rossen Stoyanchev 149348c907 SPR-7912 Introduce FormatterRegistrar interface and FormattingConversionServiceFactoryBean enhancements. 2011-01-26 22:20:49 +00:00
Juergen Hoeller 9dd6f467b9 get/stripFilenameExtension correctly ignores Unix-style hidden directories (SPR-7828) 2011-01-26 20:47:45 +00:00
Juergen Hoeller 7af890cc5f fixed tests (SPR-7779) 2011-01-26 20:39:57 +00:00
Juergen Hoeller f4a2282d9d LocaleChangeInterceptor validates locale values in order to prevent XSS vulnerability (SPR-7779) 2011-01-26 20:30:30 +00:00
Juergen Hoeller b3f039ae5f Servlet/PortletRequestDataBinder perform unwrapping for MultipartRequest as well (SPR-7795) 2011-01-26 20:09:42 +00:00
Arjen Poutsma 4835be78b7 Made abstract requests public again 2011-01-26 16:09:41 +00:00
Arjen Poutsma 4e50eafe74 Small performance improvement 2011-01-26 14:43:34 +00:00
Rossen Stoyanchev f26b499cbd SPR-7732, SPR-6506, SPR-7191 MVC Namespace improvements to the annotation-driven element - custom message converters, formatters, and message codes resolver. 2011-01-25 17:49:57 +00:00
Arjen Poutsma 1ed1c59888 SPR-7909 - Sending large payloads with RestTemplate results in an OutOfMemoryError 2011-01-25 16:18:47 +00:00
Arjen Poutsma d0d6a07870 SPR-7909 - Sending large payloads with RestTemplate results in an OutOfMemoryError 2011-01-25 16:08:15 +00:00
Arjen Poutsma 33674933ea OutOfMemory Errors when posting large objects via RestTemplate 2011-01-25 09:48:19 +00:00
Sam Brannen 2ed3d77331 [SPR-7849] fixed link to Goals section and updated EasyMock description. 2011-01-21 11:48:30 +00:00
Sam Brannen 6362de44d1 [SPR-7849] revised the testing chapter based on internal review and new insight. 2011-01-21 00:23:34 +00:00
Juergen Hoeller d3d7634574 added tests with error in BindingResult (SPR-7809) 2011-01-18 21:39:08 +00:00
Arjen Poutsma 465e093bfb SPR-7729 - MediaType incorrectly calls the toString() method instead of name() method causing RestTemplate on Android to fail 2011-01-10 15:45:42 +00:00
Arjen Poutsma 157623b47f SPR-6902 - @ResponseBody does not work with @ExceptionHandler 2011-01-10 12:26:57 +00:00
Arjen Poutsma 4998d061f8 SPR-7869 - Accept-Charset header with '*' results in java.nio.charset.IllegalCharsetNameException 2011-01-10 11:24:48 +00:00
Keith Donald 2fcab44de0 remove addressed TODO 2011-01-07 21:25:44 +00:00
Keith Donald 34fbd5affa typo 2011-01-07 21:13:20 +00:00
Keith Donald 0d28b70aa8 failing test case 2011-01-07 20:58:20 +00:00
Keith Donald 7bf4e93783 out of memory test case 2011-01-07 20:56:42 +00:00
Keith Donald 414fcab899 sp7839 - map autogrow, including auto-grow support for map values 2011-01-07 19:22:45 +00:00
Andy Clement ac9fd008de more projection tests - verifying the typedescriptor changes made by Keith 2011-01-07 19:14:42 +00:00
Keith Donald b5c167bdb1 ignore failing tests temp for array nesting level bug and map autogrow bug 2011-01-07 17:59:51 +00:00
Keith Donald 90d8dade25 fixed bug related to array autogrow 2011-01-07 17:54:17 +00:00
Keith Donald 8df6b86dd1 ignore failing test 2011-01-07 17:29:00 +00:00
Keith Donald 5d6840e877 array autogrow on set e.g. array[0]=foo 2011-01-07 17:28:18 +00:00
Keith Donald 2ef629d5a8 removed accidental system.out commit 2011-01-07 16:18:04 +00:00
Keith Donald 1ed03fc6ca fetch property value again after setting default value to protect against object copy 2011-01-07 16:16:32 +00:00
Keith Donald 3bb17974d8 empty collection test refinements 2011-01-07 15:27:29 +00:00
Keith Donald b040606cfa spr-7728: empty collection conversion can return value not assignable to targetType 2011-01-07 14:21:54 +00:00
Chris Beams a7293d2961 Introduce ApplicationContextInitializer interface
Designed primarily for use in conjunction with web applications
to provide a convenient mechanism for configuring the container
programmatically.

ApplicationContextInitializer implementations are specified through the
new "contextInitializerClasses" servlet context parameter, then detected
and invoked by ContextLoader in its customizeContext() method.

In any case, the semantics of ApplicationContextInitializer's
initialize(ConfigurableApplicationContext) method require that
invocation occur *prior* to refreshing the application context.

ACI implementations may also implement Ordered/PriorityOrdered and
ContextLoader will sort instances appropriately prior to invocation.

Specifically, this new support provides a straightforward way to
programmatically access the container's Environment for the purpose
of adding, removing or otherwise manipulating PropertySource objects.

See Javadoc for further details.

Also note that ApplicationContextInitializer semantics overlap to
some degree with Servlet 3.0's notion of ServletContainerInitializer
classes. As Spring 3.1 development progresses, we'll likely see
these two come together and further influence one another.
2011-01-07 09:57:57 +00:00
Keith Donald 71e60f4551 Favor convertValue(Object, TypeDescriptor) where possible and TypedValue(Object); check with Andy on Selection and Projection TypedValue usage 2011-01-07 06:32:21 +00:00
Keith Donald 0fb631348e switched to better encapsulated convert(Object, TypeDescriptor) where possible 2011-01-07 05:57:25 +00:00
Keith Donald bb4aa9cc39 added call to applyIndexedObject to build nested source element type descriptor from element value 2011-01-07 04:41:21 +00:00
Keith Donald 8e23685a6d support for empty collection->collection. map->map, collection->array conversion 2011-01-07 03:24:24 +00:00
Keith Donald 42403a37c3 getPropertyTypeDescriptor implementation optimization 2011-01-07 02:51:56 +00:00
Keith Donald e254521952 getPropertyTypeDescriptor bug fixes 2011-01-06 23:12:00 +00:00
Keith Donald 4c9731d572 added forNestedType(MethodParameter) for resolution of nested parameter types for collection, array, and map parameter types 2011-01-06 21:59:34 +00:00
Sam Brannen 61cfb96d95 Changed slf4j.jcl dependency from 1.5.6 to 1.5.3 for consistency with build.versions. 2011-01-06 20:05:22 +00:00
Keith Donald c6c782df59 forNestedType usage clarification 2011-01-06 18:33:50 +00:00
Sam Brannen c309ef74d7 Updates to readme and changelog files regarding 3.1.0.M1 2011-01-06 12:05:48 +00:00
Keith Donald 7ec5f1694b temp added ignore on 2 new failing tests until time to investigate 2011-01-06 12:00:51 +00:00
Keith Donald 86f1179606 temp added ignore on 2 new failing tests until time to investigate 2011-01-06 11:41:30 +00:00
Chris Beams 15ac99f59c Introduce and integrate JndiPropertySource
DefaultWebEnvironment automatically adds a JndiPropertySource if
a "jndiPropertySourceEnabled" property is detected in any of the
other other default property sources.
2011-01-06 07:43:29 +00:00
Chris Beams a7704c8cce Polish Javadoc for PropertySource implementations 2011-01-06 07:43:03 +00:00
Keith Donald 01c98c3bfb added initial support for handling unknown nested type values when converting collections; now favor factory method for constructing nested type descriptors for clarity (made constructor private); improved javadoc 2011-01-06 05:14:49 +00:00
Chris Beams 9420bdc246 Document createEnvironment() methods
in AbstractApplicationContext and SpringContextResourceAdapter
2011-01-05 22:25:42 +00:00
Chris Beams bc41cb2f27 Polish (Mutable)PropertySources
* PropertySources is now an Iterable<PropertySource> in favor of
  exposing an asList() method
* Otherwise reduced the set of methods exposed by PropertySources to the
  absolute minimum
* Added Javadoc for both types and all methods
2011-01-05 22:25:24 +00:00
Chris Beams 7f8ede1407 Remove dead code
* removed registerStandardBeanFactoryPostProcessors() methods
* removed commented-out test from PropertyResourceConfigurerTests
2011-01-05 22:24:55 +00:00
Chris Beams 431eaf6df8 Refactor PropertyPlaceholderConfigurer hierarchy
PropertySourcesPlaceholderConfigurer accommodates recent changes in
Environment and PropertySource APIs, e.g. no longer assuming enumerability
of property names.

PSPC reuses as much functionality as possible from
AbstractPropertyPlaceholderConfigurer, but overrides
postProcessBeanFactory() and defines its own variation on
processProperties() in order to accept a PropertyResolver rather than
a PropertySource.

AbstractPropertyPlaceholderConfigurer introduces doProcessProperties()
method to encapsulate that which is actually common, such as the
visiting of each bean definition once a StringValueResolver has been
created in the subclass.
2011-01-05 22:24:37 +00:00
Chris Beams 2b99cf6d29 Refactor Environment and PropertySource
* Environment now extends PropertyResolver
* Environment no longer exposes resolver and sources
* PropertySource is String,Object instead of String,String
* PropertySource no longer assumes enumerability of property names
* Introduced EnumerablePropertySource for those that do have enumerable property names
2011-01-05 22:24:14 +00:00
Chris Beams 7c4582b4b3 Update build instructions in readme 2011-01-05 22:22:58 +00:00
Juergen Hoeller e971ad56b6 reduced BeanDefinition footprint by initializing Sets and Maps with 0 (SPR-7491) 2011-01-05 19:59:00 +00:00
Juergen Hoeller 125b843cf7 revised javadoc on "exactDateLength" (SPR-7759) 2011-01-05 19:55:24 +00:00
Juergen Hoeller efe1e64b08 fixed aspects bundle to declare dependencies for @Async aspect as well (SPR-7702) 2011-01-05 19:50:23 +00:00
Juergen Hoeller 3fe2d037ed fixed AbstractBindingResult to avoid NPE in "hashCode()" if target is null (SPR-7682) 2011-01-05 19:42:35 +00:00
Juergen Hoeller a780a4a401 ProxyCreationContext uses "ThreadLocal.remove()" over "ThreadLocal.set(null)" as well 2011-01-05 19:32:02 +00:00
Juergen Hoeller 67d9b8b943 EhCacheManagerFactoryBean properly closes "ehcache.xml" input stream, if any (SPR-7813) 2011-01-05 19:29:07 +00:00
Keith Donald cc91efecae Fixed bugs in bean wrapper related to nesting levels on method parameters 2011-01-05 19:18:29 +00:00
Keith Donald 3536b8178d failing nested list binding 2011-01-05 17:10:05 +00:00
Keith Donald a417aa2ea3 ignore failing map test case 2011-01-05 16:59:47 +00:00
Keith Donald 818bd841fe method naming improvements; applyIndexObject call for array indexing 2011-01-05 16:54:03 +00:00
Juergen Hoeller 9c64ac7482 fixed potential InjectionMetadata NPE when using SpringBeanAutowiringInterceptor (SPR-7686) 2011-01-05 16:08:43 +00:00
Keith Donald 3cfe557971 spr 7839 reproduce 2011-01-05 06:38:14 +00:00
Keith Donald fe386f1c10 spr7816 2011-01-05 06:23:04 +00:00
Keith Donald da898faac9 spr7766 2011-01-05 06:05:34 +00:00
Keith Donald 39e0c29d19 TypeDescriptor cleanup and general polishing; fixed a number of bugs related to TypeDescriptor usage in client code across beans and spel packages 2011-01-05 05:49:33 +00:00
Arjen Poutsma 74b5b7b56a SPR-7845 - FormHttpMessageConverter.read() always ignores post data when processing request (from Tomcat) 2011-01-04 11:25:30 +00:00
Michael Isvy e133bde01f SPR-7858 2011-01-04 09:40:39 +00:00
Arjen Poutsma e5d8fa0771 SPR-7834 - HttpHeaders.getEtag() mangles the value 2011-01-03 15:51:23 +00:00
Arjen Poutsma fbede64c86 SPR-7845 - FormHttpMessageConverter.read() always ignores post data when processing request (from Tomcat) 2011-01-03 14:48:34 +00:00
Arjen Poutsma e98afc087f SPR-7845 - FormHttpMessageConverter.read() always ignores post data when processing request (from Tomcat) 2011-01-03 14:38:28 +00:00
Chris Beams 5e6912302a Introduce "Aware" superinterface
All existing *Aware interfaces have been refactored to extend this
new marker interface, serving two purposes:

    * Easy access to a type hierarchy that can answer the question
      "What *Aware interfaces are available?", without requiring
      text-based searches. Also clearly excludes false positives like
      TargetClassAware and ParamAware, which while similarly named,
      are not semantically similar to traditional *Aware interfaces
      in Spring.

    * Minor potential performance improvements in
      AbstractAutowireCapableBeanFactory and
      ApplicationContextAwareProcessor. Both have blocks of sequential
      instanceof checks in order to invoke any *Aware interface callback
      methods. For a bean that implements none of these interfaces,
      the whole sequence can be avoided by guarding first with
          if (bean instanceof Aware) {
              ...
          }

Implementors of custom *Aware-style interfaces (and presumably
the BeanPostProcessors that handle them), are encouraged to refactor to
extending this interface for consistency with the framework as well as
the points above.
2011-01-03 10:13:57 +00:00
Chris Beams b3ff9be78f M1 cut of environment, profiles and property work (SPR-7508)
Decomposed Environment interface into PropertySources, PropertyResolver
objects

    Environment interface and implementations are still present, but
    simpler.

    PropertySources container aggregates PropertySource objects;
    PropertyResolver provides search, conversion, placeholder
    replacement. Single implementation for now is
    PropertySourcesPlaceholderResolver

Renamed EnvironmentAwarePropertyPlaceholderConfigurer to
PropertySourcesPlaceholderConfigurer

    <context:property-placeholder/> now registers PSPC by default, else
    PPC if systemPropertiesMode* settings are involved

Refined configuration and behavior of default profiles

    See Environment interface Javadoc for details

Added Portlet implementations of relevant interfaces:

    * DefaultPortletEnvironment
    * PortletConfigPropertySource, PortletContextPropertySource
    * Integrated each appropriately throughout Portlet app contexts

Added protected 'createEnvironment()' method to AbstractApplicationContext

    Subclasses can override at will to supply a custom Environment
    implementation.  In practice throughout the framework, this is how
    Web- and Portlet-related ApplicationContexts override use of the
    DefaultEnvironment and swap in DefaultWebEnvironment or
    DefaultPortletEnvironment as appropriate.

Introduced "stub-and-replace" behavior for Servlet- and Portlet-based
PropertySource implementations

    Allows for early registration and ordering of the stub, then
    replacement with actual backing object at refresh() time.

    Added AbstractApplicationContext.initPropertySources() method to
    support stub-and-replace behavior. Called from within existing
    prepareRefresh() method so as to avoid impact with
    ApplicationContext implementations that copy and modify AAC's
    refresh() method (e.g.: Spring DM).

    Added methods to WebApplicationContextUtils and
    PortletApplicationContextUtils to support stub-and-replace behavior

Added comprehensive Javadoc for all new or modified types and members

Added XSD documentation for all new or modified elements and attributes

    Including nested <beans>, <beans profile="..."/>, and changes for
    certain attributes type from xsd:IDREF to xsd:string

Improved fix for detecting non-file based Resources in
PropertiesLoaderSupport (SPR-7547, SPR-7552)

    Technically unrelated to environment work, but grouped in with
    this changeset for convenience.

Deprecated (removed) context:property-placeholder
'system-properties-mode' attribute from spring-context-3.1.xsd

    Functionality is preserved for those using schemas up to and including
    spring-context-3.0.  For 3.1, system-properties-mode is no longer
    supported as it conflicts with the idea of managing a set of property
    sources within the context's Environment object. See Javadoc in
    PropertyPlaceholderConfigurer, AbstractPropertyPlaceholderConfigurer
    and PropertySourcesPlaceholderConfigurer for details.

Introduced CollectionUtils.toArray(Enumeration<E>, A[])

Work items remaining for 3.1 M2:

    Consider repackaging PropertySource* types; eliminate internal use
    of SystemPropertyUtils and deprecate

    Further work on composition of Environment interface; consider
    repurposing existing PlaceholderResolver interface to obviate need
    for resolve[Required]Placeholder() methods currently in Environment.

    Ensure configurability of placeholder prefix, suffix, and value
    separator when working against an AbstractPropertyResolver

    Add JNDI-based Environment / PropertySource implementatinos

    Consider support for @Profile at the @Bean level

    Provide consistent logging for the entire property resolution
    lifecycle; consider issuing all such messages against a dedicated
    logger with a single category.

    Add reference documentation to cover the featureset.
2011-01-03 09:04:34 +00:00
Sam Brannen b130a36af7 [SPR-7850][SPR-7851] Upgraded to JUnit 4.8.1 and TestNG 5.12.1; added changelog entries for 3.1.0.M1. 2010-12-30 08:00:58 +00:00
Sam Brannen d7c4db1b49 [SPR-7849] work in progress: revising the testing chapter based on internal review. 2010-12-30 06:19:58 +00:00
Sam Brannen b8ab33e0c5 [SPR-7849] work in progress: revising the testing chapter based on internal review. 2010-12-30 05:47:23 +00:00
Sam Brannen 54a7ad9f74 [SPR-7848] Improved readability, grammar, and formatting of the Container Extension Points section of the reference manual. 2010-12-30 02:07:22 +00:00
Oliver Gierke 30751c9b0a SPR-2946 - Corrected documentation for lazy-init behaviour on Bean(Factory)PostProcessors.
Changed the documentation to correctly state that B(F)PP are instantiated eagerly no matter if they are explicitly marked as to be lazy initialized or the default-lazy-init attribute is used at a <beans /> element.
2010-12-28 10:06:00 +00:00
Oliver Gierke f20ded5f63 SPR-7674 - Documented value defaulting in Spring EL
Added short note of how to use the Elvis operator for defaulting values in the Spring expression language sections.
2010-12-28 09:42:58 +00:00
Costin Leau bfb3003cba SPR-7308
+ wrapping up cache documentation
+ plug in cache docs
2010-12-27 18:36:57 +00:00
Chris Beams 9f5fd3afcf Normalize indentation of Apache license URL
In accordance with recommendations at
http://www.apache.org/licenses/LICENSE-2.0.html.

A number of classes had strayed from this format, now all
are the same.
2010-12-22 21:40:19 +00:00
Arjen Poutsma 64c7549c70 Removed JDK 1.6 usage 2010-12-22 10:23:34 +00:00
Costin Leau 29a8ca4edc SPR-7308
+ draft cache documentation
2010-12-21 17:13:17 +00:00
Costin Leau 893fc83f49 SPR-7308
+ fix initialization problem for root object (inside SpEL eval context)
+ add integration tests for root object expressions
2010-12-21 15:47:22 +00:00
Costin Leau e90f0a35e3 SPR-7308
+ add check for null key
2010-12-21 15:46:37 +00:00
Arjen Poutsma 9f4499cb36 SPR-7789 - FormHttpMessageConverter does not honor the charset in the content type when writing a form and uses a wrong default charset 2010-12-20 16:56:14 +00:00
Arjen Poutsma d0394599ad SPR-7789 - FormHttpMessageConverter does not honor the charset in the content type when writing a form and uses a wrong default charset 2010-12-20 16:50:44 +00:00
Arjen Poutsma db3634f859 SPR-7706 - 304 responses should not have non-0 Content-Length 2010-12-20 16:32:58 +00:00
Costin Leau 8285e9c2a7 SPR-7308
SPR-7736
+ clarify storage of null values
2010-12-17 10:15:50 +00:00
Costin Leau 18e141cbaa SPR-7308
+ optimize updating of multiple caches
2010-12-17 09:14:09 +00:00
Costin Leau 58633e4a89 SPR-7308
+ update AJ caching test
2010-12-16 21:25:12 +00:00
Costin Leau bbba832904 SPR-7308
+ add missing package javadocs
2010-12-16 13:19:34 +00:00
Costin Leau faf01b0337 SPR-7308
+ add support for multiple cache names
+ require each annotation to specify a cache name
+ add method support in Key generator interface
+ add bug fix for embedded JDK concurrent declaration
2010-12-16 13:19:01 +00:00
Costin Leau 21d64a74ae SPR-7308
+ remove unnecessary methods for EhCacheCache
2010-12-16 11:13:43 +00:00
Costin Leau 47711c6743 +SPR-7470
+ minor adjustments
2010-12-16 10:28:56 +00:00
Chris Beams f105670cec Fix breaking logic around getFilename() call 2010-12-15 17:34:31 +00:00
Chris Beams 1a7aebb0dd Improved fix for detecting non-file based Resources in PropertiesLoaderSupport (SPR-7547, SPR-7552)
Use instanceof check against AbstractFileResolvingResource instead of
try/catch around resource.getFilename() call.
2010-12-15 17:09:31 +00:00
Costin Leau c08a2764d0 SPR-7470
+ add basic documentation for c: namespace
2010-12-15 16:12:54 +00:00
Costin Leau da97547f00 fixed mistake in jmx docs (SPR-977) 2010-12-15 15:13:23 +00:00
Thomas Risberg fbb106cfbe updated license and notice files 2010-12-09 19:55:41 +00:00
Chris Beams f46a455c72 Eliminate PropertySourceAggregator interface 2010-12-08 07:59:55 +00:00
Chris Beams 8770ea96b0 Expose Environment ConfigurationService
AbstractEnvironment delegates to an underlying ConfigurationService when
processing methods such as getProperty(String name, Class<?> targetType)

Accessor methods have been added to the ConfigurableEnvironment
interface that allow this service to be updated or replaced.
2010-12-08 07:59:41 +00:00
Chris Beams b3e36a335d Eliminate reserved 'default' profile (SPR-7778)
There is no longer a reserved default profile named 'default'. Rather,
users must explicitly specify a default profile or profiles via

    ConfigurableEnvironment.setDefaultProfiles(String...)
        - or -
    spring.profile.default="pD1,pD2"

Per above, the setDefaultProfile(String) method now accepts a variable
number of profile names (one or more).  This is symmetrical with the
existing setActiveProfiles(String...) method.

A typical scenario might involve setting both a default profile as a
servlet context property in web.xml and then setting an active profile
when deploying to production.
2010-12-08 07:59:25 +00:00
Chris Beams e693d9fa58 Polish JavaDoc 2010-12-08 07:58:47 +00:00
Chris Beams b50abc67de Add Hamcrest 1.1 as test-time dependency for .context
Provides a richer set of Matcher implementations than JUnit's hamcrest
package.
2010-12-07 06:56:55 +00:00
Chris Beams e0c5ced695 Use dot notation rather than camel case for profile props (SPR-7508)
Before this change, the following properties could be used to manipulate
Spring profile behavior:

    -DspringProfiles=p1,p2
    -DdefaultSpringProfile=pD

These properties have been renamed to follow usual Java conventions for
property naming:

    -Dspring.profile.active=p1,p2
    -Dspring.profile.default=pD
2010-12-05 20:14:26 +00:00
Chris Beams 5062dc31af Support default profile (SPR-7508, SPR-7778)
'default' is now a reserved profile name, indicating
that any beans defined within that profile will be registered
unless another profile or profiles have been activated.

Examples below are expressed in XML, but apply equally when
using the @Profile annotation.

EXAMPLE 1:

        <beans>
            <beans profile="default">
                <bean id="foo" class="com.acme.EmbeddedFooImpl"/>
            </beans>
            <beans profile="production">
                <bean id="foo" class="com.acme.ProdFooImpl"/>
            </beans>
        </beans>

    In the case above, the EmbeddedFooImpl 'foo' bean will be
    registered if:
        a) no profile is active
        b) the 'default' profile has explicitly been made active

    The ProdFooImpl 'foo' bean will be registered if the 'production'
    profile is active.

EXAMPLE 2:

        <beans profile="default,xyz">
            <bean id="foo" class="java.lang.String"/>
        </beans>

    Bean 'foo' will be registered if any of the following are true:
        a) no profile is active
        b) 'xyz' profile is active
        c) 'default' profile has explicitly been made active
        d) both (b) and (c) are true

Note that the default profile is not to be confused with specifying no
profile at all.  When the default profile is specified, beans are
registered only if no other profiles are active; whereas when no profile
is specified, bean definitions are always registered regardless of which
profiles are active.

The default profile may be configured programmatically:

    environmnent.setDefaultProfile("embedded");

or declaratively through any registered PropertySource, e.g. system properties:

    -DdefaultSpringProfile=embedded

Assuming either of the above, example 1 could be rewritten as follows:

        <beans>
            <beans profile="embedded">
                <bean id="foo" class="com.acme.EmbeddedFooImpl"/>
            </beans>
            <beans profile="production">
                <bean id="foo" class="com.acme.ProdFooImpl"/>
            </beans>
        </beans>

It is unlikely that use of the default profile will make sense in
conjunction with a statically specified 'springProfiles' property.
For example, if 'springProfiles' is specified as a web.xml context
param, that profile will always be active for that application,
negating the possibility of default profile bean definitions ever
being registered.

The default profile is most useful for ensuring that a valid set of
bean definitions will always be registered without forcing users
to explictly specify active profiles.  In the embedded vs. production
examples above, it is assumed that the application JVM will be started
with -DspringProfiles=production when the application is in fact in
a production environment.  Otherwise, the embedded/default profile bean
definitions will always be registered.
2010-12-01 09:01:58 +00:00
Chris Beams b33da670e5 Rename EnvironmentBeansTests* -> ProfileXmlBeanDefinitionTests*
Earlier naming reflected initial conception of 'environment-specific
bean definitions'. This notion has evolved into bean definitions
specific to particular profiles, and the new naming more clearly
expresses it.
2010-12-01 08:36:29 +00:00
Chris Beams c8b4915891 Remove obsolete ConfigurationClassPostProcessor.getOrder() 2010-12-01 08:36:12 +00:00
David Syer b109a07fd9 SPR-7705: re-order rules and befores 2010-11-17 17:27:03 +00:00
David Syer c52915bde6 Add hamcrest to beans pom in the right place to make tests compile 2010-11-16 17:12:32 +00:00
Chris Beams 197a46d0ab Fix .integration-tests build path errors
Add .expression as a build path dependency to satisfy imports in
Spr7538Tests.java
2010-11-15 19:15:29 +00:00
David Syer 36ec06a917 Add missing JPA dependency 2010-11-15 16:54:12 +00:00
David Syer cfe1fdb5e5 Add missing Hamcrest dependency 2010-11-15 16:50:59 +00:00
David Syer a3df1c4e41 Re-order deps to allow Hamcrest to come before JUnit 2010-11-15 16:50:01 +00:00
David Syer b73224427f Add missing ROME dep 2010-11-15 16:49:17 +00:00
Arjen Poutsma 01120eb2f0 Using random port for HTTP integration tests 2010-11-09 10:40:51 +00:00
Arjen Poutsma 8762ec956c SPR-7707 - Unexpected behavior with class-level @RequestMappings 2010-11-08 14:56:35 +00:00
Costin Leau 01e79cfedd SPR-7703
- minor performance improvements to servlet and portlet handlers
2010-10-31 17:46:15 +00:00
Costin Leau caf1a0875a SPR-7308
+ add updated IDE classpath
+ add updated OSGi manifest
2010-10-29 17:17:38 +00:00
Costin Leau 4f8105ccaa SPR-7308
+ add updated IDE classpath
+ add updated OSGi manifest
2010-10-29 17:17:10 +00:00
Costin Leau 85c02981b5 SPR-7308
+ initial commit of caching abstraction
+ main API
+ Spring AOP and AspectJ support
+ annotation driven, declarative support
+ initial namespace draft
2010-10-29 17:00:08 +00:00
Arjen Poutsma 416777022d SPR-6614 - Add human-readable descriptions for statuc codes in HttpStatus 2010-10-29 10:56:43 +00:00
Arjen Poutsma 7cc3f49910 SPR-7695 - Add ETag version of WebRequest.checkNotModified() 2010-10-29 10:28:47 +00:00
Costin Leau 095a36e853 SPR-7470
+ add missing test class
2010-10-28 17:54:07 +00:00
Costin Leau 6ef987bced SPR-7470
+ add test for XML config with errors
2010-10-28 17:49:49 +00:00
Costin Leau c13905ad16 SPR-7470
+ add c: namespace
2010-10-28 17:49:01 +00:00
Chris Beams 4214bc0735 Minor post-merge cleanup 2010-10-25 19:54:01 +00:00
Chris Beams f480333d31 Merge 3.1.0 development branch into trunk
Branch in question is 'env' branch from git://git.springsource.org/sandbox/cbeams.git; merged into
git-svn repository with:

    git merge -s recursive -Xtheirs --no-commit env

No merge conflicts, but did need to

    git rm spring-build

prior to committing.

With this change, Spring 3.1.0 development is now happening on SVN
trunk. Further commits to the 3.0.x line will happen in an as-yet
uncreated SVN branch.  3.1.0 snapshots will be available
per the usual nightly CI build from trunk.
2010-10-25 19:48:20 +00:00
Juergen Hoeller b0ea2b13d2 polishing 2010-10-20 21:15:22 +00:00
Arjen Poutsma a37a9e8a38 SPR-7667 2010-10-20 13:59:37 +00:00
Juergen Hoeller 577755d580 polishing 2010-10-20 05:51:51 +00:00
Juergen Hoeller 610812949f prepared for 3.0.5 release 2010-10-20 05:48:25 +00:00
Juergen Hoeller 82ec515e59 declared JPA API as optional (SPR-6819) 2010-10-20 05:37:25 +00:00
Juergen Hoeller d418eed56f AbstractJasperReportsView only sets locale model attributes if not present already 2010-10-20 05:22:43 +00:00
Juergen Hoeller 244c96151e added consistent license header 2010-10-20 05:19:17 +00:00
Ramnivas Laddad 92298469bf Fixed configuration of AnnotationAsyncExecutionAspect (was incorrectly under the same name as that for transaction management aspect) 2010-10-17 22:33:30 +00:00
Juergen Hoeller bfd54f4f35 AnnotationAsyncExecutionAspect etc 2010-10-15 21:04:48 +00:00
Juergen Hoeller c5e53ee432 polishing 2010-10-15 20:50:51 +00:00
Juergen Hoeller 8c9b64c948 added mode="proxy"/"aspectj" and proxy-target-class options to task namespace; switched to concise names for async aspects 2010-10-15 20:50:23 +00:00
Thomas Risberg 171f1ee097 added additional parameter name matching using lowercase with Locale.ENGLISH (SPR-7658) 2010-10-15 15:56:59 +00:00
Juergen Hoeller be21358db7 reintroduced getHandler(request, cache) in deprecated form (after removing it in 3.0.4) 2010-10-15 14:05:22 +00:00
Juergen Hoeller 5da5fc6499 polishing 2010-10-15 08:44:03 +00:00
Chris Beams c7aaa85ef6 Add proper default values for 'merge' attributes in collection elements (SPR-7656) 2010-10-15 07:56:02 +00:00
Juergen Hoeller a25e4d794e Hibernate 3.6, etc 2010-10-14 23:10:08 +00:00
Juergen Hoeller 3c067e5db6 optimized AnnotationUtils findAnnotation performance for repeated search on same interfaces (SPR-7630) 2010-10-14 23:06:45 +00:00
Juergen Hoeller 0f924820e8 revised OracleTableMetaDataProvider for reliable Oracle Connection detection; autodetect JdbcTemplate's NativeJdbcExtractor (SPR-7611) 2010-10-14 21:25:14 +00:00
Juergen Hoeller 1f1577e33e fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:49:29 +00:00
Juergen Hoeller e1dbb66798 StringToArray/CollectionConverter trims element values before trying to convert them (SPR-7657) 2010-10-14 19:44:26 +00:00
Juergen Hoeller 1933b648c3 fixed @Value injection to correctly cache temporary null results for non-singleton beans (SPR-7614) 2010-10-14 19:40:36 +00:00
Juergen Hoeller 5cb06f5da2 consistent caching of @Autowired arguments in field and method case (SPR-7635) 2010-10-14 09:34:31 +00:00
Juergen Hoeller ffa4ed093f BeanWrapper etc 2010-10-14 00:30:38 +00:00
Juergen Hoeller 4c73a29f99 polishing 2010-10-14 00:30:07 +00:00
Juergen Hoeller 0195b0da3c BeanWrapper does not attempt to populate Map values on access (just auto-grows Map itself) 2010-10-14 00:14:50 +00:00
Juergen Hoeller 27a10c74d1 resolve dependency outside of synchronized block before subsequently preparing cached arguments (SPR-7635) 2010-10-13 23:22:57 +00:00
Juergen Hoeller 7893b3ebf6 applied synchronization in order to avoid race condition in skipping check (SPR-7635, SPR-7642) 2010-10-13 22:29:28 +00:00
Juergen Hoeller 21d6883139 moved async aspect to aspectj sub-package 2010-10-13 21:06:38 +00:00
Juergen Hoeller a6569a2930 moved async aspect to aspectj sub-package 2010-10-13 20:53:12 +00:00
Arjen Poutsma d9d7fb6f9a Docs 2010-10-13 14:19:48 +00:00
Arjen Poutsma 4108927b28 SPR-5367 - PathVariable mappings are greedy over hard coded mappings 2010-10-13 12:03:26 +00:00
Juergen Hoeller ac5b1bcfab fixed Autowired/CommonAnnotationBeanPostProcessor to prevent race condition in skipping check (SPR-7635, SPR-7642) 2010-10-12 22:56:38 +00:00
Arjen Poutsma c5c1d70aa3 SPR-6291 - UrlPathHelper is too aggressive decoding URLs 2010-10-12 12:09:43 +00:00
Arjen Poutsma 043ec2c8b2 SPR-7636 - XStreamMarshaller - Add support for configuring XStream with aliases by class (type) and also defining multiple attributes for the same class. 2010-10-12 11:55:29 +00:00
Arjen Poutsma 1f296403da SPR-7620 - StaxEventContentHandler does not set Location for StartDocument event 2010-10-12 09:50:39 +00:00
Arjen Poutsma 35da7bdb44 SPR-7621 - AbstractStaxContentHandler sets NamespaceContext on every start/end element 2010-10-12 09:41:23 +00:00
Arjen Poutsma ab21dbad08 SPR-7621 - AbstractStaxContentHandler sets NamespaceContext on every start/end element 2010-10-12 09:35:23 +00:00
Juergen Hoeller c32c0d5674 fixed package declaration 2010-10-11 21:26:32 +00:00
Juergen Hoeller e506ccf4e1 serializer package etc 2010-10-11 21:15:56 +00:00
Juergen Hoeller 0ef971b82b polishing 2010-10-11 21:15:26 +00:00
Juergen Hoeller b062de1133 revised initial cut of serializer package; moved Converter adapters to sub-package 'support' 2010-10-11 21:15:12 +00:00
Juergen Hoeller 3740380a7a polishing 2010-10-11 20:03:40 +00:00
Juergen Hoeller cb434793d5 avoid double flushing of ObjectOutputStream when close is being called right afterwards anyway 2010-10-11 20:00:45 +00:00
Oliver Gierke 9114f80b68 SPR-7641 - Added Principal to listing of supported method parameter types. 2010-10-11 19:59:16 +00:00
Juergen Hoeller ae3cfff380 fixed JodaTimeContextHolder to use a non-inheritable ThreadLocal and expose a reset method (SPR-7441); use of remove() even when being called with a null argument 2010-10-11 18:55:21 +00:00
Mark Fisher c046419acd SPR-7627 added Serializer and Deserializer strategies, Converter adapters, and default implementations 2010-10-11 17:36:18 +00:00
Thomas Risberg bd22bed10a added a SybaseAnywhereMaxValueIncrementer since syntax is slightly different than for Sybase ASE (SPR-7623) 2010-10-11 14:17:09 +00:00
Juergen Hoeller a0fead1880 revised TypedValue toString representation (SPR-7569) 2010-10-10 21:29:18 +00:00
Juergen Hoeller f7cd9865f4 polishing 2010-10-10 21:09:59 +00:00
Juergen Hoeller ebe8052d55 fixed detection of element type in case of nested collections (SPR-7569) 2010-10-10 21:09:43 +00:00
Juergen Hoeller 6b3c299a50 consistent handling of handler methods, init binder methods and model attribute methods (SPR-7355) 2010-10-10 21:01:04 +00:00
Juergen Hoeller 722778c74a SpEL MapAccessor consistently rejects "target.key" style access to Maps if no such key is found (SPR-7614) 2010-10-10 20:22:15 +00:00
Juergen Hoeller 1cd77e2a15 polishing 2010-10-10 20:11:53 +00:00
Juergen Hoeller 5be9473136 initialize cache Maps early, turning them into final fields 2010-10-10 20:11:44 +00:00
Juergen Hoeller 7553b76f15 SpEL method invocations prefer method with fewest parameters (e.g. no-arg over vararg; SPR-7633) 2010-10-10 19:23:01 +00:00
Juergen Hoeller d78eda8aeb polishing 2010-10-10 18:31:43 +00:00
Juergen Hoeller 061063257a optimized @Bean error messages (SPR-7628, SPR-7629) 2010-10-10 18:31:03 +00:00
Juergen Hoeller 4e43ba544b Jdbc4NativeJdbcExtractor etc 2010-10-09 23:08:23 +00:00
Juergen Hoeller ccded10d86 added configurable Connection/Statement/ResultSet target types to Jdbc4NativeJdbcExtractor (SPR-7613); added OracleJdbc4NativeJdbcExtractor with pre-configured Oracle JDBC API types 2010-10-09 23:04:50 +00:00
Juergen Hoeller 2433feab09 fixed embedded database exception test 2010-10-09 13:29:22 +00:00
Juergen Hoeller be04aca037 consistent handling of unwrap/isWrapperFor/isClosed in JDBC proxies 2010-10-09 12:38:37 +00:00
Juergen Hoeller 153680a5e6 polishing 2010-10-09 12:35:38 +00:00
Juergen Hoeller a15d023b45 ResourceDatabasePopulator throws descriptive ScriptStatementFailedException with resource details (SPR-7546) 2010-10-09 12:35:21 +00:00
Thomas Risberg 63b8ae085a added a nativeJdbcExtractor property for the TableMetaDataProvider and a method to specify the one to use for SImpleJdbcInsert (SPR-7611) 2010-10-08 18:28:01 +00:00
Oliver Gierke 1c6e131746 SPR-7604 - Support multiple embedded databases.
Added missing test configuration file.
2010-10-08 12:40:06 +00:00
Ramnivas Laddad 00984781af SPR-7369: @Async support in spring-aspects with AspectJ 2010-10-06 20:13:22 +00:00
Ramnivas Laddad e1fb19f4e1 SPR-7369: @Async support in spring-aspects with AspectJ 2010-10-06 20:12:15 +00:00
Arjen Poutsma 21cca695e5 Polishing 2010-10-06 12:05:11 +00:00
Oliver Gierke ba2bac17de SPR-7604 - Support multiple embedded databases.
Embedded datasources now get their bean ids set as database name to allow multiple databases of the same type in parallel. Refactored tests a little and made BeanDefinitionParser package private to align with the other ones. Adapted changelog accordingly.
2010-10-02 06:30:05 +00:00
Juergen Hoeller 5918e2fa9c preparations for 3.0.5 release 2010-10-02 01:29:35 +00:00
Juergen Hoeller 6d94c92d97 DefaultMessageListenerContainer's skips no-message-received commit on Tibco (avoiding a deadlock; SPR-7558) 2010-10-02 01:25:25 +00:00
Juergen Hoeller 3f0462510e getTestExecutionListeners() returns actual List which allows for iteration as well as modification (SPR-7595) 2010-10-02 01:05:40 +00:00
Juergen Hoeller 40fa8afce4 DispatcherPortlet's default resource serving explicitly prevents access to WEB-INF and META-INF (SPR-7540) 2010-10-02 00:03:09 +00:00
Juergen Hoeller aac2de9221 avoid ConcurrentModificationException when iterating attribute names (SPR-7557) 2010-10-01 22:27:34 +00:00
Juergen Hoeller cbab6fa59f reduced BeanDefinition footprint by initializing Sets and Maps with 0 2010-10-01 22:22:50 +00:00
Juergen Hoeller b7b2a25953 fixed ApplicationContext event processing for repeated invocations to non-singleton listener beans (SPR-7563) 2010-10-01 22:16:21 +00:00
Juergen Hoeller d9b54a524d revised "ClassUtils.isAssignable" semantics to cover primitives vs wrappers in both directions (SPR-7610) 2010-10-01 21:50:25 +00:00
Oliver Gierke 9008e08171 SPR-7651 - Document limitations of @Async.
* documented that @Async can't be used in conjunction with lifecycle callbacks such as @PostConstruct
* provide sample for workaround
* added semantic markup for code
2010-10-01 09:44:55 +00:00
Oliver Gierke eb0990b37e Formatting for scheduling.xml. 2010-10-01 09:44:52 +00:00
Oliver Gierke 1fc6de0403 SPR-7609 - Fixed typos in JMS documentation. 2010-10-01 06:52:08 +00:00
Oliver Gierke b467f2c858 SPR-7602 - Correctly shutdown Derby >= 10.6
The shutdown mechanism for in-memory databases has changed since 10.6. We now have to trigger 'drop' instead of 'shutdown'. Besides that we can skip purging the database manually in newer versions.
2010-09-30 17:56:41 +00:00
Juergen Hoeller e211c09065 fixed exists() check for resources in zipped files (SPR-7559) 2010-09-29 14:45:44 +00:00
Juergen Hoeller f88f69e700 AspectJExpressionPointcut uses bean ClassLoader for initializing the AspectJ pointcut parser (SPR-7570) 2010-09-29 14:31:23 +00:00
Juergen Hoeller eda6268d9d fixed findPlaceholderEndIndex to work with a custom suffix as well (SPR-7574) 2010-09-29 14:01:54 +00:00
Juergen Hoeller 668207d59d fixed Portlet UnavailableException tests (SPR-7542) 2010-09-29 13:45:50 +00:00
Juergen Hoeller 803b336354 fixed Portlet UnavailableException tests (SPR-7542) 2010-09-29 13:31:53 +00:00
Juergen Hoeller 4c154d3cab AnnotationSessionFactoryBean's "postProcessConfiguration" is non-final now (because of Hibernate 3.6; SPR-7581) 2010-09-29 13:22:24 +00:00
Juergen Hoeller 7ad191c912 made ResourceHttpRequestHandlerTests more reliable (SPR-7565) 2010-09-29 13:14:18 +00:00
Arjen Poutsma 70cb81b4b5 SPR-7591 - HttpStatusCodeException should contain response body 2010-09-24 10:06:52 +00:00
Costin Leau 6e516b7281 SPR-6819
+ change jpa Maven dependency from provided to compile
2010-09-21 23:14:22 +00:00
Jeremy Grelle aab05c4da9 Minor correction to doc updates made as part of SPR-7545 - "cache-period" attribute was incorrectly documented as "cache-seconds". 2010-09-17 18:50:01 +00:00
Chris Beams 562747ef41 Review recent documentation and default servlet changes
- Relocate and fix typos in interface-based @RequestMapping tip (SPR-7537)
- Fix typos in constructor-arg 'name' disambiguation section (SPR-7443)
- Polish whitespace in DefaultServletHttpRequestHandler (SPR-7553)
2010-09-15 08:45:21 +00:00
Oliver Gierke c1d2c36f32 SPR-7443 - Mentioned @ConstructorProperties in doc
If you want to reference parameters by name in XML
configuration you can also use @ConstructorProperties
to name the parameters in the class.
2010-09-15 08:13:12 +00:00
Oliver Gierke e8b9c6d5ff SPR-7443 - Constructor arg resolution by name (doc)
Added documentation on constructor argument 
disambiguation by using the argument names.
2010-09-15 06:37:05 +00:00
Thomas Risberg b2b195e2cf changed the access of the "reconcileColumnsToUse" and "reconcileParameters" methods to protected (SPR-7556) 2010-09-14 15:48:03 +00:00
Oliver Gierke 2c559aa8c8 SPR-7537 - Document proxying for MVC controllers
Extended documentation to include hints on what to 
consider when working with proxied controllers.
Explained the necessity of moving @RequestMapping
annotations to the interface or use proxy-target-
class="true".
2010-09-14 11:02:46 +00:00
Juergen Hoeller bf90a2ddb6 DispatcherPortlet throws custom NoHandlerFoundException instead of misleading UnavailableException (SPR-7542) 2010-09-14 06:43:53 +00:00
Juergen Hoeller a3f155220b UriTemplate is serializable now (SPR-7541) 2010-09-14 05:37:30 +00:00
Juergen Hoeller 6d4faa6c52 ApplicationContext registers context-specific ClassArrayEditor for its bean ClassLoader (SPR-1461) 2010-09-14 05:09:08 +00:00
Jeremy Grelle d8ecc76d4c SPR-7545 - Reference documentation now reflects the final state of the ResourceHttpRequestHandler and references the DefaultServletHttpRequestHandler properly. 2010-09-13 23:06:06 +00:00
Chris Beams 05bcc4028d Fix assumption about file-based Resources in PropertiesLoaderSupport (SPR-7547)
When using PropertiesLoaderSupport implementations (principally
PropertyPlaceholderConfigurer), an assumption was made that any
Resource representing a set of properties must be file-based.  SPR-7547
exposed the fact that if a non-file-based Resource implementation such
as ByteArrayResource were passed in, an IllegalStateException would be thrown
from the AbstractResource base class' implementation of getFilename().

This is now patched, and PropertiesLoaderSupport implementations treat
Resource implementations equally, regardless of file-orientation.

See also SPR-7552.
2010-09-13 20:23:26 +00:00
Jeremy Grelle 334a294e2a SPR-7553 - DefaultServletHttpRequestHandler fails on Google App Engine 2010-09-13 19:58:26 +00:00
Chris Beams 99f7142e3f Add @Ignored repro test for SPR-7538 2010-09-10 16:32:20 +00:00
Juergen Hoeller aa54518e2e final preparations for 3.0.5 2010-09-10 09:09:28 +00:00
Juergen Hoeller c2dab9c200 EmbeddedDatabaseFactory shuts down database when failing to populate it in initDatabase (SPR-7536) 2010-09-10 09:07:20 +00:00
Juergen Hoeller 609f91e1b4 final preparations for 3.0.5 2010-09-09 22:14:51 +00:00
Juergen Hoeller 87e7258c9a polishing 2010-09-09 22:14:36 +00:00
Juergen Hoeller 134e79c0fd clearly document behavior with respect to beans of same name at different factory levels (SPR-6117) 2010-09-09 22:12:23 +00:00
Chris Beams 08fb61316d Comment xsd-config-setup doc pending overhaul (SPR-7521) 2010-09-09 10:16:43 +00:00
Chris Beams 4b89069cab Polish whitespace in docs 2010-09-09 10:16:39 +00:00
Juergen Hoeller 5f2d88f74a polishing 2010-09-09 09:04:40 +00:00
Juergen Hoeller 53692a79e2 polishing 2010-09-09 08:13:49 +00:00
Juergen Hoeller b07a7be262 expression parser stuff 2010-09-08 22:53:54 +00:00
Juergen Hoeller 7a42ff16ac polishing 2010-09-08 22:53:39 +00:00
Juergen Hoeller f848e5081d updated version statement in javadoc 2010-09-08 22:48:03 +00:00
Juergen Hoeller 91a53a36ec LocalSessionFactoryBean's "entityCacheStrategies" works with region names on Hibernate 3.6 as well 2010-09-08 22:45:58 +00:00
Thomas Risberg 1247d2085b Polished the support for looking up column values by column label (SPR-7506) 2010-09-08 18:59:28 +00:00
Thomas Risberg 90636f66a8 Added support for looking up column values by column label to support CachedRowSetImpl which doesn't allow for column label use (SPR-7506); added some generics; 2010-09-08 18:46:21 +00:00
Juergen Hoeller c33df5977a pass full TypeDescriptor context through to ConversionService calls (SPR-7519) 2010-09-08 17:26:02 +00:00
Chris Beams 6f69b7b752 Allow class-relative resource loading in GenericXmlApplicationContext (SPR-7530)
Before:

    - new GenericXmlApplicationContext("com/acme/path/to/resource.xml");

    - GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
      ctx.load("com/acme/path/to/resource.xml");
      ctx.refresh();

After:

    - The above remain supported, as well as new class-relative variants

    - import com.acme.path.to.Foo;
      new GenericXmlApplicationContext(Foo.class, "resource.xml");

    - import com.acme.path.to.Foo;
      GenericXmlApplicationContext ctx = new GenericXmlApplicationContext();
      ctx.load(Foo.class, "resource.xml");
      ctx.refresh();

These changes are generally aligned with signatures long available in
ClassPathXmlApplicationContext. As GenericXmlApplicationContext is
intended to be a more flexible successor to CPXAC (and FSXAC), it's
important that all the same conveniences are available.
2010-09-08 15:30:48 +00:00
Juergen Hoeller 912d349366 @MVC fixes 2010-09-08 14:48:52 +00:00
Juergen Hoeller 284f98f12a fixed @MVC processing of parameter-level annotations to work with interface-based proxies again (SPR-7483) 2010-09-08 14:45:00 +00:00
Juergen Hoeller 907febd86e revised @RequestParam processing to support CSV-to-array/collection binding with ConversionService (SPR-7479) 2010-09-08 13:56:42 +00:00
Arjen Poutsma af7203b839 Added XMLEventStreamWriter 2010-09-08 12:52:23 +00:00
Juergen Hoeller a251d6a6cc revised @RequestParam processing to support CSV-to-array/collection binding with ConversionService (SPR-7479) 2010-09-08 12:39:57 +00:00
Arjen Poutsma 449337a544 Small Stax fixes. 2010-09-08 09:45:18 +00:00
Arjen Poutsma f92f295055 Small Stax fixes. 2010-09-08 08:42:09 +00:00
Juergen Hoeller 6a4bc3e39f further fixes for 3.0.5 2010-09-06 23:35:14 +00:00
Juergen Hoeller 88e0dcfa06 added MockMultipartFile to web-portlet module 2010-09-06 23:22:03 +00:00
Juergen Hoeller bd05b046d0 reverted shortening of action exception parameter value; fixed multipart test (SPR-7495) 2010-09-06 23:11:11 +00:00
Juergen Hoeller 7e5215b5d4 fixed typo 2010-09-06 22:56:18 +00:00
Juergen Hoeller ba946c08dd copy event parameters to render parameters in case of an action exception as well (SPR-7495) 2010-09-06 22:56:05 +00:00
Juergen Hoeller 3eda5144ae DispatcherPortlet copies all action parameters to render parameters in case of an action exception (SPR-7495); shortened Portlet MVC's action exception render parameter value to "true" 2010-09-06 22:45:31 +00:00
Juergen Hoeller e68f2f0a5f removed unused HandlerExecutionChain caching 2010-09-06 21:44:06 +00:00
Juergen Hoeller 45d9b0cb2d allow for writing the response directly in a Portlet @ExceptionHandler method (like in the Servlet equivalent) 2010-09-06 21:43:26 +00:00
Juergen Hoeller 66b4499973 polishing 2010-09-06 21:20:03 +00:00
Juergen Hoeller e035477e6a extended synchronization for methodResolverCache (SPR-7525) 2010-09-06 20:41:50 +00:00
Juergen Hoeller 479b4c1b84 added bean type to post-processing log statement (SPR-7524) 2010-09-06 20:06:48 +00:00
Juergen Hoeller 05a3f3ad8d avoid failures in case of manually registered null instance (SPR-7523) 2010-09-06 19:47:16 +00:00
Arjen Poutsma b67da6c3f8 Granting Keith's wish 2010-09-03 08:50:45 +00:00
Sam Brannen 0485f15998 Fixed typo 2010-09-01 23:38:51 +00:00
Juergen Hoeller b60a7a2e07 prepared for 3.0.5 2010-09-01 22:24:21 +00:00
Juergen Hoeller e6425ee41f polishing 2010-09-01 22:02:33 +00:00
Juergen Hoeller 0a17e41755 catch invalid arguments early; avoid stack overflow in object-to-collection case (SPR-7488) 2010-09-01 22:02:07 +00:00
Juergen Hoeller 055c343ce0 SpEL supports projection on any kind of Collection (SPR-7493) 2010-09-01 21:55:39 +00:00
Juergen Hoeller 3f68ccadd9 polishing 2010-09-01 18:41:10 +00:00
Juergen Hoeller 4e3227441b DefaultLobHandler's "wrapAsLob" mode works with PostgreSQL's getAsciiStream() requirement (SPR-7487) 2010-09-01 18:09:29 +00:00
Juergen Hoeller e56cfb8173 consistent use of JDK 1.5's ThreadLocal.remove() over ThreadLocal.set(null), preventing leaks (SPR-7441) 2010-09-01 17:17:25 +00:00
Juergen Hoeller 66a5bb7c22 JaxWsPortClientInterceptor does not fall back to annotation-specified name as portName anymore (SPR-7505) 2010-09-01 14:02:32 +00:00
Juergen Hoeller 82bcef037d JDBC bundle uses local ClassLoader as bean ClassLoader for "sql-error-codes.xml" parsing (SPR-7497) 2010-09-01 13:46:57 +00:00
Juergen Hoeller 5ddf8245dd fixed EvalTag's EvaluationContext caching (SPR-7482) 2010-09-01 13:33:45 +00:00
Juergen Hoeller 3e5aca86d5 fixed no-message-received commit case for non-cached Sessions (SPR-7478) 2010-09-01 11:21:40 +00:00
Juergen Hoeller d7e0776148 avoid hanging in case of shutdown errors (SPR-7511) 2010-09-01 11:19:11 +00:00
Arjen Poutsma 416004b1bc Fixing build 2010-08-31 15:48:42 +00:00
Arjen Poutsma 2182287d3e Minor tweaks 2010-08-31 10:46:58 +00:00
Arjen Poutsma e3298061d2 Added createCustomStaxSource/Result, because JAXP 1.4 kills babies in their sleep. 2010-08-31 09:51:59 +00:00
Arjen Poutsma 9aafa1c6b2 Various StAX improvements. 2010-08-27 11:35:27 +00:00
Chris Beams b72cca5403 Fix memory leak in serializable bean factory management (SPR-7502)
GenericApplicationContext and AbstractRefreshableApplicationContext
implementations now call DefaultListableBeanFactory.setSerializationId()
only upon successful refresh() instead of on instantiation of the
context, as was previously the case with GAC.

DLBF.setSerializationId() adds the beanFactory to the *static*
DLBF.serializableFactories map, and while calling close() on the
application context removes entries from that map, it does so only if
the context is currently active (i.e. refresh() has been called).

Also, cancelRefresh() has been overridden in GAC just as it has been
in ARAC to accomodate the possibility of a BeansException being thrown.
In this case, the beanFactory serializationId will be nulled out and
the beanFactory removed from the serializableFactories map.

The SerializableBeanFactoryMemoryLeakTests test case provides full
coverage of these scenarios.
2010-08-27 10:53:20 +00:00
Arjen Poutsma d0f13b5beb SPR-7490 - Reverting RedirectView to it's 3.0.3 version 2010-08-25 09:00:09 +00:00
Arjen Poutsma 4504ab8bc2 SPR-7316 - writeAcceptCharset now also set to false when using mvc namespace. 2010-08-23 14:53:00 +00:00
Ben Hale 7730e76c06 Publishing license and notice files 2010-08-23 13:17:31 +00:00
Arjen Poutsma dbfa049e1e Prepping for 3.0.5 2010-08-19 11:04:04 +00:00
Arjen Poutsma 9f05f28727 Prepping for 3.0.5 2010-08-19 10:55:41 +00:00
Juergen Hoeller a9da123259 temporarily disabled constructor argument caching for converted values (SPR-7423) 2010-08-19 09:30:04 +00:00
Arjen Poutsma 001d676dec SPR-7471 - Regression in redirect URL encoding 2010-08-19 08:54:42 +00:00
Arjen Poutsma 061b2c91a0 SPR-7474 - AbstractXmlStreamReader getAttributeValue(String, String) does not handle null namespaceURI properly 2010-08-19 07:53:48 +00:00
Chris Beams 9ab2c6628b Split IoC chapter DocBook XML into multiple files (SPR-7467)
All <section/> elements in beans.xml >=~ 500 lines have been broken out
into separate documents with DOCTYPE 'section'. This refactoring makes
working with these files much easier in wysiwyg editors (namely
oXygen Author).

For consistency, this same refactoring should be applied to all other
chapters much larger than 1500 lines, such as aop.xml (3861), mvc.xml
(3466), jdbc.xml (3042), and so on.

beans.xml and the new section files have also been formatted for
consistency and to avoid whitespace diffs as much as possible into the
future.
2010-08-18 10:37:35 +00:00
Juergen Hoeller 2f980d95ff final preparations for 3.0.4 release 2010-08-18 09:13:10 +00:00
Juergen Hoeller 9857ba077b revised constructor argument caching for highly concurrent creation scenarios (follow-up to SPR-7423) 2010-08-18 09:08:55 +00:00
Chris Beams 9a088b8128 Document BeanFactoryPostProcessor implementation constraints (SPR-7466)
JavaDoc and reference docs now warn developers against interacting with
bean instances within BeanFactoryPostProcessor implementations in order
to avoid premature bean instantiation.

See SPR-7450 for an example of a third-party BFPP
(OAuthTokenLifecycleRegistryPostProcessor) prematurely instantiating
a FactoryBean instance, such that bean post-processing is bypassed
and autowired injection (via @Inject) never occurs.
2010-08-17 09:50:22 +00:00
Juergen Hoeller e4792aaf33 polishing 2010-08-16 21:24:21 +00:00
Juergen Hoeller b58e19b04c polishing 2010-08-16 20:39:28 +00:00
Juergen Hoeller 48869a86cc consistent converting and escaping of label values (following AbstractMultiCheckedElementTag's SPR-7174) 2010-08-16 20:39:14 +00:00
Juergen Hoeller a032ce12cb renamed "mapping-order" to "order"; added "cache-period" 2010-08-16 19:04:51 +00:00
Juergen Hoeller ecb351c475 return 404 in case of no media type found 2010-08-16 19:02:12 +00:00
Juergen Hoeller b51f067f74 @MVC handler method resolution 2010-08-15 23:51:01 +00:00
Juergen Hoeller 9b3fbc2333 WebDataBinder and @MVC request param binding detect and introspect MultipartFile arrays as well (SPR-2784) 2010-08-15 23:20:55 +00:00
Juergen Hoeller ee04046ed7 polishing 2010-08-15 23:04:19 +00:00
Juergen Hoeller 3cf22a0255 lazy creation of MessageFormats 2010-08-15 23:04:02 +00:00
Juergen Hoeller 0aec5efb56 polishing 2010-08-15 23:01:10 +00:00
Juergen Hoeller 5c3cf5f672 added testStringArrayToResourceArray 2010-08-15 23:00:46 +00:00
Juergen Hoeller d1afb29074 Servlet/PortletContextResource inherit isReadable, contentLength and lastModified from AbstractFileResolvingResource 2010-08-15 22:57:37 +00:00
Juergen Hoeller b2b1ff60dd CommonsMultipartResolver cleans up all multipart files in case of multiple files for same name as well (SPR-2784) 2010-08-15 22:52:54 +00:00
Juergen Hoeller 255d1ad434 WebDataBinder and @MVC request param binding detect and introspect MultipartFile arrays as well (SPR-2784) 2010-08-15 22:51:02 +00:00
Juergen Hoeller 5b0448c609 MockMultipartHttpServletRequest pre-defines method "POST" and content type "multipart/form-data" 2010-08-15 22:46:15 +00:00
Juergen Hoeller 1841b14b21 consistent mocks between modules 2010-08-15 22:02:40 +00:00
Juergen Hoeller 19fcbeafb4 renamed UriUtilsTest to UriUtilsTests 2010-08-15 22:01:33 +00:00
Juergen Hoeller ace7b072f1 fixed accidental change to byte array loop 2010-08-15 21:43:24 +00:00
Juergen Hoeller fd159246ed polishing 2010-08-15 21:26:43 +00:00
Juergen Hoeller 2516bc0faf polishing 2010-08-15 21:24:35 +00:00
Juergen Hoeller 3963ff6e3b use generic Class<?> in TransactionAttributeSource signature 2010-08-15 21:19:52 +00:00
Juergen Hoeller a5b30fd074 polishing 2010-08-15 21:17:39 +00:00
Juergen Hoeller 35971f9f90 revised handler method resolution, in particular with respect to generic interfaces (SPR-7355) 2010-08-15 21:12:54 +00:00
Juergen Hoeller 49a2970def search super-interfaces as well (SPR-7355) 2010-08-14 21:12:58 +00:00
Juergen Hoeller 665a997f66 refined exception messages; added unit tests for custom array types 2010-08-14 19:42:29 +00:00
David Syer 5109501d16 SPR-7463: switched to instance variable 2010-08-14 11:09:42 +00:00
Juergen Hoeller e27f4b1577 revised DispatcherServlet's last-modified handling to properly work with scoped controllers 2010-08-12 23:32:53 +00:00
Juergen Hoeller f8690cf791 DispatcherServlet etc 2010-08-12 22:55:12 +00:00
Juergen Hoeller f6c07b371f revised DispatcherServlet's last-modified handling to properly work with scoped controllers; added HEAD support to ResourceHttpRequestHandler 2010-08-12 22:54:24 +00:00
Juergen Hoeller 29b12adbaa revised web scoping tests 2010-08-12 22:49:26 +00:00
Juergen Hoeller a79c015297 refined logging of handler objects in order to avoid early access to scoped proxies (SPR-7456) 2010-08-12 22:14:20 +00:00
Juergen Hoeller 01b65cd201 polishing 2010-08-12 18:49:13 +00:00
Juergen Hoeller 61fcef1471 polishing 2010-08-12 18:42:13 +00:00
Juergen Hoeller 34ebad5fff fixed JSP EvalTag to render null result as empty String instead of "null" String (SPR-7459) 2010-08-12 18:41:24 +00:00
Juergen Hoeller 9bd0bd9c3a SpringTemplateLoader supports last-modified timestamp through Resource abstraction (SPR-7454) 2010-08-12 10:56:28 +00:00
Juergen Hoeller 99733aef2a introspect superclass when given a CGLIB proxy as target class (SPR-7448); use generic Class<?> in TransactionAttributeSource signature 2010-08-11 21:47:50 +00:00
Juergen Hoeller 8a23ce917a Spring's constructor resolution consistently finds non-public multi-arg constructors (SPR-7453) 2010-08-11 19:24:30 +00:00
Arjen Poutsma 6e303d25c4 SPR-7427 - URL in a redirect is not escaped by RedirectView 2010-08-11 11:44:44 +00:00
Arjen Poutsma ac1d2d93d6 SPR-7439 - JSON (jackson) @RequestBody marshalling throws awkward exception 2010-08-11 08:16:12 +00:00
Chris Beams b90260f8d2 Link to Spring Integration at end of event coverage 2010-08-11 06:36:00 +00:00
Chris Beams 258a47435d Remove XFire reference documentation (SPR-7434)
XFire is now CXF (per http://xfire.codehaus.org), and given that Spring
does not actually ship with any explicit XFire support, it makes sense
to remove the documentation completely.  CXF does provide support for
writing services with Spring, and they provide their own documentation.

See http://cxf.apache.org/docs/writing-a-service-with-spring.html
2010-08-10 23:10:35 +00:00
Juergen Hoeller 1503a139e2 fixed yet another regression with respect to newlines (SPR-7449) 2010-08-10 22:36:36 +00:00
Chris Beams 3d2dd447af Remove Chapter 27 from reference documentation (SPR-7433)
Chapter 27 covered @Required and RequiredAnnotationBeanPostProcessor but
did not hold together as a chapter unto itself.  The IoC chapter already
makes mention of @Required and RequiredAnnotationBeanPostProcessor,
though not in quite as much detail as Chapter 27 did.  Links have been
updated throughout to reference these sections and Chatper 27 has been
eliminated entirely.
2010-08-10 22:13:55 +00:00
Chris Beams abf523698c Apply parentheses consistently within <methodname/>
Prior to change, there were 175 instances of <methodname/> elements
including parentheses (e.g.: <methodname>foo()</methodname>, and
36 instances without.

Now all 211 instances include parentheses for consistency.
2010-08-10 22:13:50 +00:00
Sam Brannen e3400f77c9 [SPR-7449] @Ignore'd failing test for regression in ResourceDatabasePopulator. 2010-08-10 21:51:35 +00:00
Chris Beams 9008cf907a Overhaul custom ApplicationEvent documentation (SPR-7422, SPR-7395)
Documentation now:

- Reflects generic use of ApplicationListener interface

- Demonstrates use of ApplicationEventPublisher(Aware) instead of
  ApplicationContext(Aware) for publishing custom events

- Provides a more complete narrative as to how each of the publisher,
  listener, and event objects interact with one another
2010-08-10 20:59:36 +00:00
Chris Beams 720f7ecf48 Polish validation chapter program listings
<programlisting/> elements must contain no newlines at beginning or end.
The following is an example of what not to do:

    <programlisting><![CDATA[
package com.foo.bar;

class XFoo implements Foo<X> {
}]]>
    </programlisting>

This leaves newlines at the beginning and end of the programlisting
panel within the PDF. Instead, do it like this:

    <programlisting><![CDATA[package com.foo.bar;

class XFoo implements Foo<X> {
}]]></programlisting>
2010-08-10 13:48:48 +00:00
Chris Beams 87caa13363 Clarify ConversionServiceFactoryBean documentation (SPR-7362)
- The sentence at the end of section 5.5.5 now refers to the
  <mvc:annotation-driven conversion-service="..."/> example at the end
  of section 5.6.

- The sentence at the end of section 5.5.5 refers to the
  FormatterConversionServiceFactoryBean section that follows.
2010-08-10 13:48:44 +00:00
Chris Beams cecee4d02b Fix typo in validation chapter 2010-08-10 13:48:41 +00:00
Chris Beams f45bb92917 Format validation chapter docbook source 2010-08-10 13:48:34 +00:00
Chris Beams 73ec840279 Remove dependency-check coverage from reference docs (SPR-7303)
- 'dependency-check' attribute of the <bean/> element was removed
  in the spring-beans-3.0 XSD; documentation now reflects this change.

- 'autodetect' was removed from the enumeration of possible values
  for autowire mode in the spring-beans-3.0 XSD; documentation now
  reflects this change.

Note that the underlying functionality for these values has not been
removed from Spring Core.  Users of Spring 3.0 who still need this
support may choose to use spring-beans-2.5.xsd in order to preserve
backward-compatibility.
2010-08-10 13:48:26 +00:00
Juergen Hoeller 771db05608 changed contentLength() from int to long 2010-08-09 15:58:07 +00:00
Juergen Hoeller e250ff0fb4 fixed package-info 2010-08-08 23:31:48 +00:00
Juergen Hoeller b4cd58394a revised ResourceHttpRequestHandler (SPR-7116) 2010-08-08 23:25:49 +00:00
Juergen Hoeller bda3d81bc9 implement file resolution for isReadable() as well 2010-08-08 23:21:41 +00:00
Juergen Hoeller 2b4e714c68 Resource refinements, etc 2010-08-08 23:00:30 +00:00
Juergen Hoeller 82730830d1 added "contentLength()" method to Resource abstraction; URL-based Resource variants introspect "last-modified" and "content-length" response headers (SPR-5465); refined "exists()" check for UrlResource (HEAD request) and ClassPathResource (URL resolution) 2010-08-08 22:53:52 +00:00
Chris Beams f5b0edbebd Typo fix 'a enterprise' -> 'an enterprise' 2010-08-07 22:47:32 +00:00
Juergen Hoeller 48874801a3 fixed accidental regression with respect to newlines 2010-08-07 18:02:51 +00:00
Juergen Hoeller 58b07f586d SpEL passes full collection type context to ConversionService (SPR-7410) 2010-08-07 17:54:23 +00:00
Juergen Hoeller 7cddb1c50e polishing 2010-08-07 16:52:16 +00:00
Juergen Hoeller a8133a9917 ignore empty statements (SPR-7363) 2010-08-07 16:52:05 +00:00
Chris Beams bf4b9f5ffb Replace 'Java EE' with 'enterprise Java' as appropriate
Also change 'JEE' -> 'Java EE'
2010-08-07 14:47:17 +00:00
Chris Beams 0625990020 Add missing equals sign to code snippet (SPR-7339) 2010-08-07 13:57:28 +00:00
Chris Beams e116a29795 Change 'lastName*' -> 'lastName' for error display (SPR-7339)
It's not clear why the asterisk would be necessary, as 'lastName'
alone should match all errors associated with that field.
2010-08-07 13:57:26 +00:00
Chris Beams d97f899bee Fix typos (SPR-7339) 2010-08-07 13:57:23 +00:00
Chris Beams 5ce4cada53 Fix typos in Chapter 27 (SPR-7339)
Note that SPR-7433 has also been created to consider removing this
chapter entirely.
2010-08-07 13:57:18 +00:00
Chris Beams b87b23087d Replace 'recourse' with simpler terms (SPR-7339) 2010-08-07 13:57:16 +00:00
Chris Beams bab902e85b Fix typo 'type form'->'type from' (SPR-7339) 2010-08-07 13:57:14 +00:00
Chris Beams 5e64f228b6 Consistently refer to 'default no-arg constructor' (SPR-7339) 2010-08-07 13:57:12 +00:00
Chris Beams edad222e6a Distinguish JMS remoting from JMS messaging support (SPR-7339) 2010-08-07 13:57:09 +00:00
Chris Beams 91172f4f43 Clarify ServletException is thrown when no view is resolved (SPR-7339) 2010-08-07 13:57:07 +00:00
Chris Beams 3a9fc70f91 Add @Repository use to JdbcTemplate Best Practices (SPR-7339) 2010-08-07 13:57:03 +00:00
Chris Beams 30b0e5e250 Improve explanation re DAOs and persistence resources (SPR-7339) 2010-08-07 13:57:01 +00:00
Chris Beams 55f2fe7dd5 Replace 'tropes' language (SPR-7339) 2010-08-07 13:56:58 +00:00
Chris Beams d109879b6c Ignore OS X .DS_Store files 2010-08-07 13:56:49 +00:00
Juergen Hoeller 4af36454ba PortletWrappingController supports Portlet 2.0 resource and event requests as well (SPR-7430) 2010-08-07 11:47:32 +00:00
Juergen Hoeller 753cda3d81 Portlet AbstractController consistently uses session mutex if "synchronizeOnSession" is active 2010-08-07 11:46:15 +00:00
Juergen Hoeller b054ca4a48 reintroduced createInstance() template method in deprecated form (SPR-7428) 2010-08-07 11:16:46 +00:00
Juergen Hoeller 9ef47b82a5 added missing setter method for the "valueSeparator" property (SPR-7429) 2010-08-07 11:03:49 +00:00
Jeremy Grelle 103297cf59 SPR-7116 - Added documentation for <mvc:default-servlet-handler> 2010-08-03 16:14:37 +00:00
Michael Isvy 6adf8d18df SPR-7416
Typo on the name of the @Autowired annotation:  @Autowire -> @Autowired
Usage of the @Value annotation: ${jdbcProperties.url} -> ${jdbc.url} (inside section "Declaring @Configuration classes as plain Spring <bean/> elements").
2010-08-03 07:14:29 +00:00
Jeremy Grelle 8e77701358 SPR-7116 - Added documentation for <mvc:resources> 2010-08-03 01:23:24 +00:00
Jeremy Grelle c1246d506c SPR-7116 - javadocs 2010-08-02 22:37:14 +00:00
Juergen Hoeller af0fac9099 JaxWsPortProxyFactoryBean takes "wsdlDocumentUrl", "namespaceUri" etc defaults from @WebService (SPR-7412) 2010-08-02 21:44:14 +00:00
Jeremy Grelle 367048c5d1 SPR-7116 - Simplified (removed gzip and white-listing) and completed XML namespace config. 2010-07-31 01:09:40 +00:00
Juergen Hoeller 061af2f25f ultimateTargetClass falls back to raw class instead of returning null 2010-07-30 15:13:38 +00:00
Juergen Hoeller faad0f4bb1 AutodetectCapableMBeanInfoAssembler signature consistently refers to Class<?> (SPR-7405) 2010-07-29 20:29:32 +00:00
Juergen Hoeller c3a639f07d fixed concurrency issue in TypedStringValue, showing for nested typed Maps in prototype beans (SPR-7398); optimized building of keyed arg names in BeanDefinitionValueResolver 2010-07-29 13:49:09 +00:00
Jeremy Grelle bd4f4d0d30 SPR-7116 further work in progress. Added white-listing by media type, checking MIME type from the ServletContext, and some additional validations. 2010-07-29 00:01:13 +00:00
Juergen Hoeller 3e0003a1a0 TaskExecutorFactoryBean (as used by task:executor) exposes full ThreadPoolTaskExecutor type (SPR-7403) 2010-07-28 17:39:03 +00:00
Jeremy Grelle 60a69bd653 SPR-7116 work in progress. ResourceHttpRequestHandler is now functionally equivalent to the Spring JS ResourceServlet, with the exception of the resource concatenation feature (which will be deferred for reconsideration in 3.1). 2010-07-27 04:45:43 +00:00
Juergen Hoeller 72da237474 FilterDefinitionFactoryBean supports Hibernate 3.6.0.beta1 as well 2010-07-27 00:04:23 +00:00
Juergen Hoeller d3cb310962 bunch of fixes for 3.0.4 2010-07-26 21:03:55 +00:00
Juergen Hoeller d4f73c1d3d turned TypeDescriptor.UNKNOWN into an internal detail (SPR-7349) 2010-07-26 20:55:14 +00:00
Juergen Hoeller 3c0ce48cbd added further test case for property type detection with generic interface 2010-07-26 20:39:27 +00:00
Juergen Hoeller 8e5c033446 avoid double ConversionFailedException nesting 2010-07-26 20:33:34 +00:00
Juergen Hoeller f04febaf2d fixed @PathVariable regression in combination with ConversionService usage on DataBinder 2010-07-26 20:14:57 +00:00
Juergen Hoeller b261d336b1 HibernateJpaDialect correctly closes borrowed connections even for nested JDBC executions (SPR-7393) 2010-07-26 12:33:37 +00:00
Arjen Poutsma 8519a2d705 Fixed execute -> exchange 2010-07-26 08:00:43 +00:00
Juergen Hoeller f90125f984 fixed WeakReferenceMonitor to never stop its monitoring thread if an entry has been registered (SPR-7373) 2010-07-23 18:18:16 +00:00
Juergen Hoeller 18af8a00f9 added license header 2010-07-23 10:09:33 +00:00
Juergen Hoeller b7b7c067c6 GenericTypeResolver works for nested parameterized types and for generic superclasses as well (SPR-7389) 2010-07-22 15:57:55 +00:00
Arjen Poutsma 60fa490b50 Typo 2010-07-22 09:31:01 +00:00
Chris Beams 605ac0e230 Remove redundant @Aspect from CodeStyleAspect.aj
This has been present for quite some time, and compilation at the
command line was never a problem.  However, after upgrading to
STS 2.3.3.M2, errors started appearing in the Problems tab about
'duplicate @Aspect annotations'.  This message was a bit misleading
given that the underlying issue is that applying an @Aspect annotation
on an aspect declared in .aj style is redundant.  Andy Clement is
investigating as well, but for now the reason for the change in behavior
remains a mystery.
2010-07-21 19:18:11 +00:00
Juergen Hoeller 7304c09021 Spring field error arguments include actually declared annotation attributes in alphabetical order (SPR-6730) 2010-07-21 14:24:10 +00:00
Chris Beams 9bcfc5480d Fix dependency issues in .context pom and .classpath
Hibernate validator had been updated to 4.1.0 in the ivy metadata, but
not yet reflected in the .classpath file.  The pom.xml had been updated
but there was a typo - scope read 'coompile', instead of 'compile'.
2010-07-21 12:04:06 +00:00
Chris Beams 022e74ea3d Add .springBeans to .gitignore 2010-07-21 12:04:03 +00:00
Juergen Hoeller 4d5a9c41e0 allow for converting a property value based on the corresponding property name (SPR-7386) 2010-07-21 11:17:44 +00:00
Juergen Hoeller 11886f2149 polishing 2010-07-20 20:02:43 +00:00
Juergen Hoeller 1dce03af78 JSR-303 Pattern message resolvable through Spring MessageSource (despite special characters; SPR-7329) 2010-07-20 20:02:23 +00:00
David Syer 3afe8aee18 Fix hibernate-validatin version 2010-07-20 15:41:41 +00:00
David Syer e26fc66523 SPR-7384: switch to using 1-12 for month numbers 2010-07-20 15:25:00 +00:00
Arjen Poutsma c24ffc9175 SPR-7381 - HTTP headers returned as part of ResponseEntity(MultiValueMap<String, String> headers, HttpStatus statusCode) are ignored when using this constructor 2010-07-16 13:47:19 +00:00
Arjen Poutsma 228c0b18cb SPR-7345 - HTTP 405 (Method not supported) returned when 404 Status (Not Found) was expected 2010-07-16 10:06:19 +00:00
Juergen Hoeller b456bc107b DefaultMessageListenerContainer triggers Session commit even if no message has been received (SPR-7366) 2010-07-15 19:43:56 +00:00
Juergen Hoeller f25a04c69c fixed JMS CachingConnectionFactory to correctly cache a producer without fixed destination as well (SPR-7148) 2010-07-15 17:05:30 +00:00
Arjen Poutsma f8425a5f7b SPR-7346 - @RequestHeader negation expressions (e.g. !Accept=text/plain) are not applied 2010-07-15 08:49:18 +00:00
Juergen Hoeller dcad6c341b BeanWrapper, EvalTag, etc 2010-07-12 21:05:30 +00:00
Juergen Hoeller 66abad2540 BeanWrapper preserves annotation information for individual array/list/map elements (SPR-7348) 2010-07-12 20:56:22 +00:00
Juergen Hoeller e0e1cb3c24 polishing 2010-07-12 19:54:37 +00:00
Juergen Hoeller df5e9b1211 MVC HandlerExceptionResolvers prevent caching for exception views if preventResponseCaching=true (SPR-7334) 2010-07-12 19:54:05 +00:00
Juergen Hoeller 263fabb0fc JSP EvalTag resolves "@myBeanName" references in expressions against the WebApplicationContext (SPR-7312); for consistency, expressions in an ApplicationContext support the same syntax against the local BeanFactory 2010-07-12 19:36:26 +00:00
Juergen Hoeller d1d5e2d52a JmsResourceHolder does not ignore IllegalStateException from locally synchronized transaction (SPR-7360) 2010-07-08 12:15:35 +00:00
Juergen Hoeller 96b9cf6ca9 DefaultJdoDialect supports JDO 3.0 query timeout facility (as supported by DataNucleus 2.1) 2010-07-08 11:47:30 +00:00
Juergen Hoeller 3918518779 polishing 2010-07-08 11:45:52 +00:00
Juergen Hoeller 7e9e8401f7 @ExceptionHandler works for inherited method and CGLIB proxies on Portlet controllers as well (SPR-7337) 2010-07-08 11:45:35 +00:00
Andy Clement cb72fe1be2 SpEL documentation (!) on @Bean referencing, inline lists and array construction 2010-07-06 21:40:25 +00:00
Andy Clement f5ced9be38 SPR-7335: support for expression inline lists and array construction 2010-07-06 21:00:54 +00:00
Andy Clement 88560fd910 SPR-7343: StandardEvaluationContext not threadsafe in its lazy initialization 2010-07-02 16:08:25 +00:00
Andy Clement 6de707d8e0 polish 2010-07-02 16:07:13 +00:00
Andy Clement 0c1424acb6 polish 2010-07-02 16:06:59 +00:00
Juergen Hoeller 0d405fd124 fixed typos (SPR-7332) 2010-06-29 10:22:49 +00:00
Chris Beams 45ed0ba43c licensing header 2010-06-28 23:20:44 +00:00
Chris Beams cd271fca43 attempted to repro SPR-7318 to no avail 2010-06-28 22:57:26 +00:00
Juergen Hoeller 3f31a1cf75 added "validationMessageSource" property to LocalValidatorFactoryBean, for Spring-based messages (SPR-7307) 2010-06-28 22:08:31 +00:00
Juergen Hoeller 4d56b89619 transaction names based on method id from most specific method (target class instead of interface; SPR-7317) 2010-06-28 19:47:13 +00:00
Juergen Hoeller f9017ea05d added formCheckbox to macro list (SPR-7322) 2010-06-28 18:23:56 +00:00
Juergen Hoeller ce6194c7c3 fixed typo (SPR-7321) 2010-06-28 18:18:26 +00:00
Sam Brannen 8bd0633697 [SPR-7323] SpEL 'select last' operator now works consistently with maps. 2010-06-26 21:13:02 +00:00
Sam Brannen db7531be60 [SPR-7323] SpEL 'select last' operator now works consistently with maps. 2010-06-26 21:10:20 +00:00
Costin Leau 94292cad1c SPR-6819
+ fix EBR pom as well
2010-06-25 09:32:29 +00:00
Arjen Poutsma 8d5662ec7a typo 2010-06-24 11:52:44 +00:00
Arjen Poutsma c059f53823 SPR-7305 - o.s.http.client.SimpleClientHttpRequestFactory does not allow to specify a java.net.Proxy 2010-06-24 11:42:28 +00:00
Arjen Poutsma 3160ddf0e8 SPR-7314 - RestTemplate does not handle null uri template parameters 2010-06-24 09:33:06 +00:00
Arjen Poutsma ccdd1a9efd SPR-7316 - remove "Accept-Charset" header from response, generated by @ResponseBody 2010-06-24 09:15:50 +00:00
Juergen Hoeller d956da2fa1 ConversionService etc 2010-06-23 21:55:30 +00:00
Juergen Hoeller 9e4140e549 growCollection fails for element type Object as well; prefer use of getElementTypeDescriptor() 2010-06-23 21:00:28 +00:00
Juergen Hoeller 942c656970 removed eager skipping of empty collection conversion, for UtilNamespaceHandlerTests to pass again 2010-06-23 20:05:00 +00:00
Juergen Hoeller 7faf4a6713 AbstractJaxWsServiceExporter supports "bindingType" bean property, overriding @BindingType; AbstractJaxWsServiceExporter supports "webServiceFeatures" bean property on JAX-WS 2.2 2010-06-23 19:55:47 +00:00
Juergen Hoeller 41d6f8e9ed turned formatter implementations non-final 2010-06-23 19:34:29 +00:00
Juergen Hoeller 0d7ce3eac5 refined ignoreUnresolvablePlaceholders javadoc 2010-06-23 19:33:03 +00:00
Juergen Hoeller e6b708376d skip collection conversion early if empty 2010-06-23 19:32:29 +00:00
Juergen Hoeller 8f8fc97b79 fixed test failures with respect to null handling and PropertyTypeDescriptor usage for collection elements 2010-06-23 19:31:51 +00:00
Juergen Hoeller 27b04036a9 ConversionService is able to deal with empty collections and nested collections (fixed regression; SPR-7289, SPR-7293); ConversionService properly handles nested Resource arrays in Map values (fixed regression; SPR-7295); ConversionService does not accidentally use copy constructor for same type (SPR-7304) 2010-06-23 17:29:34 +00:00
Juergen Hoeller 7f91153bba BeanWrapper/DataBinder's "autoGrowNestedPaths" works for Maps as well (SPR-7285) 2010-06-23 17:27:37 +00:00
Juergen Hoeller 5d6937bab1 Portlet @MVC's implicit render model will be updated at the end of the event phase 2010-06-23 17:24:28 +00:00
Juergen Hoeller ef3b70d40a Spring's MessageEndpointFactory classes are now JCA 1.6 compliant as well 2010-06-23 17:23:11 +00:00
Keith Donald ab13e9b5ec mvc resources handler initial commit 2010-06-22 21:36:45 +00:00
Keith Donald 5a1bd20864 mvc resources handler initial commit 2010-06-22 21:26:03 +00:00
Oliver Gierke e11a40f809 SPR-7311 - Clarify usage of PropertyEditorRegistrars VS. plain configuration of customEditors property in CustomEditorConfigurer JavaDoc. 2010-06-22 12:41:59 +00:00
Oliver Gierke 868d3a4451 Fixed language attribute in code sample to activate currently missing syntax highlighting. 2010-06-22 12:41:55 +00:00
Andy Clement 569cb91573 javadoc fix 2010-06-21 22:13:49 +00:00
Sam Brannen 32167790b0 Fixed "of the Spring" text and reformatted. 2010-06-21 20:37:08 +00:00
Juergen Hoeller 20ea69e06b prepared for 3.0.4 release 2010-06-20 19:38:29 +00:00
Juergen Hoeller b2204ec94e @CookieValue returns decoded cookie value in a Servlet environment (SPR-7286) 2010-06-20 19:21:00 +00:00
Juergen Hoeller de06de11fe fixed order 2010-06-20 19:11:51 +00:00
Juergen Hoeller 07e9f1775b added test for invalid binding to ClassLoader 2010-06-20 19:11:36 +00:00
Juergen Hoeller d49c067770 DispatcherServlet applies view name translation to error views as well (SPR-7298) 2010-06-20 19:06:56 +00:00
Juergen Hoeller 89fadb987c mvc:annotation-driven reliably detects JSR-303 and JAXB2 in an OSGi environment as well (SPR-7291) 2010-06-20 18:55:21 +00:00
Juergen Hoeller 037c277351 @MVC handler methods reliably resolve MultipartRequest arguments with HiddenHttpMethodFilter (SPR-7296) 2010-06-20 18:45:42 +00:00
Juergen Hoeller 5e5a8a09cf Jaxb2Marshaller's "marshallerProperties" Map accepts any value type (SPR-7292) 2010-06-20 18:28:07 +00:00
Juergen Hoeller 91560774a0 accept any EHCache 2.x version as well (SPR-7302) 2010-06-20 18:19:51 +00:00
Arjen Poutsma b31c34ed7d Upgrading version to 3.0.4 2010-06-15 14:18:29 +00:00
Juergen Hoeller 7b189d1124 avoid ConverterNotFoundException if source object is assignable to target type 2010-06-15 09:35:39 +00:00
Costin Leau bd88bbab4a SPR-6819
changed JPA dependency to provided
2010-06-15 06:33:20 +00:00
Oliver Gierke 420f8237c0 Rollback accidental commit :/. 2010-06-15 05:33:39 +00:00
Oliver Gierke 897aab9f59 Added missing imports.
Added additional annotation to test interface to make sure no ClassCastException appears.
2010-06-15 05:29:48 +00:00
Oliver Gierke a383633630 Added helper methods to access method parameter annotations. 2010-06-15 05:29:45 +00:00
Juergen Hoeller 4a0c2f8879 final touches for 3.0.3 2010-06-14 23:27:15 +00:00
Juergen Hoeller 0e59fc4a15 smarter guessing of the element type (SPR-7283) 2010-06-14 23:26:44 +00:00
Juergen Hoeller 96b1dc9db4 ConversionService fully supports conversion from String to MediaType now (through 'valueOf'; SPR-7282); revised exception handling in ObjectToObjectConverter, avoiding InvocationTargetExceptions 2010-06-14 23:23:49 +00:00
Juergen Hoeller 902938e95f smarter guessing of the element type (SPR-7283) 2010-06-14 22:58:18 +00:00
Juergen Hoeller 379bc5a8a6 properly support void.class in TypeDescriptor and GenericConversionService (SPR-7281) 2010-06-11 21:40:56 +00:00
Juergen Hoeller cbb90236dc polished VFS support (SPR-7197) 2010-06-11 19:54:58 +00:00
Juergen Hoeller 53ed9b282b added warnings regarding accidental usage of @Configurable on a managed bean (SPR-7216) 2010-06-11 13:48:52 +00:00
Juergen Hoeller 3d3f8f3219 added explicit section on autodetecting aspects through component scanning (SPR-7246) 2010-06-11 13:28:14 +00:00
Juergen Hoeller 28a765f32b fixed JExcel example code (SPR-7277) 2010-06-11 10:49:41 +00:00
Juergen Hoeller 65655b949f set Tiles 2.2 ELAttributeEvaluator on RendererFactory as well (SPR-7251) 2010-06-10 22:13:31 +00:00
Juergen Hoeller c8984d2e30 Portlet MVC, etc 2010-06-10 21:49:02 +00:00
Juergen Hoeller 11330baf77 DefaultListableBeanFactory checks for alias circle on registerAlias (avoiding endless loop; SPR-7274) 2010-06-10 21:45:47 +00:00
Juergen Hoeller 433b4eff8f MailSendException includes all messages as failed messages in case of a connect failure (SPR-7245) 2010-06-10 21:06:13 +00:00
Juergen Hoeller 2f4453a99c revised Portlet SessionStatus.setComplete() to avoid re-exposure of attributes in render phase (SPR-6126); shortened implicit model render parameter name to "implicitModel" (SPR-7149) 2010-06-09 20:09:53 +00:00
Arjen Poutsma 65885d1dfd SPR-7263 - TypeMismatchException instead of IllegalArgumentException: argument type mismatch for wrong RequestBody 2010-06-09 10:37:17 +00:00
Arjen Poutsma 723f94fd0e SPR-7263 - TypeMismatchException instead of IllegalArgumentException: argument type mismatch for wrong RequestBody 2010-06-09 10:35:41 +00:00
Juergen Hoeller 2a140addfd added EmbeddedValueResolver support to FormattingConversionServiceFactoryBean (SPR-7087) 2010-06-08 20:40:54 +00:00
Juergen Hoeller eb3a3a6de2 reuse a shared UrlPathHelper instance in order to avoid reinstantiation overhead (SPR-7269) 2010-06-08 14:14:08 +00:00
Juergen Hoeller e12fbd3e2b avoid EntityManager close() exception through isOpen() check (SPR-7215) 2010-06-08 11:06:02 +00:00
Juergen Hoeller 928f5423af avoid EntityManager close() exception through isOpen() check (SPR-7215) 2010-06-08 10:21:05 +00:00
Juergen Hoeller 65622bd546 revised DefaultLifecycleProcessor's handling of circular dependencies to avoid stack overflow (SPR-7266) 2010-06-08 10:08:33 +00:00
Juergen Hoeller 882289b06e getAllInterfacesForClass introspects parent interfaces as well (SPR-7247) 2010-06-08 00:05:31 +00:00
Juergen Hoeller 12cffc68c8 added XmlAwareFormHttpMessageConverter, taking over the 3.0.2-introduced XML multipart support (avoiding a package cycle) 2010-06-07 23:18:34 +00:00
Juergen Hoeller c58f46f056 preparations for 3.0.3 release 2010-06-07 23:01:16 +00:00
Juergen Hoeller 632c0e7c5e added XmlAwareFormHttpMessageConverter, taking over the 3.0.2-introduced XML multipart support (avoiding a package cycle) 2010-06-07 22:59:48 +00:00
Juergen Hoeller 392accd910 introduced EmbeddedValueResolverAware callback interface for convenient placeholder resolution 2010-06-07 22:41:21 +00:00
Juergen Hoeller 8446fd1b26 added assertions for correct postProcess invocation order 2010-06-07 22:36:19 +00:00
Juergen Hoeller 5f9b2db90b turn NotReadablePropertyException into JSR-303 oriented IllegalStateException 2010-06-07 22:30:11 +00:00
Juergen Hoeller 4cef52a86f polishing 2010-06-07 22:21:22 +00:00
Juergen Hoeller de866a0ff6 registerDependentBean resolves to the canonical bean name in order to handle alias references (SPR-7254) 2010-06-07 22:15:20 +00:00
Juergen Hoeller d684e49462 added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB; SPR-7261) 2010-06-07 21:28:05 +00:00
Juergen Hoeller fe1e7f0d6c added "expose-proxy" attribute to aop namespace (enforcing AopContext proxy exposure with CGLIB; SPR-7261) 2010-06-07 21:19:32 +00:00
Oliver Gierke 857faec1f3 SPR-7103 - Added more detailed documentation on ordering of model attribute and BindingResult. 2010-06-07 20:57:55 +00:00
Juergen Hoeller 5b420e20c7 revised TaskScheduler javadoc (SPR-7253) 2010-06-07 20:52:12 +00:00
Juergen Hoeller 78c906caaa JSP HiddenInputTag allows for using common HTML attributes (SPR-7249) 2010-06-07 20:32:52 +00:00
Juergen Hoeller 2ef3a86c4f polishing 2010-06-07 19:23:08 +00:00
Juergen Hoeller 53cdb9dfeb fixed JSP ErrorsTag to avoid invalid "*.errors" id, using form object name as id prefix instead (SPR-7258) 2010-06-07 19:22:53 +00:00
Juergen Hoeller cc238207f9 fixed registerResolvableDependency mechanism to correctly handle non-serializable factory objects (SPR-7264) 2010-06-07 18:08:44 +00:00
Juergen Hoeller 5330dc48aa fixed typo (SPR-7265) 2010-06-07 17:31:37 +00:00
Arjen Poutsma 4764fa53f0 SPR-7259 - ResponseStatus.reason() ignored for @ExceptionHandler methods 2010-06-07 13:33:43 +00:00
Arjen Poutsma f72c431e8a SPR-7257 - AbstractMarshaller incorrectly expects DOMResult to already have a node 2010-06-07 13:15:07 +00:00
Chris Beams 0dc29cb2d3 Added a test to prove that @Qualifier works in conjunction with @Bean methods after some confusion by users that it may not. 2010-06-02 12:58:59 +00:00
Andy Clement 5801af9ef5 SPR-7244: double indexing with a collection of different types of element 2010-05-28 20:31:16 +00:00
Arjen Poutsma d0393ea109 SPR-7233 - ResponseEntity having body, headers and HttpStatus mixed up in responseEntity.getBody() 2010-05-28 08:07:21 +00:00
Juergen Hoeller 75c5405d6f added test for getType against an abstract FactoryBean 2010-05-27 13:45:44 +00:00
Juergen Hoeller 3a5af35d37 CachedIntrospectionResults only caches GenericTypeAwarePropertyDescriptors if fully safe (SPR-7227) 2010-05-27 13:45:21 +00:00
Juergen Hoeller dea5918d66 CronTrigger defensively protects itself against accidental re-fires if a task runs too early (SPR-7004) 2010-05-26 20:35:42 +00:00
Juergen Hoeller 2136b04b65 added limit for parsed SQL cache to NamedParameterJdbcTemplate (SPR-7237); added configurable cache limit to CachingMetadataReaderFactory 2010-05-26 19:35:06 +00:00
David Syer b4af04ba9d SPR-7239: fix CronTrigger 2010-05-26 17:41:54 +00:00
Juergen Hoeller f0777d130f improved toString() 2010-05-26 13:59:20 +00:00
Juergen Hoeller 1532119787 ConversionService is able to apply Converters to interface-based array elements (SPR-7150); a context ConversionService is able to override an ApplicationContext's resource editors (SPR-7079) 2010-05-26 13:58:37 +00:00
Juergen Hoeller 6c6004a93b @Transactional qualifier value matches against @Qualifier annotations on @Bean methods as well (SPR-7232) 2010-05-26 09:46:03 +00:00
Juergen Hoeller b90fa49ebc polishing 2010-05-25 14:23:08 +00:00
Juergen Hoeller bca067abb2 ScheduledTaskRegistrar (as used for @Scheduled processing) properly shuts down its default executor (SPR-6901) 2010-05-25 14:22:49 +00:00
Juergen Hoeller 0c6b38b0b5 DataSourceUtils lets timeout exceptions through even for setReadOnly calls (revised; SPR-7226) 2010-05-25 14:10:28 +00:00
Juergen Hoeller 8800bab8a6 DataSourceUtils lets timeout exceptions through even for setReadOnly calls (revised; SPR-7226) 2010-05-25 13:57:56 +00:00
Juergen Hoeller ed3cb4217d expect user name to be null (SPR-7228) 2010-05-21 15:59:00 +00:00
Juergen Hoeller 66aca1e8b3 expect user name to be null (SPR-7228) 2010-05-21 15:44:10 +00:00
Juergen Hoeller d7f72fbbd4 DataSourceUtils lets timeout exceptions through even for setReadOnly calls (SPR-7226) 2010-05-20 20:58:02 +00:00
Juergen Hoeller 2676771255 parse default elements if they live in the default namespace or if their parent is from another namespace (SPR-7218) 2010-05-20 19:18:34 +00:00
Juergen Hoeller 3cf303cabd prepared for 3.0.3 release 2010-05-20 17:18:40 +00:00
Juergen Hoeller a6d9c90841 refined BeanDefinitionParserDelegate to only parse default elements if they actually live in the default namespace (SPR-7218) 2010-05-20 17:15:56 +00:00
Juergen Hoeller 0390c2b9fe added convenient "checkRefresh" bean property to TilesConfigurer (SPR-7225) 2010-05-20 16:49:53 +00:00
Juergen Hoeller f9736ec3f6 JodaTime 1.3 or higher required (SPR-7222) 2010-05-20 09:12:39 +00:00
Juergen Hoeller 6fe5871e91 check for "org.joda.time.LocalDate" in order to catch JodaTime 1.3 and higher only (SPR-7222) 2010-05-20 08:30:32 +00:00
Juergen Hoeller ecf2d8c5de fixed typos (SPR-7221) 2010-05-20 08:16:49 +00:00
Juergen Hoeller 469e30b507 refined LifecycleProcessor exception handling, properly wrapping a start exception from a bean (SPR-7106) 2010-05-19 19:44:57 +00:00
Oliver Gierke 8a3c56b6d5 Added myself and as author.
Added Dave and me in the copyright holder section, too.
2010-05-19 05:52:51 +00:00
Oliver Gierke 680bfbe718 SPR-7186 Added section on generic advice parameters 2010-05-19 05:52:47 +00:00
Oliver Gierke d600e35157 Fixed year in copyright. 2010-05-19 05:52:44 +00:00
Andy Clement 101d8381ef SPR-7209: parsing poorly formed Elvis expressions 2010-05-18 18:44:40 +00:00
Arjen Poutsma ae56f3a361 SPR-7211 - Extend HttpMessage interface to expose requestURL 2010-05-18 11:12:54 +00:00
Juergen Hoeller de326e5e95 ClassUtils recognizes "void" as primitive type name as well (SPR-7212) 2010-05-18 08:49:09 +00:00
Juergen Hoeller 2c2df7f555 consistent postProcessBeanFactory treatment for BeanDefinitionRegistryPostProcessors (SPR-7167) 2010-05-17 22:40:15 +00:00
Juergen Hoeller 2ad2022058 revised BeanWrapper's exception wrapping to consistently handle ConversionExceptions (SPR-7177) 2010-05-17 21:59:02 +00:00
Chris Beams 57a503b274 BeanDefinitionRegistryPostProcessors' postProcessBeanDefinitionRegistry() method now gets called before postProcessBeanFactory() (SPR-7167) 2010-05-17 16:21:36 +00:00
Arjen Poutsma 0b8140b50d Added DeprecatedBeanWarner 2010-05-17 14:31:48 +00:00
Juergen Hoeller a8ed98255f ServletContextResourcePatternResolver handles "/WEB-INF/lib/*.jar!/**/context.xml" style patterns (SPR-7198) 2010-05-17 12:41:32 +00:00
Juergen Hoeller 738d84f75c filter for duplicate listeners in "getApplicationListeners()" as well (SPR-7204) 2010-05-16 19:08:12 +00:00
Juergen Hoeller 7f24edc3d5 removed ServerSessionMessageListenerContainer coverage 2010-05-16 17:46:28 +00:00
Juergen Hoeller ff4f749adb fixed typos 2010-05-16 17:32:01 +00:00
Costin Leau 578e80c1cf SPR-7197
+ fix template
2010-05-15 09:22:56 +00:00
Costin Leau d9a664a588 SPR-7197
polish :)
2010-05-14 19:34:36 +00:00
Costin Leau e9ecf5d716 SPR-7197
+ removed compile time dependency on JBoss VFS
+ added support for JBoss AS 6.0 / JBoss VFS 3.0.0 infrastructure
2010-05-14 19:29:44 +00:00
Luke Taylor 27be8434f1 Rolled-back accidental .classpath changes 2010-05-14 16:23:48 +00:00
Luke Taylor 3f885d0302 Added DomUtils.getChildElements() method. Also refactored ConfigBeanDefinitionParser.parse() to use it. 2010-05-14 16:07:39 +00:00
Luke Taylor 9f9a27a1d8 SPR-7158: Added missing space in MVC docbook file 2010-05-14 14:04:56 +00:00
Thomas Risberg d22a6f9da9 fixed index test for parameter types (SPR-7199) 2010-05-14 12:52:59 +00:00
Juergen Hoeller 8ccd74b6c8 JSP Radiobutton/CheckboxesTag utilizes PropertyEditor/ConversionService for label rendering (SPR-7174) 2010-05-13 23:07:11 +00:00
Juergen Hoeller ceb668ac6c added getLastTaskInfo() method to StopWatch (SPR-7134) 2010-05-13 22:43:18 +00:00
Juergen Hoeller 68055ba4c9 AsyncAnnotationBeanPostProcessor consistently adds @Async processing as first Advisor in the chain (SPR-7147) 2010-05-13 22:13:29 +00:00
Juergen Hoeller ad5c7aeb31 added "idleConsumerLimit" bean property to DefaultMessageListenerContainer (SPR-7189) 2010-05-13 16:33:55 +00:00
Juergen Hoeller 59d2d35f4a polishing 2010-05-13 14:44:34 +00:00
Juergen Hoeller 103c1aa82f exclude abstract lazy-init beans from MBean exposure as well (SPR-6784) 2010-05-13 14:38:58 +00:00
Juergen Hoeller a1e4f4f406 MVC mappings properly apply even to welcome file entries that forward to a DispatcherServlet (SPR-7143) 2010-05-12 20:15:40 +00:00
Juergen Hoeller fa7472c057 MockHttpServletResponse supports multiple includes (SPR-7188) 2010-05-12 14:07:25 +00:00
Juergen Hoeller bd1b559d47 MockHttpServletResponse supports multiple includes (SPR-7188) 2010-05-12 14:05:21 +00:00
Thomas Risberg 15df7b11d0 added null check for parameter (SPR-7193) 2010-05-12 13:26:03 +00:00
Juergen Hoeller 4955a73047 added support for JAX-WS 2.1 WebServiceFeatures to JaxWsPortClientInterceptor/PortProxyFactoryBean (SPR-5712) 2010-05-12 12:32:03 +00:00
Juergen Hoeller 11bb7264a2 properly return null from getPersistenceUnitInfo again (SPR-7055) 2010-05-12 08:46:55 +00:00
Juergen Hoeller 853eab8b4c setTransactionIsolation on JDBC Connection only called when actually necessary (for PostgreSQL; SPR-7184) 2010-05-11 13:14:53 +00:00
Juergen Hoeller 15fe75b1a1 restored original jms namespace declaration 2010-05-10 21:31:13 +00:00
Mark Pollack dad714710f some infrastructure files for custom schema 2010-05-10 18:33:31 +00:00
Juergen Hoeller 365737b515 CachingConnectionFactory detects destination equality for WebSphere MQ as well (using toString; SPR-7148) 2010-05-07 16:53:59 +00:00
Juergen Hoeller 026523d24b set shared variables with configured ObjectWrapper (SPR-7165) 2010-05-07 15:06:27 +00:00
Andy Clement 2b0655b459 SPR-6941 2010-05-06 00:26:13 +00:00
Andy Clement f53621a86f SPR-7173, SPR-7100 2010-05-05 23:52:01 +00:00
Costin Leau 42cdfbcd89 SPR-7163
SPR-7161
+ update Petclinic references
+ minor corrections
2010-05-05 13:42:46 +00:00
Costin Leau 9919cc976b SPR-7158
+ doc typos
2010-05-04 19:15:09 +00:00
Costin Leau a45d33a158 SPR-7159
+ fix several typos
2010-05-04 18:49:09 +00:00
Juergen Hoeller c0aac20081 further 3.0.3 preparations 2010-05-03 14:47:38 +00:00
Juergen Hoeller b0afa0c472 only retrieve transaction manager bean if necessary (SPR-7153) 2010-05-03 12:51:54 +00:00
Juergen Hoeller 17a1362ed8 BeanDefinitionVisitor/PropertyPlaceholderConfigurer finds and resolves values in arrays as well (SPR-7136) 2010-05-03 12:26:32 +00:00
Arjen Poutsma dd8c18188f SPR-7160 - ShallowEtagHeaderFilter not adding ETag 2010-05-03 08:58:20 +00:00
Costin Leau 159f98728e SPR-7137
+ fixed incorrect message when unregistering services from passed in registries
2010-04-29 14:42:24 +00:00
Arjen Poutsma c1f18582e7 SPR-7117 - Add ability for CNVR to search view names that use file extensions 2010-04-29 11:06:31 +00:00
Arjen Poutsma f8a05da1c9 SPR-7146 - AppEngine : bug with SimpleClientHttpResponse.getHeaders 2010-04-29 09:20:44 +00:00
Arjen Poutsma a910ce68ff SPR-7145 - NullPointerException in AnnotationMethodHandlerAdapter if HttpHeaders in ResponseEntity are empty 2010-04-29 08:04:36 +00:00
Costin Leau aa216672ae SPR-7090
+ fix doc typos
2010-04-28 11:05:08 +00:00
Costin Leau 4ddcd35d13 SPR-6819
+ made JPA dependency implicit since the aspect will always require the JPA classes during the weaving process
2010-04-28 10:41:03 +00:00
Costin Leau 02cc37cc16 + sanitize class names (eliminate trailing .class for dot notation) 2010-04-28 10:33:54 +00:00
Costin Leau 03415960ff + minor doc update regarding Tomcat setup (so the Tomcat list is rendered properly) 2010-04-28 10:29:21 +00:00
Arjen Poutsma c2707150b1 SPR-7135 - org.springframework.http.MediaType#checkParameters fails to process a Content-Type like application/xml;charset="utf-8" 2010-04-27 08:26:51 +00:00
Juergen Hoeller 8ce4037af2 TilesConfigurer's "definitionsFactoryClass" property applies common Tiles DefinitionsFactory setup (SPR-7101) 2010-04-23 10:44:29 +00:00
Juergen Hoeller 101a5cd8ff factored out getRequestDispatcher template method (SPR-7118) 2010-04-22 21:46:56 +00:00
Juergen Hoeller 8df0403e99 further fixes for 3.0.3 2010-04-22 21:39:09 +00:00
Juergen Hoeller 07920fc3df polishing 2010-04-22 21:37:35 +00:00
Juergen Hoeller 87e327773e introduced AopProxyUtils.ultimateTargetClass (SPR-7074) 2010-04-22 21:36:53 +00:00
Juergen Hoeller b28310b051 added default InputSourceEditor for SAX InputSource construction with a URL String as system id (SPR-7099) 2010-04-22 19:02:05 +00:00
Juergen Hoeller 20d3085dc8 polishing 2010-04-22 17:38:49 +00:00
Juergen Hoeller 218ee6d24c added "boolean isRegisteredWithDestination()" method (SPR-7065) 2010-04-22 17:38:37 +00:00
Chris Beams 3f06a92b6b getBean(Class<?>) now filters out bean definitions for which isAutowireCandidate() is false (SPR-7120) 2010-04-22 16:34:36 +00:00
Juergen Hoeller 5057c4a69c DefaultMessageListenerContainer reacts to maxConcurrentConsumers reduction for long-lived tasks (SPR-7075) 2010-04-22 13:27:16 +00:00
Juergen Hoeller 4cab4a7545 introspect decorated definition for getType calls as well (SPR-7006) 2010-04-21 20:06:38 +00:00
Juergen Hoeller 3dbe38e418 added check for WebSphere's compliance mode (SPR-7064) 2010-04-21 18:42:59 +00:00
Michael Isvy c5f83686d2 line 149: fixed a typo.
Tomcat or IBM WebSphere that has itss own -->  Tomcat or IBM WebSphere that has its own
2010-04-21 11:46:26 +00:00
Juergen Hoeller 77074c6c87 property placeholders can deal with nested expressions which happen to use the same suffix (SPR-7098) 2010-04-21 09:22:20 +00:00
Arjen Poutsma 1e34e2725a SPR-7107 - RestTemplate/UriTemplate/UriUtils improperly encoding UTF-8 2010-04-21 07:55:56 +00:00
Costin Leau 7790dedff2 + disable some of the WAS failing tests 2010-04-21 07:38:54 +00:00
Juergen Hoeller 399b388ea5 fixed JSP SelectTag's support for rendering enum constants (SPR-7112) 2010-04-20 16:15:23 +00:00
Costin Leau 5af6d917e9 SPR-7064
+ fix method name
2010-04-20 13:33:16 +00:00
Costin Leau ea9eb853fa SPR-7064
+ added unit tests for WAS with complaint setting
2010-04-20 13:32:02 +00:00
Costin Leau 05360c095c SPR-7064
+ unit tests containing the differences between WAS and Tomcat
2010-04-20 12:12:57 +00:00
Juergen Hoeller 1ed05eceb9 remove trailing servlet path slash on WebSphere only (SPR-7064) 2010-04-20 11:43:20 +00:00
Juergen Hoeller 69c4cdf975 remove trailing servlet path slash on WebSphere only (SPR-7064) 2010-04-20 11:15:47 +00:00
Arjen Poutsma 3f6cc3f552 Added more tests. 2010-04-20 10:03:05 +00:00
Keith Donald e21a1c5a61 polish 2010-04-19 20:35:57 +00:00
Keith Donald 86906d1b4d checking in performance tests 2010-04-19 20:22:01 +00:00
Keith Donald 6e13cc9eaa thread safety for caching 2010-04-19 19:22:35 +00:00
Arjen Poutsma b25462ddf9 SPR-7107 - RestTemplate/UriTemplate/UriUtils improperly encoding UTF-8 2010-04-19 08:28:10 +00:00
Keith Donald e60389283d caching optmizations and performance tests 2010-04-19 03:58:28 +00:00
Keith Donald 066b4d542b polish 2010-04-19 01:47:34 +00:00
Keith Donald 594596f361 cache invalidation 2010-04-19 01:45:27 +00:00
Keith Donald bf03d0d56f converter caching 2010-04-18 21:43:00 +00:00
Juergen Hoeller 33252495cf fixed @ExceptionHandler resolution in case of multiple matches at different inheritance levels (SPR-7085) 2010-04-18 18:48:24 +00:00
Keith Donald a71514222a preserving desc context for collection/map elements 2010-04-18 14:09:41 +00:00
Keith Donald 8464ac90c7 promoted char sequence first 2010-04-17 20:22:30 +00:00
Keith Donald ebbf63f4e0 polish 2010-04-17 06:47:08 +00:00
Keith Donald e6018afe8b restored resource conversion test 2010-04-17 06:31:34 +00:00
Keith Donald b9aeba23ef fixed failing test 2010-04-17 06:28:06 +00:00
Keith Donald d98da7d240 fixed failing test 2010-04-17 04:50:01 +00:00
Keith Donald e7c99b2b62 no longer used 2010-04-17 04:43:54 +00:00
Keith Donald 64d6a42dfd improved conversion system logging, collection converter simplification/polish, several optimizations, annotation-driven formatting caching 2010-04-17 04:43:28 +00:00
Andy Clement bf1a95c771 SPR-7100: '_' supported as first char of identifier 2010-04-16 21:10:23 +00:00
Juergen Hoeller f6b56a591c PropertyTypeDescriptor detects underlying field with same lenient naming rules as CachedIntrospectionResults (SPR-7102) 2010-04-16 15:39:23 +00:00
Juergen Hoeller 2a19148eed changed "javax.persistence.criteria" import to an explicit Import-Package declaration (SPR-6636) 2010-04-15 22:16:17 +00:00
Juergen Hoeller 7048f32666 fixed canRead breakage 2010-04-15 16:13:50 +00:00
Juergen Hoeller b3b5b356d2 polishing 2010-04-15 14:57:08 +00:00
Juergen Hoeller 7355dff967 EvalTag skips implicit variable check if VariableResolver is null (for Jetty compatibility; SPR-7096) 2010-04-15 14:56:37 +00:00
David Syer eb7f8309e2 Update version in POMs to 3.0.3 2010-04-15 10:26:14 +00:00
Juergen Hoeller 67ba18f956 polishing 2010-04-14 12:18:05 +00:00
Juergen Hoeller 12ce250c6c fixed constructor argument caching for prototypes with multiple constructor matches (SPR-7084) 2010-04-14 12:11:56 +00:00
Arjen Poutsma e6b0a1d4d7 SPR-7081 - Add ignoreJafMediaTypes to ContentNegotiatingViewResolver 2010-04-13 08:37:59 +00:00
Juergen Hoeller 385298b808 JSP FormTag calculates proper default form action even when using a rewrite filter on WebSphere (SPR-7067) 2010-04-12 14:59:27 +00:00
Juergen Hoeller 03120b70d0 fixed URI construction to consider fragment as well (SPR-7083) 2010-04-09 15:26:43 +00:00
Juergen Hoeller 4d2a398cbc call setAccessible for public final field too (SPR-7078) 2010-04-08 12:15:18 +00:00
Costin Leau 353781021d SPR-6819
+ changed jpa dependency scope from optional to provided
2010-04-08 07:04:40 +00:00
Costin Leau 688dd1a018 SPR-7071
+ fix some Eclipse classpath entries
2010-04-08 06:39:41 +00:00
Juergen Hoeller d34d8764b0 fixed getOriginatingQueryString javadoc (SPR-7072) 2010-04-07 13:51:46 +00:00
Arjen Poutsma 28da6e0d98 SPR-7070 - MappingJacksonJsonView.renderedAttributes to be made visible to subclasses 2010-04-07 08:30:04 +00:00
Juergen Hoeller 4ee6735376 DefaultPersistenceUnitManager's getPersistenceUnitInfo method has 2.5 compatible signature again (SPR-7055) 2010-04-06 15:38:40 +00:00
Juergen Hoeller ff6abbd369 prepared for 3.0.3 release 2010-04-06 12:00:45 +00:00
Juergen Hoeller ecda2aee4a revised AspectJAnnotation for consistent use of final fields (SPR-7068) 2010-04-06 11:54:50 +00:00
Juergen Hoeller e2a9bc9c66 specific detection of CGLIB subclasses in order to properly handle CGLIB interfaces (SPR-7066) 2010-04-06 11:52:42 +00:00
Arjen Poutsma b5b60cafb7 SPR-7063 - MappingJacksonHttpMessageConverter breaks with Jackson 1.0.x 2010-04-06 11:39:50 +00:00
Arjen Poutsma 270fab4fd0 Updated to version 3.0.3 2010-04-02 13:12:58 +00:00
Arjen Poutsma f7f0d18e41 Removed empty mock package 2010-04-02 10:33:46 +00:00
Juergen Hoeller 386b7507c6 final preparations for 3.0.2 2010-04-02 08:54:00 +00:00
Arjen Poutsma 8a1a23af83 SPR-7060 - @ResponseStatus: The reason value is not used. 2010-04-02 08:39:26 +00:00
Chris Beams 580dc8e72a typed map and collection conversion routines now eagerly reject non-assignable required types and avoid spurious InvocationException stack traces in debug log (SPR-7058) 2010-04-02 08:00:48 +00:00
Ramnivas Laddad 66d2c6698b Improved fix for SPR-6850 by dealing with bounds separately from normal types 2010-04-01 23:37:08 +00:00
Juergen Hoeller 7f90e3bcf7 enable JPATraversableResolver to introspect test domain classes 2010-04-01 11:45:01 +00:00
Juergen Hoeller bc1abe6070 prepared for 3.0.2 release 2010-04-01 11:38:14 +00:00
Juergen Hoeller 6aa0e62597 compatibility with Hibernate 3.5 final 2010-04-01 11:37:35 +00:00
Juergen Hoeller 52179d8bfb fixed TemplateParserContext documentation (SPR-7059) 2010-04-01 10:59:58 +00:00
Juergen Hoeller ee686188b7 OSGi version range accepts JasperReports 3.x as well; fixed missing Spring version placeholder in context-support bundle 2010-04-01 10:57:15 +00:00
Juergen Hoeller 4a98fcb3f7 fixed ambiguous reference to Entry type 2010-04-01 10:36:57 +00:00
Juergen Hoeller 29ab58c4d8 ResourcePatternUtils provides plain PathMatchingResourcePatternResolver in case of a null ResourceLoader 2010-04-01 10:35:49 +00:00
Juergen Hoeller f6d05eaad4 reintroduced two-arg constructor (making STS warning disappear); always use a ResourcePatternResolver (through ResourcePatternUtils) 2010-04-01 10:31:15 +00:00
Arjen Poutsma 5105793228 javadoc 2010-04-01 10:14:20 +00:00
Arjen Poutsma 689e7b7af2 Introduced ResponseEntity, for access to the response status code 2010-04-01 10:08:51 +00:00
Juergen Hoeller 636e2f0f4c final preparations for 3.0.2 2010-03-31 15:38:11 +00:00
Juergen Hoeller 461b488eee polishing 2010-03-31 15:36:35 +00:00
Juergen Hoeller 6b93f41f3a AbstractInterceptorDrivenBeanDefinitionDecorator preserves lazy-init flag as well 2010-03-31 15:25:35 +00:00
Juergen Hoeller 092241a632 fixed decorated BeanDefinition condition for early type checking in AbstractBeanFactory (SPR-7006) 2010-03-31 15:21:48 +00:00
Juergen Hoeller 20f4e9023b UrlPathHelper cuts off trailing servlet-path slashes for root mappings (on WebSphere; SPR-7052) 2010-03-31 14:02:27 +00:00
Juergen Hoeller c24bafd644 polishing 2010-03-31 13:38:15 +00:00
Juergen Hoeller 21b4526063 accept UrlMap with any value type 2010-03-31 13:37:46 +00:00
Juergen Hoeller b2ff0b1df0 refined internal HandlerMapping/HandlerAdapter bean names 2010-03-31 13:37:11 +00:00
Juergen Hoeller 87d0da2d4c final preparations for 3.0.2 2010-03-30 23:37:29 +00:00
Juergen Hoeller ad78b5cdb5 polishing 2010-03-30 23:35:13 +00:00
Juergen Hoeller de84703c02 @ExceptionHandler methods consistently receive original exception as thrown by user methods 2010-03-30 23:28:21 +00:00
Juergen Hoeller b67b5ec408 clarified applicability of @ExceptionHandler in Portlet environments (SPR-6959) 2010-03-30 21:27:40 +00:00
Juergen Hoeller 65e88449aa DispatcherPortlet passes handler instance into HandlerExceptionResolver for action exception; DispatcherPortlet applies preHandleRender callbacks in case of action exception as well (SPR-6959) 2010-03-30 21:17:31 +00:00
Juergen Hoeller 20de98362a use simple type name in "missing parameter" exception text 2010-03-30 21:13:12 +00:00
Juergen Hoeller ea7ff5241d polishing 2010-03-30 21:12:40 +00:00
Juergen Hoeller ae877e92c7 improved getBean(Class) javadoc 2010-03-30 15:53:32 +00:00
Juergen Hoeller 16305530f2 adapted to common naming convention for internal attributes 2010-03-30 15:44:11 +00:00
Juergen Hoeller 282de41f06 AbstractInterceptorDrivenBeanDefinitionDecorator exposes decorated BeanDefinition for early type checking in AbstractBeanFactory (SPR-7006) 2010-03-30 15:40:47 +00:00
Juergen Hoeller 16eb915c95 ObjectFactoryCreatingFactoryBean creates a serializable ObjectFactory reference; added ProviderCreatingFactoryBean, exposing a serializable JSR-330 Provider reference (SPR-6998) 2010-03-30 14:45:43 +00:00
Juergen Hoeller 0eabef0720 added filter ordering comments (SPR-6594) 2010-03-30 10:46:51 +00:00
Juergen Hoeller 2c9753ad25 NativeWebRequest detects native MultipartRequest even when decorated (SPR-6594) 2010-03-30 10:24:39 +00:00
Juergen Hoeller 81e81ce77c WebRequestInterceptor exposes HttpServletResponse through NativeWebRequest (after downcast) 2010-03-30 09:21:09 +00:00
Arjen Poutsma 9cecaa769e SPR-7047 - XML MarshallingView assumes non-null value for object to be marshalled. 2010-03-30 08:34:29 +00:00
Juergen Hoeller 8c8eca7e05 refined use of generics 2010-03-29 23:08:32 +00:00
Juergen Hoeller fba8bcc7dc compatibility with JasperReports 3.x in terms of resource management (SPR-7048) 2010-03-29 23:07:53 +00:00
Juergen Hoeller fa719ad4c5 restored compatibility with Servlet 2.4 containers on all VMs (SPR-7044) 2010-03-29 13:17:49 +00:00
Arjen Poutsma 63dc53a5ea SPR-6861 - enable overwriting of createHttpInputMessage and createHttpOutputMessage in AnnotationMethodHandlerAdapter 2010-03-29 12:25:49 +00:00
Arjen Poutsma bc7679f9fc Documented HttpEntity 2010-03-29 12:02:22 +00:00
Arjen Poutsma a6d5d7c8e2 javadoc 2010-03-29 11:21:55 +00:00
Arjen Poutsma 122e4346bb Documented HttpEntity 2010-03-29 11:12:45 +00:00
Arjen Poutsma c18137d40a SPR-6728 - Document Spring MVC exception -> HTTP status code mappings 2010-03-29 10:28:05 +00:00
Sam Brannen a827ab88b1 [SPR-6523] Commented all paragraphs (i.e., for list, map, and set) related to collection merging with the util namespace until this issue has been addressed. 2010-03-27 19:10:54 +00:00
Chris Beams 351e72b6e2 incorrectly invoked factory methods now result in exceptions with more descriptive messages (SPR-5475) 2010-03-26 12:05:36 +00:00
Juergen Hoeller cbed1c1b4b fixed collection element conversion using ConversionService (SPR-6950) 2010-03-25 15:02:19 +00:00
Arjen Poutsma 124837e2c3 Added @Override annotations. 2010-03-25 13:02:19 +00:00
Arjen Poutsma 753a54096f SPR-7000 - AnnotationMethodHandlerAdapter gives priority to media type order over quality when selecting a method 2010-03-25 12:29:52 +00:00
Juergen Hoeller d50881d82b fixed collection element conversion using ConversionService (SPR-6950) 2010-03-25 11:53:41 +00:00
Arjen Poutsma f836601e0f SPR-7034 - XmlBeans UnMarshalling - does not work with RequestBody annotation 2010-03-25 11:52:32 +00:00
Chris Beams fbda55f141 corrected TypeUtils.isAssignable() failure to return true in certain valid wildcard bounding scenarios (SPR-6850) 2010-03-25 10:33:25 +00:00
Juergen Hoeller 10c358718e avoid NPE if runtimeTest is null (SPR-7032) 2010-03-25 10:22:16 +00:00
Arjen Poutsma 6f2062fb3a SPR-7031 - MappingJacksonJsonView should add headers for no-caching 2010-03-25 10:14:11 +00:00
Juergen Hoeller f42d4241b4 preparations for 3.0.2 2010-03-25 00:00:27 +00:00
Juergen Hoeller 3576bc4585 preparations for 3.0.2 2010-03-24 23:53:02 +00:00
Thomas Risberg 47389a0edd added com.springsource.javax.servlet.jsp dependency to fix problem with test (SPR-7033) 2010-03-24 23:24:16 +00:00
Juergen Hoeller ab139dffd0 added javadoc references to semantic definition of transaction attributes (SPR-7029) 2010-03-24 23:22:52 +00:00
Thomas Risberg a5f3d00977 added conf attribute for the struts dependency (SPR-7033) 2010-03-24 22:39:47 +00:00
Juergen Hoeller 53b6e1c1b0 fixed DataBinder's conversion error handling for direct field access with ConversionService (SPR-6953) 2010-03-24 17:40:45 +00:00
Juergen Hoeller 65b0a8fcb2 revised BeanTypeDescriptor into core PropertyTypeDescriptor; consider method annotations for return type (SPR-6979) 2010-03-24 16:27:33 +00:00
Juergen Hoeller 461c200ce6 restricted onApplicationEvent callbacks for local ApplicationContext only (SPR-6964) 2010-03-24 14:38:10 +00:00
Juergen Hoeller a614430899 allow for null keys and null values in rendered Map (SPR-7024) 2010-03-24 14:26:00 +00:00
Juergen Hoeller bc2440ea16 updated for JDK 1.5+ 2010-03-24 13:58:45 +00:00
Juergen Hoeller 6fb49f1de7 ignore failing serialization test for the time being 2010-03-24 10:52:20 +00:00
Chris Beams 6118d67321 updated JavaDoc regarding short-circuiting the BeanPostProcessor chain when returning null from BPP methods (SPR-6926) 2010-03-24 10:52:10 +00:00
Juergen Hoeller cbca6e1acb prevent findEditorByConvention AccessControlException on Google App Engine (SEC-1434) 2010-03-24 10:39:40 +00:00
Juergen Hoeller 2c2cf32b8a polishing 2010-03-24 10:35:50 +00:00
Juergen Hoeller 89755542da BeanPostProcessors are allowed to return a null bean value in the middle of the chain (SPR-6926) 2010-03-24 10:34:21 +00:00
Chris Beams 051b5f4f4f removed duplicate junit and aspectjweaver dependencies 2010-03-24 10:09:58 +00:00
Juergen Hoeller b370969690 added public "validateDatabaseSchema" method to Hibernate LocalSessionFactoryBean (SPR-3212) 2010-03-24 09:36:01 +00:00
Chris Beams a1f6eabbce SPR-7002: updated .classpath and pom to reflect new dependency upgrade from Jackson 1.0.0->1.4.2 2010-03-24 09:27:54 +00:00
Chris Beams 247c46e6ea SPR-7002: updated .classpath and pom to reflect new dependency upgrade from Jackson 1.0.0->1.4.2 2010-03-24 09:03:39 +00:00
Juergen Hoeller 915ca47cad updated to Jackson 1.4.2 2010-03-24 09:01:55 +00:00
Mark Fisher 0d8a020684 updated commons-pool version in .classpath to match ivy config 2010-03-23 21:44:52 +00:00
Mark Pollack 1e388a894e Change version of Hibernate Validator to 4.0.2 in pom.xml and eclipse .classpath to agree with version in ivy.xml 2010-03-23 16:44:46 +00:00
Juergen Hoeller 4e7752c9ba JCA listener containers delegate to wrapped Transaction handle (for Geronimo compatibility; SPR-6991) 2010-03-23 16:27:34 +00:00
Chris Beams c13e5f9f5b SPR-7009, SPR-6972: backed out unintentionally committed tests 2010-03-23 15:29:35 +00:00
Chris Beams 706a09c49e SPR-7009: TransactionInterceptor now extracts ultimate target class before evaluating @Transactional metadata to accommodate double-proxying cases 2010-03-23 12:06:30 +00:00
Chris Beams c38c09bc35 SPR-6972: removed import 2010-03-23 12:06:24 +00:00
Chris Beams 77bb68b967 SPR-6972: failed attempt to reproduce issue 2010-03-23 12:06:16 +00:00
Arjen Poutsma 212daa1995 SPR-7002 - RestTemplate fails to convert properly for Generic Type Container with MappingJacksonHttpMessageConverter 2010-03-23 11:15:13 +00:00
Arjen Poutsma f7ac7a395c SPR-6021 - Allow for using MultiValueMap in GET request for mapping multiple request params 2010-03-23 09:50:47 +00:00
Arjen Poutsma 465e84eda4 Revert: SPR-6021 - Allow for using MultiValueMap in GET request for mapping multiple request params 2010-03-23 08:52:59 +00:00
Chris Beams ec577f8e24 SPR-6538: context-support is no longer marked as an optional dependency within aspects and webmvc POMs 2010-03-23 08:15:57 +00:00
Juergen Hoeller 26470cc23a polishing 2010-03-22 18:31:41 +00:00
Juergen Hoeller 296aa96d71 AopUtils.getTargetClass(...) never returns null (SPR-7011) 2010-03-22 18:31:13 +00:00
Juergen Hoeller a2c3274b8e fixed double fixedField call for getFieldType (SPR-7019) 2010-03-22 15:08:57 +00:00
Chris Beams 5e19f2959e SPR-6888: ClassPathResource.getDescription() now fully qualifies resource path regardless of constructor used. 2010-03-22 14:54:39 +00:00
Juergen Hoeller 5dc59aaa7b avoid Synchronization List preparations upfront if possible (SPR-6999) 2010-03-22 14:31:58 +00:00
Arjen Poutsma c9289a4dcf SPR-6021 - Allow for using MultiValueMap in GET request for mapping multiple request params 2010-03-22 14:31:27 +00:00
Juergen Hoeller 19b4618fb5 avoid Synchronization List preparations upfront if possible (SPR-6999) 2010-03-22 14:23:02 +00:00
Arjen Poutsma 4c0744ee54 SPR-6978 - Dispatcher fails to invoke handler method when request method conflicts with request path 2010-03-22 14:12:32 +00:00
Arjen Poutsma b07d02f1bf SPR-7018 - Support for HttpEntity<?> in @MVC 2010-03-22 10:23:39 +00:00
Sam Brannen 69cbadf7e9 [SPR-6918] Now verifying support for @Value in conjunction with the Spring TestContext Framework. 2010-03-19 12:57:17 +00:00
Sam Brannen 0543036ec9 FooConfig, Foo, Bar, and BarFactory are now public static classes in order to avoid a bug with JDT/Spring IDE where the classes cannot be found in the XML application context. 2010-03-19 12:39:34 +00:00
Thomas Risberg 2ff2f0205d added metadata override to NUMERIC for NUMBER columns reported as DECIMAL but with zero decimal places (SPR-6912) 2010-03-18 14:19:30 +00:00
Christian Dupuis e22431188b made SortedResourcesFactoryBean ResourceLoaderAware to prevent specifying the ResourceLoader in the jdbc NamespaceHandlers; prevents leaking of class loader instances in tooling 2010-03-17 17:35:27 +00:00
Juergen Hoeller b8c0e153e3 do not insist on BeanDefinition presence for @Value resolution (for use in unit tests; SPR-6918) 2010-03-16 23:47:40 +00:00
Juergen Hoeller ff09482653 avoid ChainedTilesRequestContextFactory warn logging on Tiles 2.2 2010-03-16 23:27:18 +00:00
Andy Clement d932c043da SPR-6984: auto grow collections on write through indexer 2010-03-15 18:15:48 +00:00
Juergen Hoeller 0cb7e4dcb3 made getName() public; added isNullSafe() accessor (SPR-6980) 2010-03-14 22:19:56 +00:00
Christian Dupuis 2e5f1c22f6 fixed Eclipse classpath file 2010-03-14 17:58:46 +00:00
Chris Beams cf93e7c69e Fixed typo in javadoc on HttpRequestHandler 2010-03-14 11:26:06 +00:00
Juergen Hoeller 9da980d325 further fixes for 3.0.2 2010-03-12 23:12:40 +00:00
Juergen Hoeller 7da13e7ad1 compatibility with OpenJPA 2.0 (support for persistence.xml versioning; SPR-6975) 2010-03-12 23:10:06 +00:00
Juergen Hoeller a0e40a5610 avoid ChainedTilesRequestContextFactory warn logging on Tiles 2.1 2010-03-12 22:36:24 +00:00
Juergen Hoeller ac5c75690a fixed test failures 2010-03-12 20:55:44 +00:00
Juergen Hoeller 795a5e02cd polishing 2010-03-12 20:45:02 +00:00
Juergen Hoeller bb75662a7e @Transactional qualifiers work in unit tests as well (SPR-6892) 2010-03-12 20:44:41 +00:00
Juergen Hoeller 23cb161fb3 polishing 2010-03-12 19:45:17 +00:00
Juergen Hoeller eb1c039a6e WebContentInterceptor does not restrict HTTP methods by default anymore (SPR-6919) 2010-03-12 19:45:05 +00:00
Juergen Hoeller 4c39f90466 made CronSequenceGenerator public (SPR-6920) 2010-03-12 19:34:45 +00:00
Juergen Hoeller d4de1ac346 AbstractInterceptorDrivenBeanDefinitionDecorator copies autowire settings just like ScopedProxyUtils does (SPR-6974) 2010-03-12 19:18:39 +00:00
Arjen Poutsma 4880d1d461 SPR-6976 - Add debug log for HttpMessageConverter usage 2010-03-12 17:46:50 +00:00
Arjen Poutsma 5a8aa53232 SPR-6973 - SimpleUrlHandlerMapping wildcards cannot handle escaped newline characters 2010-03-12 16:56:16 +00:00
Arjen Poutsma 85b8befbd1 SPR-6970 - AbstractHttpMessageConverter canWrite logic the wrong way round?? 2010-03-12 16:43:57 +00:00
Christian Dupuis 4c4f19ec94 SPR-6977: updated copyright; added method comment 2010-03-12 16:10:03 +00:00
Christian Dupuis 145dcfd0c2 SPR-6977: added support for array parameter types 2010-03-12 15:09:24 +00:00
Arjen Poutsma 991c982e5b SPR-5866 - RestTemplate - access to Request Headers 2010-03-12 09:07:29 +00:00
Juergen Hoeller 1d6f374970 fixed typo (SPR-6967) 2010-03-11 21:30:39 +00:00
Juergen Hoeller eee72c52da mention actual endpoint address in connect failure exception message (SPR-6971) 2010-03-11 21:26:10 +00:00
Arjen Poutsma b0e3081636 SPR-5866 - RestTemplate - access to Request Headers 2010-03-11 17:41:30 +00:00
Arjen Poutsma 886eb665bf SPR-5866 - RestTemplate - access to Request Headers 2010-03-11 17:35:08 +00:00
Arjen Poutsma 70ee2ee7b1 SPR-5866 - RestTemplate - access to Request Headers 2010-03-11 17:33:54 +00:00
Arjen Poutsma f3f535623f Fixing the build 2010-03-11 16:54:47 +00:00
Arjen Poutsma 63076d0865 SPR-6969 - Introduce HttpEntity 2010-03-11 16:42:25 +00:00
Arjen Poutsma fc0a6ce40c Javadoc 2010-03-11 14:19:30 +00:00
Arjen Poutsma 88773ae7f1 a HTTP -> an HTTP 2010-03-11 12:57:52 +00:00
Andy Clement 81b10be1d0 SPR-6968: indexing via square brackets can now treat the index as an attempt at property access 2010-03-11 01:09:50 +00:00
Scott Andrews 50c5593740 SPR-6923 SpEL resolving nested property as outer object 2010-03-10 17:44:14 +00:00
Arjen Poutsma af4b22e5b9 SPR-5904 - Merged multipart support into FormHttpMessageConverter 2010-03-10 17:31:02 +00:00
Arjen Poutsma 6e55c8cd2f Fixing build. 2010-03-10 14:03:56 +00:00
Arjen Poutsma def90d1016 SPR-5904 - Multipart/mixed requests using RestTemplate 2010-03-10 13:53:29 +00:00
Juergen Hoeller f30b0a86f7 autowire="byType" ignores parameter name when choosing a primary bean, as defined (SPR-6917) 2010-03-10 13:46:31 +00:00
Juergen Hoeller 95ad7168bf changed doGetBean signature back to protected (SPR-6957) 2010-03-10 13:38:46 +00:00
Juergen Hoeller ccb312a974 SimpleJdbcCall's "returningResultSet" accepts any plain RowMapper now (SPR-6963) 2010-03-10 12:54:52 +00:00
Arjen Poutsma f588ab05fa Added readonly version of HttpHeaders 2010-03-10 10:00:03 +00:00
Andy Clement 2dd1134303 SPR-6941: part (1) correct exception handling when null cachedExecutor 2010-03-09 17:33:36 +00:00
Arjen Poutsma 0efb9d8023 SPR-5904 - Multipart/mixed requests using RestTemplate 2010-03-09 16:15:41 +00:00
Arjen Poutsma 21fd150894 SPR-6906 - Combination of ControllerClassNameHandlerMapping and @RequestMappings with file extensions results in exception 2010-03-09 10:29:01 +00:00
Arjen Poutsma ac9a625ccc SPR-6939 - XStreamMarshaller + JsonHierarchicalStreamDriver + JsonWriter.DROP_ROOT_MODE produce empty output 2010-03-09 09:53:51 +00:00
Andy Clement c31213e5cb SPR-6866: unhelpful NPE when expression badly formed 2010-03-09 00:55:03 +00:00
Ramnivas Laddad f82cc6458b Fixed SPR-6734 by resticting record/replay logic to only entity methods that originated in a test method 2010-03-08 20:42:22 +00:00
David Syer 8d7df01d73 RESOLVED - issue SPR-6955, SPR-6901 added DisposableBean to TaskExecutorFactoryBean 2010-03-08 12:13:30 +00:00
Arjen Poutsma 5303ab68aa Atom Feed HttpMessageConverter 2010-03-05 14:32:36 +00:00
Arjen Poutsma c91ff130d5 SPR-6946 - RestTemplate should not encode fragments (#'s) 2010-03-05 11:40:52 +00:00
Juergen Hoeller 54d0346084 do not call isCurrentlyInCreation with null argument (in order to meet newly enforced assertions within the BeanFactory) 2010-03-05 10:49:24 +00:00
Juergen Hoeller 4f926c82bf added bean name assertions 2010-03-04 22:36:35 +00:00
Juergen Hoeller b07b146965 fixed @Configurable issue with null bean name (SPR-6947) 2010-03-04 22:33:59 +00:00
Juergen Hoeller cfbc5224e3 fixed exception propagation issue with Hessian 4.0 (SPR-6899) 2010-03-04 22:22:47 +00:00
Arjen Poutsma a0c41a0e03 SPR-6906 - Combination of ControllerClassNameHandlerMapping and @RequestMappings with file extensions results in exception 2010-03-04 15:17:09 +00:00
Juergen Hoeller 8fe5151f84 some further 3.0.2 entries 2010-03-04 13:58:23 +00:00
Juergen Hoeller 77f8b070cd polishing 2010-03-04 13:58:02 +00:00
Arjen Poutsma 4f4f3fab7d SPR-6934 - AnnotationMethodHandlerAdapter should take into account request accept header ordering 2010-03-04 13:54:24 +00:00
Juergen Hoeller 0444ab236a fixed TypeDescriptor toString for MethodParameter annotations (SPR-6924) 2010-03-04 13:50:43 +00:00
Juergen Hoeller 9ede9fe697 "conversionService" bean gets ignored if not of type ConversionService (SPR-6916) 2010-03-04 11:27:09 +00:00
Juergen Hoeller 3e98b26b77 fixed typo (SPR-6936) 2010-03-04 11:17:12 +00:00
Juergen Hoeller 0aee6e9f5b use target factory's ClassLoader in case of a raw EntityManagerFactory (SPR-6733) 2010-03-04 11:13:28 +00:00
Arjen Poutsma eddc5b8898 SPR-6935 - @ResponseBody with method that return void throws "Could not resolve view exception". 2010-03-04 10:51:27 +00:00
Juergen Hoeller 57993d871e WebApplicationObjectSupport's initServletContext will be called only once in any scenario (SPR-6914) 2010-03-03 16:26:47 +00:00
Arjen Poutsma 3c8a47bd06 SPR-6877 - AnnotationMethodHandlerAdapter.handleResponseBody prioritizes messageConverter over MediaType 2010-03-03 11:14:30 +00:00
Arjen Poutsma 7f8c91a52d SPR-6902 - @ResponseBody does not work with @ExceptionHandler 2010-03-03 10:33:58 +00:00
Arjen Poutsma 62f9f477f5 SPR-6877 - AnnotationMethodHandlerAdapter.handleResponseBody prioritizes messageConverter over MediaType 2010-03-03 10:18:59 +00:00
Arjen Poutsma 894875ce8d SPR-6907 - JibxMarshaller - provide access to jibx's writeDocType 2010-03-02 12:49:31 +00:00
Arjen Poutsma 9d1c3fa9ac SPR-6907 - JibxMarshaller - provide access to jibx's writeDocType 2010-03-02 11:56:22 +00:00
Arjen Poutsma d207c2294d Fixed wrong encoding of URI templates with @-signs (SPR-6874) 2010-03-02 11:30:36 +00:00
Arjen Poutsma e653a9cd03 javadoc 2010-03-02 10:53:15 +00:00
Arjen Poutsma 5675046cb7 SPR-6876 - RequestMethod does not appear to factor into @RequestMapping uniqueness in some cases 2010-03-02 09:52:43 +00:00
Costin Leau 20a8039642 + improve template for spring-context so that the import-package is updated automatically 2010-02-25 15:46:54 +00:00
Juergen Hoeller 4bda92fd8a newArg(Type)PreparedStatementSetter declares PreparedStatementSetter interface as return type (SPR-6897) 2010-02-24 14:32:22 +00:00
Sam Brannen 97adfdd398 Removed misleading comments regarding javax.inject.Qualifier. 2010-02-23 23:07:44 +00:00
Sam Brannen a5b5df450e [SPR-6879] @DirtiesContext is now an @Inherited annotation. 2010-02-23 17:44:59 +00:00
Sam Brannen 80b8fb8b83 [SPR-6879] @DirtiesContext is now an @Inherited annotation. 2010-02-23 17:43:00 +00:00
Juergen Hoeller ef227c5d01 HibernateJpaDialect borrows JDBC Connection on demand (supporting aggressive release; SPR-6895) 2010-02-23 16:13:04 +00:00
Michael Isvy 9e5b129ba5 SPR-6885
updates based on Chris Beams' comments.
2010-02-23 15:46:52 +00:00
Juergen Hoeller 12b30843c5 widened AbstractFactoryBean's "getObjectType" signature to return any Class as well (SPR-6872) 2010-02-23 13:00:12 +00:00
Juergen Hoeller 09f02bc620 use WeakHashMap for DataSource-keyed cache (SPR-6887) 2010-02-23 10:47:51 +00:00
Chris Beams 3d2611484a adding .gitignore 2010-02-22 23:52:56 +00:00
Michael Isvy 6af91773ee SPR-6885
Improved documentation for JavaConfig's use of CGLIB for all @Configuration annotated classes
2010-02-22 13:50:41 +00:00
Juergen Hoeller 9e71af86f8 polishing 2010-02-22 11:49:19 +00:00
Juergen Hoeller 60ff93e5ac avoid invalid id characters in ErrorsTag as well (SPR-6862) 2010-02-22 11:48:08 +00:00
Chris Beams f25d2a9416 Removed hard-coded local path from .core/.classpath; removed duplicate asm entry in .context/.classpath 2010-02-22 01:55:38 +00:00
David Syer fd4b9cf6a3 SPR-6881: remove extra dependency 2010-02-21 17:51:48 +00:00
David Syer 1a351db6e0 Update Central POMs to 3.0.2 2010-02-21 15:32:18 +00:00
Chris Beams 5b537e9604 minor typo fixes 2010-02-21 02:13:41 +00:00
Juergen Hoeller 6c69f47acf regressions 2010-02-20 16:29:07 +00:00
Juergen Hoeller 44ef114981 fixed @RequestParam(required=false) regression for @InitBinder methods (SPR-6878) 2010-02-20 16:14:14 +00:00
Juergen Hoeller 67b342d923 fixed indexed property regression (SPR-6871) 2010-02-20 15:53:09 +00:00
Juergen Hoeller 5063c6dd00 upgraded to Hibernate Validator 4.0.2 and Jackson 1.4.2 2010-02-19 13:58:19 +00:00
Costin Leau 8d0bb00188 + make use or property placeholders inside template.mf 2010-02-19 09:43:22 +00:00
Arjen Poutsma fe59d4a787 setting things up for 3.0.2 2010-02-18 17:42:14 +00:00
Juergen Hoeller e65610555e final preparations for 3.0.1 release 2010-02-18 11:29:28 +00:00
Arjen Poutsma 68b4c7df6e SPR-6752 - RestTemplate throws IllegalArgumentException when HTTP status is not in the HttpStatus enum 2010-02-18 11:15:17 +00:00
Juergen Hoeller 103ac0359d DefaultRequestToViewNameTranslator strips trailing slashes as well (SPR-6830) 2010-02-18 10:47:22 +00:00
Ben Hale fff4c77dbe Updated spring-build to 2.5.0 2010-02-18 10:26:35 +00:00
Juergen Hoeller b960bd579d preparations for 3.0.1 release 2010-02-18 00:07:02 +00:00
Juergen Hoeller 5f7f37f1c1 polishing 2010-02-18 00:06:16 +00:00
Juergen Hoeller 572abbcff9 do not ever consider Object as a candidate type for autowiring by type (SPR-6600) 2010-02-18 00:04:08 +00:00
Juergen Hoeller e74b33242b fixed regression: method-level patterns without type-level pattern do not need to start with a slash (SPR-6598) 2010-02-17 23:26:06 +00:00
Juergen Hoeller b54a099f49 marked spring-tx as a required dependency (SPR-6737) 2010-02-17 22:50:01 +00:00
Juergen Hoeller c39b529c93 added vararg variants of query methods to JdbcTemplate (as known from SimpleJdbcTemplate; SPR-6858) 2010-02-17 22:19:49 +00:00
Juergen Hoeller 54acebd086 UriTemplate properly quotes variable values (SPR-6854) 2010-02-17 21:58:56 +00:00
Juergen Hoeller 36940c5fc8 only activate EL support if JSP ExpressionFactory actually available (SPR-6852) 2010-02-17 21:54:21 +00:00
Michael Isvy 6aa05994ae SPR-6855
Documentation on Spring-Struts 1 integration needs to be updated
2010-02-17 15:59:52 +00:00
Juergen Hoeller d3560706df final preparations for 3.0.1 release 2010-02-16 18:21:50 +00:00
Juergen Hoeller 64f0200675 polishing 2010-02-16 18:21:25 +00:00
Juergen Hoeller 64fc4c23ea revised EvalTag implementation 2010-02-16 18:16:47 +00:00
Juergen Hoeller 4ae1709313 relaxed generic Class declaration in HttpMessageConverter's canRead/canWrite/read signatures (SPR-6848) 2010-02-16 17:46:16 +00:00
Arjen Poutsma 19cdd558d3 Improved Jaxb2Marshaller.supports() 2010-02-16 14:25:55 +00:00
Arjen Poutsma 58f63f6142 Improved Jaxb2Marshaller.supports() 2010-02-16 14:13:18 +00:00
Juergen Hoeller 60ac239091 BeanDefinitionReader and ClassPath/FileSystemXmlApplicationContext use varargs where possible (SPR-6849) 2010-02-16 11:59:29 +00:00
Michael Isvy c0f4d9c893 fixed SPR-6846 2010-02-15 22:45:26 +00:00
Juergen Hoeller ccc7d0f53f fixed interaction with ControllerClassNameHandlerMapping (as reported by Rossen) 2010-02-15 18:27:30 +00:00
Juergen Hoeller 87eb3f970e store a static WebApplicationContext reference if the Spring jars get deployed in the same web application as the ContextLoader (SPR-5652) 2010-02-15 18:02:19 +00:00
Juergen Hoeller db2d323d96 store a static WebApplicationContext reference if the Spring jars get deployed in the same web application as the ContextLoader (SPR-5652) 2010-02-15 17:58:52 +00:00
Juergen Hoeller 0598eafb84 polishing 2010-02-15 17:37:57 +00:00
Juergen Hoeller b5e826976c fixed interaction with ControllerClassNameHandlerMapping (as reported by Rossen) 2010-02-15 17:37:44 +00:00
Juergen Hoeller 5e1065838b fixed isProxyFactoryBeanDefinition check (SPR-6842) 2010-02-15 17:04:13 +00:00
Juergen Hoeller a6af91f7b2 avoid rendering invalid ids (SPR-6840) 2010-02-15 13:45:47 +00:00
Costin Leau e8a4ddd3e0 + fix test by disabling autowiring 2010-02-15 13:23:47 +00:00
Juergen Hoeller 18bd4a8337 improved "no matching factory method found" exception message (SPR-6837) 2010-02-15 13:01:46 +00:00
Juergen Hoeller 97059f4e18 @RequestParam/RequestHeader/CookieValue's defaultValue allows for declaring empty String (SPR-6791) 2010-02-15 12:10:55 +00:00
Juergen Hoeller 83231997c0 final preparations for 3.0.1 release 2010-02-15 00:50:21 +00:00
Juergen Hoeller 870507cc36 context-specific "conversionService" bean may refer to annotation-configured converter beans (SPR-6800) 2010-02-15 00:42:39 +00:00
Juergen Hoeller 9adb01a4a6 added PropertyPlaceholderConfigurer test 2010-02-15 00:22:06 +00:00
Juergen Hoeller b3b4c7aaad fixed checkboxes comparison for multi-list (SPR-6505) 2010-02-15 00:17:50 +00:00
Juergen Hoeller cdee538129 fixed rendering of select options for multi-list (SPR-6799) 2010-02-15 00:04:30 +00:00
Juergen Hoeller d9112d071b fixed error message 2010-02-14 23:59:53 +00:00
Keith Donald f4631b1cb6 Spring eval docs 2010-02-12 20:43:55 +00:00
Keith Donald d075b82372 Spring eval docs 2010-02-12 20:43:40 +00:00
Keith Donald 62eb6cb473 Spring eval docs 2010-02-12 20:42:35 +00:00
Keith Donald 9c35130fdc Added spring:eval note 2010-02-12 20:03:23 +00:00
Keith Donald b825e398ae added jsp.* import to catch jsp.el 2010-02-12 17:54:13 +00:00
Keith Donald 6390e897b8 eval tag tidying 2010-02-12 17:42:41 +00:00
Andy Clement 117b138233 SPR-6745: metadata (annotations) attached to property accessors allowing formatting of values during conversion 2010-02-12 01:50:52 +00:00
Keith Donald 0f65a0f239 bug 2010-02-12 00:43:27 +00:00
Keith Donald e1a0625a15 conversion service lookup in request 2010-02-12 00:33:27 +00:00
Juergen Hoeller 315c16de5f relaxed test conditions 2010-02-12 00:02:32 +00:00
Juergen Hoeller 5f781e6266 generified PagedListHolded (SPR-6825) 2010-02-11 23:24:45 +00:00
Juergen Hoeller 09998b2434 relaxed test conditions 2010-02-11 23:15:15 +00:00
Keith Donald daa45dd424 updated template.mf to depend on spring-expression 2010-02-11 23:10:18 +00:00
Keith Donald c927e7dc7c added spring expression dependency to maven pom 2010-02-11 23:01:58 +00:00
Keith Donald f23b55dc13 spring:eval tag initial commit 2010-02-11 22:53:49 +00:00
Juergen Hoeller 16aa399040 optional EL support (only when Tiles EL module present); got rid of tiles-servlet-wildcard dependency (implemented wildcard support locally) 2010-02-11 17:03:37 +00:00
Juergen Hoeller 3db5a299bb canConvert checks Collection/Map element types as well (SPR-6564) 2010-02-11 12:23:57 +00:00
Juergen Hoeller cef44f6d53 made PersistenceAnnotationBeanPostProcessor's JNDI API references optional - for compatibility with Google App Engine (SPR-6679) 2010-02-11 11:36:33 +00:00
Costin Leau caaa45c9ef + fixed internal caching for LocalVariableTableParameterNameDiscoverer 2010-02-11 11:35:39 +00:00
Costin Leau 6389097ac1 + improved javadoc 2010-02-11 10:38:59 +00:00
Costin Leau c9975504c6 + improved LocalVariableTableParameterNameDiscoverer discovery and memory usage
+ added extra tests
2010-02-11 10:38:33 +00:00
Juergen Hoeller 06cd013b31 Tiles 2.2 etc 2010-02-10 23:25:43 +00:00
Juergen Hoeller 99c5a70ce3 added optional JPA dependency to spring-aspects POM (SPR-6819) 2010-02-10 23:02:31 +00:00
Juergen Hoeller d87a947ef2 reverted to fixed definition path 2010-02-10 21:45:13 +00:00
Sam Brannen 69cb15f27f [SPR-6821] Removed lingering reference to StandardScopes. 2010-02-10 21:35:26 +00:00
Juergen Hoeller ef024db318 polishing 2010-02-10 21:29:13 +00:00
Juergen Hoeller bef30a838c support for Tiles 2.2.1 (preserving compatibility with Tiles 2.1.2 and above; SPR-6097) 2010-02-10 21:26:42 +00:00
Keith Donald bfd61d6303 mvc namespace docs 2010-02-10 20:16:38 +00:00
Keith Donald 61958b6b3b comments about tutorials 2010-02-10 15:38:54 +00:00
Juergen Hoeller 03e9e4568f avoid double closing in case of shutdown hook (SPR-6793) 2010-02-10 13:49:51 +00:00
Ben Hale 63f574e741 Updated spring-build to see new maven targets 2010-02-10 11:38:33 +00:00
Juergen Hoeller b670b19429 setAutoGrowNestedPaths throws an IllegalStateException if being called too late (SPR-6718) 2010-02-09 15:54:48 +00:00
Juergen Hoeller aafe8ef9be added "lenientFallback" flag to AbstractRoutingDataSource (SPR-6809) 2010-02-09 15:39:54 +00:00
Juergen Hoeller f0bb45ae28 included qualifier value in debug log for each transaction (SPR-6811) 2010-02-09 14:57:17 +00:00
Juergen Hoeller 3322368106 fixed TilesConfigurer's init-param handling; added simple bootstrap test for Tiles (SPR-6606) 2010-02-09 12:32:32 +00:00
Costin Leau 7aec01bbac SPR-5379
+ added clarifications to section 3.4.5.2 Excluding a bean from autowiring
2010-02-09 12:23:12 +00:00
Costin Leau a9386f5c79 SPR-5246
+ clarify order of annotation and XML injection
2010-02-09 11:17:07 +00:00
Juergen Hoeller c5c38c6664 non-matching @Transactional qualifier value will lead to IllegalStateException (SPR-6810) 2010-02-08 18:32:38 +00:00
Juergen Hoeller 6c0d934b92 do not try to convert read-only Collections/Maps (SPR-6808) 2010-02-08 12:29:21 +00:00
Sam Brannen 81649d5c3b Removed unused import. 2010-02-07 15:57:57 +00:00
Juergen Hoeller b25dc7cc55 compatibility with Hibernate 3.5 beta 4 (SPR-6804, SPR-6805) 2010-02-06 16:15:12 +00:00
Juergen Hoeller 3833444778 plenty of new entries for 3.0.1 2010-02-04 20:32:36 +00:00
Juergen Hoeller d7b79dc9a9 fixed lookup log message (SPR-6746) 2010-02-04 18:40:39 +00:00
Juergen Hoeller 4778c4b750 support for Hessian 4.0.x (SPR-6041) 2010-02-04 18:36:21 +00:00
Costin Leau 0590184557 + downgraded slf4j to 1.5.6 to solve IllegalAcessError with Hibernate 3.3 2010-02-04 17:10:31 +00:00
Juergen Hoeller 5279a07673 @SessionAttributes works when used on an annotated controller interface with AOP proxying (SPR-6797) 2010-02-04 16:53:44 +00:00
Juergen Hoeller 59360f4f65 added warning about pointing to a custom transaction manager bean (SPR-5174) 2010-02-04 16:47:57 +00:00
Juergen Hoeller 5f166f6799 added warning about annotated controller interfaces (SPR-6655) 2010-02-04 15:52:15 +00:00
Juergen Hoeller 56e119e822 @SessionAttributes works when used on an annotated controller interface with AOP proxying (SPR-6797) 2010-02-04 15:39:58 +00:00
Arjen Poutsma 7832381dd2 SPR-6788: fixed compareTo() consistency with equals 2010-02-04 14:19:11 +00:00
Chris Beams 0f7f749ada Updated Eclipse .classpath to aspectj 1.6.8 2010-02-04 13:45:14 +00:00
Juergen Hoeller 82178b8d93 ignore IllegalStateException when removing shutdown hook (SPR-6793) 2010-02-04 12:30:39 +00:00
Costin Leau 0fd4a45070 + upgrade to AspectJ 1.6.8
+ externalize some of the jar versions
+ align the versions of some dependencies between pom.xml and ivy.xml
2010-02-04 11:46:21 +00:00
Costin Leau ac93b81a78 SPR-6794
+ fix test
2010-02-04 11:33:58 +00:00
Arjen Poutsma 2047b9b6b3 SPR-6788: fixed compareTo() consistency with equals 2010-02-04 11:08:09 +00:00
Costin Leau 4f0876de39 SPR-6794
+ added setter for encoding (in case the default UTF-8 is not enough)
2010-02-04 10:13:04 +00:00
Costin Leau fab29dfee7 + add explicit dependency on commons-pool to prevent version 1.3 from being used (since it contains a memory leak) 2010-02-04 10:05:54 +00:00
Costin Leau 0224cbc3de SPR-6794
+ used UTF-8 as the implicit encoding for reading scripts
2010-02-04 10:04:48 +00:00
Arjen Poutsma 44626054ce SPR-6786: added more checks for quality factors & charsets 2010-02-04 09:47:52 +00:00
Juergen Hoeller 4d09809f17 ApplicationListeners will reliably get invoked through their proxy (if any) 2010-02-03 23:52:56 +00:00
Juergen Hoeller ce6f14bd8b refined addApplicationListener to work any time during the refresh phase 2010-02-03 23:09:42 +00:00
Juergen Hoeller d96a6914a8 ApplicationListeners will get detected lazily as well (e.g. on @Bean's concrete result); inner bean ApplicationListeners will be invoked through their proxy (if any) 2010-02-03 22:54:59 +00:00
Juergen Hoeller 4d897e7ab5 lenient evaluation of boolean 'true' attribute expressions in JSP form tag library (SPR-6790) 2010-02-03 21:56:17 +00:00
Juergen Hoeller 41ecbc6814 fixed WebSphereUowTransactionManager regression: correctly roll back in case of exception (SPR-6695) 2010-02-03 19:41:14 +00:00
Arjen Poutsma 6e21c17253 SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc 2010-02-03 14:02:44 +00:00
Arjen Poutsma 0135a9451a SPR-6786 - The method org.springframework.http.MediaType.parseMediaType does not always throw IllegalArgumentException as the documentantion claims 2010-02-03 13:52:39 +00:00
Arjen Poutsma 0c6b99e489 SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc 2010-02-03 11:38:31 +00:00
Juergen Hoeller a44ec9f4f7 fixed JmsTemplate example (SPR-6789) 2010-02-03 00:29:49 +00:00
Andy Clement 5ca1f11ce2 SPR-6763: more methods on StandardEvaluationContext supporting add/remove from resolver/accessor strategies 2010-02-02 21:38:33 +00:00
Andy Clement 66f708392e SPR-6764: filtering strategy for SpEL method invocation 2010-02-02 19:38:44 +00:00
Arjen Poutsma 4343714c6d SPR-6788 - The class MediaType has a natural ordering that is inconsistent with equals, which is generally recommended or should otherwise at least be indicated in the javadoc 2010-02-02 13:14:19 +00:00
Andy Clement 644f3065b6 SPR-6610: don't wrap runtime exceptions thrown from methods invoked via an expression 2010-02-01 20:13:08 +00:00
Keith Donald 45f79530db with dependencies distribution added 2010-02-01 19:59:05 +00:00
Andy Clement 4c35697c79 SPR-6760: method called twice if exits via exception in a 'normal' case 2010-02-01 19:53:34 +00:00
Juergen Hoeller e3cdabfaac fixed MBeanExporter regression: do not try to expose abstract beans (SPR-6784) 2010-02-01 17:56:03 +00:00
Juergen Hoeller abdc35c893 component-scan's scoped-proxy attribute applies to scope-annotated singleton beans as well (SPR-6683) 2010-02-01 16:51:46 +00:00
Juergen Hoeller 56d2c9daf5 component-scan's scoped-proxy attribute applies to scope-annotated singleton beans as well (SPR-6683) 2010-02-01 16:30:21 +00:00
Arjen Poutsma 208c2d9c8b SPR-6785 - Improve message error when the MarshallingView modelKey attribute is not valid 2010-02-01 15:25:29 +00:00
Juergen Hoeller 1dbb64580c throw NotSerializableException if no serialization id is available 2010-02-01 14:52:43 +00:00
Juergen Hoeller 5f5e7c3262 polishing 2010-02-01 14:51:54 +00:00
Juergen Hoeller db71811c5a SharedEntityManagerCreator's EntityManager proxies are fully serializable now (SPR-6684) 2010-02-01 14:48:18 +00:00
Juergen Hoeller df54c8613d TransactionInterceptor is able to serialize "transactionManagerBeanName" as well (SPR-6680) 2010-02-01 14:45:11 +00:00
Juergen Hoeller 2d525901ff proxies with AspectJ pointcuts are fully serializable within a BeanFactory now (SPR-6681) 2010-02-01 14:43:35 +00:00
Costin Leau dcf0244566 SPR-3786
+ add note on annotation-based injection vs XML
+ provide a nicer introduction to annotation based chapter
2010-02-01 14:36:38 +00:00
Juergen Hoeller 83c018a0b4 call processConfigBeanDefinitions lazily if postProcessBeanDefinitionRegistry hasn't been called 2010-01-31 16:10:11 +00:00
Juergen Hoeller b53ccb3807 widened FactoryBean's "getObjectType" signature to return any Class<?> (SPR-6692) 2010-01-31 16:01:14 +00:00
Juergen Hoeller 8ab9da4461 introduced BeanDefinitionRegistryPostProcessor extension to BeanFactoryPostProcessor; @Configuration classes support definition of BeanFactoryPostProcessor beans as well (SPR-6455, SPR-6611) 2010-01-31 15:58:27 +00:00
Juergen Hoeller a897e3f01f refined DefaultLifecycleProcessor's start/stop logging and stop exception handling (SPR-6769, SPR-6770) 2010-01-31 15:52:13 +00:00
Juergen Hoeller 59b8a139d7 JndiObjectFactoryBean explicitly only chooses public interfaces as default proxy interfaces (SPR-5869) 2010-01-31 14:59:27 +00:00
Juergen Hoeller 9c44f9252d fixed cron example (SPR-6772) 2010-01-31 14:17:44 +00:00
Juergen Hoeller 6070a498fe BeanNameAutoProxyCreator detects alias matches for specified bean names as well (SPR-6774) 2010-01-31 14:12:48 +00:00
Juergen Hoeller 6b2b5c4c23 introduced BeanDefinitionRegistryPostProcessor extension to BeanFactoryPostProcessor; @Configuration classes support definition of BeanFactoryPostProcessor beans as well (SPR-6455, SPR-6611) 2010-01-31 14:05:28 +00:00
Juergen Hoeller 2d6ea2f4fe fixed JPA multi-unit setup example (SPR-6781) 2010-01-31 12:59:59 +00:00
Chris Beams fbd797e50b RESOLVED - issue SPR-6779: imported @Configuration classes do not get enhanced and fail to satisfy scoping requirements
refactoring, polishing.
2010-01-29 23:31:53 +00:00
Chris Beams 110b032ad9 IN PROGRESS - issue SPR-6779: imported @Configuration classes do not get enhanced and fail to satisfy scoping requirements
All tests in ImportedConfigurationClassEnhancementTests now pass.  The fix was simple - imported @Configuration class bean definitions were not getting marked with the attribute that indicates that they are indeed @Configuration class bean definitions.  To make this happen, ConfigurationClassPostProcessor's protected checkConfigurationClassCandidate(beanDef) method is being called from within ConfigurationClassBeanDefinitionReader when imported @Configuration classes are being processed.  This is quick and dirty, and the subsequent check-in will refactor the solution appropriately.
2010-01-29 20:55:03 +00:00
Chris Beams 5fdee47841 Unit test cornering bug SPR-6779, 'imported @Configuration classes do not get enhanced and fail to satisfy scoping requirements' 2010-01-29 19:48:25 +00:00
Costin Leau ee2b1cde82 SPR-6775
+ remove class definitions for sticking around (by forcing eager metadata initialization)
+ improve cache size by eliminating the numbers of method metadata objects created
+ improve lookup access on method metadata
2010-01-29 14:27:49 +00:00
Costin Leau 39f81760f8 SPR-6775
+ increase size to 256
2010-01-28 16:03:07 +00:00
Costin Leau b32c4cfb8a SPR-6775
+ replace the vanilla hashmap with a quick-and-dirty, JDK based, fixed LRU cache
2010-01-28 15:51:20 +00:00
Arjen Poutsma f2fdf9fa6b SPR-6771 - HttpMessageConverter should accept Class<? extends T> on can read 2010-01-28 09:23:34 +00:00
Chris Beams 1cda8cb6fa Updated documentation to point out that AnnotationConfigWebApplicationContext can accept both fully-qualified class names as well as base packages to the contextConfigLocation init-param. 2010-01-28 03:42:42 +00:00
Juergen Hoeller d13f0c8052 fixed namespace example (SPR-6766) 2010-01-27 13:48:57 +00:00
Arjen Poutsma 0a4a09a09d SPR-6759 - Jetty 7 doesn't like ShallowEtagHeaderFilter 2010-01-27 13:02:02 +00:00
Costin Leau 1bbe93e535 SPR-3709
+ improved example to work with multi-nested declarations
+ used JDK 5 syntax
+ added documentation code into trunk (including unit test) for easier future reference
2010-01-27 12:25:04 +00:00
Arjen Poutsma b1e2a2ec3c SPR-6577 - MarshallingView auto detect model with Jaxb2Marshaller chooses the wrong object 2010-01-27 10:52:08 +00:00
Costin Leau 71d7b22d5e SPR-3771
+ added table summarizing the Aware interfaces in Spring 3
2010-01-26 17:02:21 +00:00
Costin Leau 1152d51c6f SPR-4493
+ added some clarifications
+ improved the document structure
2010-01-26 14:31:44 +00:00
Arjen Poutsma ead5df4546 SPR-6649 - Request mapping incorrectly receiving all dispatches for a controller 2010-01-26 10:47:36 +00:00
Costin Leau 2f840b1097 SPR-6646
+ replaced handleRequest() with setSynchronizeOnSession() which is final
2010-01-26 10:07:40 +00:00
Juergen Hoeller 0968e9fbd0 LinkedMultiValueMap should implement Serializable (SPR-6765) 2010-01-25 20:04:01 +00:00
Costin Leau bc37c50972 SPR-4493
SPR-6756
2010-01-25 17:03:05 +00:00
Ben Hale 0c2a710787 Upgrade to spring-build 2010-01-23 17:27:51 +00:00
Ben Hale f614150421 Fixed up POM bug 2010-01-23 12:01:54 +00:00
Ben Hale 2afb58e74e Upgraded spring-build 2010-01-23 09:28:22 +00:00
Ben Hale 693a83ba88 Upgraded spring-build 2010-01-23 00:15:00 +00:00
Ben Hale 1305d6ac11 Separated out unit test projects 2010-01-23 00:03:05 +00:00
Ben Hale 265b82013d Updates to allow nightly snapshots of maven central-compatible artifacts 2010-01-22 20:16:25 +00:00
Juergen Hoeller 8c791b529b fixed instrumentation jar names (SPR-6753) 2010-01-22 19:23:11 +00:00
Juergen Hoeller 0f75210408 changed exception wording from "recursive" to "cyclic" (SPR-6755) 2010-01-22 19:10:19 +00:00
Juergen Hoeller dd93a40e7a added test for expression re-evaluation 2010-01-22 16:03:17 +00:00
Juergen Hoeller 6fcca3cd93 accept Set<?> instead of Set<Object> (SPR-6742) 2010-01-22 10:03:13 +00:00
Juergen Hoeller 3339356a55 fixed typo (SPR-6748) 2010-01-22 10:02:12 +00:00
Thomas Risberg b7f143ae58 updated reference documentation with references to "spring-agent.jar" to use "org.springframework.instrument-{version}.jar" (SPR-6597) 2010-01-21 16:49:05 +00:00
Juergen Hoeller bcfef8a4e1 support for JPA 2.0 TypedQuery interface and query vendor interfaces (SPR-6733) 2010-01-21 12:04:26 +00:00
Juergen Hoeller 975dcd7bbf fixed inaccuracies (SPR-6723, SPR-6725) 2010-01-20 22:19:13 +00:00
Juergen Hoeller 0a6f2348b8 WebRequest is a resolvable dependency in Servlet/Portlet web application contexts (SPR-6727) 2010-01-20 22:09:13 +00:00
Juergen Hoeller 1b6f3f1f22 Query call chaining works with shared EntityManager proxy outside of transaction as well (SPR-6726) 2010-01-20 15:39:17 +00:00
Juergen Hoeller 081d81e5b0 fixed getPropertyTypeDescriptor to work for nested indexed property as well as for array property (SPR-6710) 2010-01-20 15:31:20 +00:00
Juergen Hoeller 5abd3b99b9 fixed getPropertyTypeDescriptor to work for nested indexed property as well (SPR-6710) 2010-01-20 15:10:22 +00:00
Juergen Hoeller a70bb40b3d updated LocalValidatorFactoryBean documentation (SPR-6609) 2010-01-20 11:13:50 +00:00
Juergen Hoeller 8bf2e2459e added default PropertyEditor for java.util.UUID (SPR-6696) 2010-01-20 09:32:03 +00:00
Juergen Hoeller 45448463b8 collect exceptions across all constructors that have been tried (SPR-6720) 2010-01-20 09:29:50 +00:00
Juergen Hoeller 1896efd048 removed references to Perl5RegexpMethodPointcut (SPR-6721) 2010-01-20 09:24:31 +00:00
Juergen Hoeller 6ffb750171 updated CustomEditorConfigurer example to recommended style (SPR-5971) 2010-01-20 09:20:30 +00:00
Juergen Hoeller d9ed1e953e fixed documentation bugs 2010-01-19 14:40:50 +00:00
Juergen Hoeller 9e642e75b2 removed Commons Collection reference from javadoc (SPR-6716) 2010-01-19 14:20:54 +00:00
Juergen Hoeller a6769d60c0 fixed support for JPA 2.0 persistence schema (SPR-6711) 2010-01-18 19:26:52 +00:00
Juergen Hoeller 7a792f6c23 fixed support for JPA 2.0 persistence schema (SPR-6711) 2010-01-18 19:17:52 +00:00
Juergen Hoeller 95c695eb2f fixed BeanPostProcessor invocation for null bean (SPR-6700) 2010-01-18 18:51:28 +00:00
Juergen Hoeller 7097a9e965 proceed in case of resolution failure for a single resource entry in the list 2010-01-18 18:27:30 +00:00
Juergen Hoeller c31f245dc9 added test for system placeholders in PropertyPlaceholerConfigurer's Resource array property 2010-01-18 15:52:52 +00:00
Juergen Hoeller 88ff3c9a23 only try to restore attribute if the value differs (ignoring Portlet spec attributes; SPR-6712) 2010-01-18 15:51:00 +00:00
Chris Beams f82563fb6f polishing 2010-01-18 15:45:10 +00:00
Chris Beams 4c05eaeb16 Resolved SPR-6602, relating to FactoryBean behavior in @Configuration classes. See issue and code comments for full details. 2010-01-18 08:54:45 +00:00
Arjen Poutsma 1cd0a9750d SPR-6467 - Allow ContentNegotiatingViewResolver to be strict ant return a 406 if no view found 2010-01-15 16:37:58 +00:00
Arjen Poutsma 0cb9271b95 Test for SPR-6690 2010-01-15 11:17:27 +00:00
Arjen Poutsma 8d5fc2bf91 SPR-6686 - @ResponseBody throws HttpMediaTypeNotAcceptableException if client accepts "*/*" 2010-01-15 10:23:59 +00:00
Juergen Hoeller f7952fccc8 fixed sample code (SPR-6687) 2010-01-14 17:01:40 +00:00
Juergen Hoeller 23b0f82173 fixed link to blog entry (SPR-6691) 2010-01-14 16:55:33 +00:00
Juergen Hoeller 0cc0a9bc2b added "concurrency" property to Default/SimpleMessageListenerContainer and JmsActivationSpecConfig, supporting placeholders for the jms namespace "concurrency" attribute now (SPR-6232) 2010-01-14 11:17:15 +00:00
Juergen Hoeller 998aa14981 fixed resolveRootDirResource regression (SPR-6592) 2010-01-13 18:24:16 +00:00
David Syer b077d5ba97 SPR-6678: fix poms for 3.0.1 2010-01-13 11:07:08 +00:00
David Syer e4d8651aa9 RESOLVED - issue SPR-6668: Small Connection leak in DataSourceInitializer
http://jira.springframework.org/browse/SPR-6668
2010-01-13 11:00:41 +00:00
Juergen Hoeller e195c39d3c unresolvable placeholders will be ignored by default for Resource array properties as well (SPR-6654) 2010-01-12 19:50:18 +00:00
Juergen Hoeller 7cbd9e1d93 fixed type assignability check for wildcarded Map (SPR-6676) 2010-01-12 15:31:30 +00:00
Juergen Hoeller 1ff99f2569 MBeanClientInterceptor understands CompositeData/TabularData arrays (SPR-6548) 2010-01-12 15:10:07 +00:00
Juergen Hoeller 2e032889ef added "alwaysTranslate" flag (SPR-6630) 2010-01-12 13:26:22 +00:00
Juergen Hoeller fd3a39dc98 MimeMessageHelper encodes from, to, cc, bcc String addresses with given encoding as well (SPR-6530) 2010-01-12 13:19:50 +00:00
Juergen Hoeller 38cf127c8b mark spring-aop as required for spring-context (SPR-6578) 2010-01-12 12:49:16 +00:00
Juergen Hoeller 0ba8375546 full support for JPA 2.0 PersistenceUnitInfo SPI (for compatibility with Hibernate 3.5 beta 3; SPR-6408) 2010-01-12 12:39:56 +00:00
Juergen Hoeller 5c41e2c6e1 made comment prefix configurable (SPR-6667) 2010-01-12 10:15:04 +00:00
Mark Fisher 410dd0aa9f SPR-6670 @Scheduled now supports property placeholders for cron expressions. 2010-01-11 20:20:33 +00:00
Mark Fisher 1284086ffa SPR-6669 @Scheduled may now be used as a meta-annotation 2010-01-11 18:36:48 +00:00
David Syer 543515e36c RESOLVED - issue SPR-6666: CronTrigger/CronSequenceGenerator fails to handle daylight saving timezone changes 2010-01-11 16:05:12 +00:00
Arjen Poutsma bb3c8e5c87 SPR-6640 - PathVariable does not work properly after updated to 3.0 GA 2010-01-11 11:27:43 +00:00
Juergen Hoeller a70f525d4e fixed toString handling (SPR-5582) 2010-01-09 18:39:03 +00:00
Juergen Hoeller 4ca54fb415 fixed @Scheduled processing to kick in once only even in an ApplicationContext hierarchy (SPR-6656) 2010-01-08 16:00:07 +00:00
Juergen Hoeller 2ef40d2422 fixed typos 2010-01-08 15:47:20 +00:00
Juergen Hoeller b9a3d3f392 polishing 2010-01-07 23:29:13 +00:00
Juergen Hoeller 38f5c7a1d5 added assertion 2010-01-07 23:28:25 +00:00
Juergen Hoeller b56328aa9e replaced references to "spring-agent.jar" with "org.springframework.instrument.jar" (SPR-6597) 2010-01-07 13:32:42 +00:00
Juergen Hoeller 4a90266f8e expose offending value through public "getValue()" method (SPR-6629) 2010-01-07 13:27:40 +00:00
Juergen Hoeller 8af7f27942 ApplicationListeners will only be executed once per event (even for scripted objects; SPR-6589) 2010-01-07 12:58:18 +00:00
Juergen Hoeller 8bda9cd2bf fixed StandardEvaluationContext code sample 2010-01-07 11:59:31 +00:00
Juergen Hoeller a939c4ea4e polishing 2010-01-06 22:24:30 +00:00
Juergen Hoeller c270d347cf DefaultLifecycleProcessor etc 2010-01-06 22:23:55 +00:00
Juergen Hoeller 2ba1dd47b0 allow for identifying a specific JBossWorkManagerMBean (SPR-6648) 2010-01-06 22:15:58 +00:00
Juergen Hoeller 431fd5bb22 allow for overriding specific DefaultLifecycleProcessor hooks (SPR-6617) 2010-01-06 19:48:48 +00:00
Juergen Hoeller 819f4be08e added lock timeout error code for H2 (SPR-6612) 2010-01-06 19:35:15 +00:00
Mark Fisher 4ab4fa7042 SPR-6644 The 'id' value from an 'executor' element in the task namespace is now used as the thread name prefix for the resulting ThreadPoolTaskExecutor instance. 2010-01-05 22:27:47 +00:00
Juergen Hoeller 265084cb6c fixed retriever cache putting 2010-01-05 14:46:15 +00:00
Juergen Hoeller a7a03356f4 revised JSP-based views to never fail when trying to setting forward attributes (SPR-6623) 2010-01-05 14:03:27 +00:00
Juergen Hoeller 4931e8b229 fixed "inner vs. nested class" terminology (SPR-6608) 2010-01-05 14:01:30 +00:00
Juergen Hoeller b594192425 refactored to pass along original ServletContext (for WebLogic and Resin JSP compatibility; SPR-6606) 2010-01-05 13:27:53 +00:00
Juergen Hoeller e5d4ffc166 reset retriever cache when adding/removing listeners (SPR-6624) 2010-01-05 13:09:03 +00:00
Juergen Hoeller f7b0a2c0a2 fixed JavaConfig sample code (SPR-6637, SPR-6638) 2010-01-05 12:58:41 +00:00
Juergen Hoeller 9ca6003533 fixed scoped proxy unwrapping (SPR-6625) 2010-01-05 12:52:28 +00:00
Juergen Hoeller e328083d11 updated manifest for new JPA 2.0 criteria package (SPR-6636) 2010-01-05 12:50:22 +00:00
Chris Beams d1b3f57320 Resolved SPR-6618. Restrictions were too tight on overloaded bean methods and were preventing it altogether. Overloading is now allowed, as long as there is no ambiguity at runtime which bean method should be invoked. 2009-12-30 19:42:12 +00:00
Juergen Hoeller 75d0f9b95c initial preparations for 3.0.1 release 2009-12-28 18:58:07 +00:00
Juergen Hoeller 0fb4af6b59 generic ApplicationListener event type gets detected through proxy as well 2009-12-28 18:57:15 +00:00
Chris Beams d2f28ccf41 SJC-273 resolved minor @Configuration documentation error 2009-12-28 07:00:49 +00:00
Juergen Hoeller bddb38d787 fixed getBeansWithAnnotation to ignore beans with non-determinable type (SPR-6579) 2009-12-23 19:11:19 +00:00
Christian Dupuis f3274624b3 STS-723: fixed ViewControllerBeanDefinitionParser to not rely on instance state for handler mapping and handler adapter bean names 2009-12-22 16:52:33 +00:00
Arjen Poutsma 4160fc85f2 Updated build for 3.0.1 2009-12-17 10:53:15 +00:00
Chris Beams f6228b91e5 Resolved SPR-6187: touch-ups based on mfisher's feedback. 2009-12-16 08:44:54 +00:00
Juergen Hoeller f208988563 polishing 2009-12-15 21:37:59 +00:00
Juergen Hoeller fd1bfeefe4 avoid hard-coded AOP dependency for ScopedObject check 2009-12-15 21:20:51 +00:00
Juergen Hoeller 198911e0d2 removed hard ScopedProxyUtils dependency in ConfigurationClassEnhancer 2009-12-15 20:45:45 +00:00
Juergen Hoeller 776f0490f9 prepared for 3.0 GA release 2009-12-15 20:21:07 +00:00
Juergen Hoeller 2ec39f5000 TypedValue.NULL_TYPED_VALUE -> TypedValue.NULL 2009-12-15 20:19:24 +00:00
Juergen Hoeller dc99df2972 use TypeDescriptor.forObject instead of constructor; enforce use of TypeDescriptor.valueOf through making the constructor private 2009-12-15 20:18:31 +00:00
Keith Donald 7fb19d658b primitive desc caching 2009-12-15 19:55:10 +00:00
Keith Donald 2fef141a00 TypeDescriptor.valueOf usage in favor of constants; TypedValue usage simplification 2009-12-15 19:41:52 +00:00
Keith Donald f37d7082a2 moved public methods up 2009-12-15 18:51:28 +00:00
Keith Donald 39325958bc moved static factory methods up 2009-12-15 18:50:17 +00:00
Juergen Hoeller d6f4f4c7b4 BeanValidationPostProcessor runs in before-initialization phase by default (SPR-6565) 2009-12-15 18:04:44 +00:00
Keith Donald 943c46b07d value of optmization 2009-12-15 17:52:52 +00:00
Keith Donald 8ff801648d object to String not supported test case 2009-12-15 16:07:43 +00:00
Keith Donald 5c7c56a6b3 ObjectToObject converter now only matches public methods/constructors; private class method invocations also supported now through a makeAccessible call 2009-12-15 15:53:11 +00:00
Keith Donald b64945988b general polishing 2009-12-15 15:09:25 +00:00
Keith Donald bb93f5967f removed generic warning 2009-12-15 14:00:27 +00:00
Juergen Hoeller 1c33206042 catch ConversionException and ConvertedNotFoundException in BeanWrapper's convertIfNecessary as well, in order to support constructor resolution (SPR-6563) 2009-12-15 12:53:36 +00:00
Juergen Hoeller 2153b2fbd5 introspect element type in case of incoming Collection/Map in order to not accidentally say canConvert=true (SPR-6564) 2009-12-15 12:36:22 +00:00
Juergen Hoeller 5f9f69958e refined PropertyEditor exposure for the ConversionService case 2009-12-15 11:34:19 +00:00
Chris Beams 0057481a0a SPR-6187: Document @Configuration classes and AnnotationConfig[Web]ApplicationContext 2009-12-15 11:04:25 +00:00
Juergen Hoeller f52986ea15 introduced TypeDescriptor.OBJECT and TypeDescriptor.STRING 2009-12-15 10:21:16 +00:00
Juergen Hoeller 1b0c6b848d only try to convert to String if canConvert returns true 2009-12-15 09:59:11 +00:00
Chris Beams 2764024351 JavaDoc on AnnotationConfigApplicationContext#scan(String...) 2009-12-15 07:24:12 +00:00
Juergen Hoeller 83a7cb9177 SpelExpressionParser etc 2009-12-15 02:05:34 +00:00
Juergen Hoeller 086aeb0aac rearranged spel subpackages in order to avoid package dependency cycle; introduced SpelParserConfiguration object to replace bit flags 2009-12-15 02:03:16 +00:00
Juergen Hoeller b5b1962530 removed MultipartRequest mixin interface again (avoiding a package dependency cycle) 2009-12-15 00:51:32 +00:00
Keith Donald 5b87793521 html multi-page doc now only generates files per chapter consistent with Spring 2.5 2009-12-15 00:18:46 +00:00
Juergen Hoeller 18b5cd101e ConverterRegistry etc 2009-12-14 21:42:54 +00:00
Juergen Hoeller 86475593bb added special handling of String array values for required fields, e.g. for WebRequestDataBinder (SPR-6552) 2009-12-14 21:42:17 +00:00
Juergen Hoeller 26b3443299 added unit test for setRequiredFields with @MVC (SPR-6552) 2009-12-14 21:32:26 +00:00
Juergen Hoeller 6622c71935 revised default converters; renamed ConverterRegistry's addGenericConverter to addConverter 2009-12-14 21:14:26 +00:00
Costin Leau c2e1f113f5 SPR-5764
+ improved JBoss LTW by using the proper class loader for loading reflection types
2009-12-14 18:56:16 +00:00
Chris Beams 77a70f256c further tweaks on logging section 2009-12-14 17:27:27 +00:00
Chris Beams 56dcd9296a minor usage/grammar improvements in logging section 2009-12-14 17:09:52 +00:00
Costin Leau cb4bc58dbd + improved javadoc (no code changes) 2009-12-14 15:52:01 +00:00
Costin Leau b963906bd1 SPR-6447
+ moved petclinic to spring-samples (https://src.springframework.org/svn/spring-samples/petclinic)
2009-12-14 15:51:33 +00:00
Thomas Risberg d016a1cc2f updated version for 3.0 GA release 2009-12-14 12:58:09 +00:00
David Syer c8d65f078b SPR-6558: correct maven repository locations 2009-12-14 07:17:36 +00:00
Keith Donald d7a8d499be long style formatting tests 2009-12-14 02:02:09 +00:00
Juergen Hoeller 2f539cded9 prepared for 3.0 GA release 2009-12-14 00:58:44 +00:00
Juergen Hoeller 6635a5d96d @ManagedBean coverage in javadoc 2009-12-14 00:58:04 +00:00
Juergen Hoeller cb9619f62b support @ManagedBean for name retrieval in AnnotationBeanNameGenerator as well; support @ManagedBean and @Named for direct use only 2009-12-14 00:53:56 +00:00
Juergen Hoeller 59d9f73f46 ignore client proxies for export 2009-12-13 23:50:48 +00:00
Juergen Hoeller 3cfac84bff updated javadoc (SPR-6546) 2009-12-13 23:45:16 +00:00
Juergen Hoeller 1b8a67d5d7 reimplemented bean lookup to avoid getBeanNamesForType(Object.class) 2009-12-13 23:30:07 +00:00
Juergen Hoeller dc6c1dc727 MBeanExporter detects FactoryBean-exported resources independent from declaration order 2009-12-13 23:28:07 +00:00
Juergen Hoeller db6e807421 removed getBeansWithAnnotation(Class,boolean,boolean) method from ListableBeanFactory; reimplemented getBeansWithAnnotation(Class) to avoid use of getBeanNamesForType(Object.class) 2009-12-13 23:24:43 +00:00
Juergen Hoeller d7a1630381 removed getBeansWithAnnotation(Class,boolean,boolean) method from ListableBeanFactory; reimplemented getBeansWithAnnotation(Class) to avoid use of getBeanNamesForType(Object.class) 2009-12-13 23:23:34 +00:00
Juergen Hoeller 929665d284 fixed accidental breakage in bean class resolution with tempClassLoader 2009-12-13 16:07:03 +00:00
Juergen Hoeller 9d2f7934de fixed non-Lifecycle-FactoryBean with exposed Lifecycle object case (SPR-6545) 2009-12-13 15:47:52 +00:00
Juergen Hoeller 35354ad520 polishing 2009-12-13 15:30:52 +00:00
Juergen Hoeller 42c7be4590 SmartLifecycle retrieval fix, properly taking FactoryBeans into account (SPR-6545) 2009-12-13 15:28:34 +00:00
Juergen Hoeller a0c4d2c13c detect Lifecycle-implementing FactoryBeans as well (SPR-6545) 2009-12-13 14:08:08 +00:00
Juergen Hoeller 5f9b444319 bean properties of type enum array/collection can be populated with comma-separated String (SPR-6547) 2009-12-13 13:21:30 +00:00
Juergen Hoeller b497f6ccad fixed JSR-303 Validator delegation code (SPR-6557) 2009-12-13 12:31:34 +00:00
David Syer 63996cbb06 SPR-6541: move spring repository placeholder into a profile (build) and the other repositories into another profile (legacy-build) 2009-12-13 10:03:59 +00:00
Christian Dupuis 7c6c1c3ad8 some minor adjustments to the mvc namespace to make it work in the tools 2009-12-11 23:03:49 +00:00
Keith Donald 14b69148f9 file names based on section id now; updated sec ids to match conventions 2009-12-11 19:01:25 +00:00
Keith Donald b673087a87 polish 2009-12-11 18:26:12 +00:00
Keith Donald 541cf2de80 removed unused method; polishing 2009-12-11 18:24:44 +00:00
Keith Donald 753d0b0c91 removed generic warning 2009-12-11 18:19:43 +00:00
Keith Donald 027bd24260 polish 2009-12-11 18:16:38 +00:00
Keith Donald 4f4732df45 javadoc polishing 2009-12-11 17:56:41 +00:00
Keith Donald 8d4b9c0810 javadoc 2009-12-11 16:55:33 +00:00
Keith Donald 5ce16e01eb broke out collection to string converter logic from collection to object 2009-12-11 14:45:21 +00:00
David Syer 143ce57e76 SPR-6541: consolidate repositories into a profile (-P build) 2009-12-11 06:23:46 +00:00
Juergen Hoeller e1d5c7310a updated JPA 2.0 support to the final spec (supporting the "getCriteriaBuilder" method) 2009-12-10 21:42:48 +00:00
Juergen Hoeller 859f422cbf component scanning autodetects the new EE 6 "javax.annotation.ManagedBean" stereotype 2009-12-10 20:40:02 +00:00
Juergen Hoeller 77f07da49d autodetect GlassFish V3 as well (SPR-6152) 2009-12-10 18:42:59 +00:00
Keith Donald 96de14ef2e SPR-6537 initial commit; more extensive testing to follow 2009-12-10 17:36:58 +00:00
Keith Donald dd1bbde891 removed generic warning 2009-12-10 16:21:30 +00:00
Arjen Poutsma 04e08d6952 Updated docbook files to use Docbook 4.5 DTDs, so it uses the locally cached versions 2009-12-10 15:22:55 +00:00
Arjen Poutsma 4c76b48fd6 Updated Multipart documentation 2009-12-10 12:37:28 +00:00
Juergen Hoeller dc1b500430 preparations for 3.0 GA 2009-12-09 22:44:11 +00:00
Juergen Hoeller 1e1964a060 reintroduced createBinder template method in Servlet/Portlet AnnotationMethodHandlerAdapter (SPR-6534) 2009-12-09 22:29:43 +00:00
Juergen Hoeller 2ce5090d00 polishing 2009-12-09 17:54:02 +00:00
Juergen Hoeller 8334a03e03 added "converters" property to FormattingConversionServiceFactoryBean as well 2009-12-09 17:53:25 +00:00
Juergen Hoeller bc6b707a22 revised GenericConverter's "getConvertibleTypes()" signature to return Set of ConvertiblePair 2009-12-09 17:52:19 +00:00
Juergen Hoeller 010e72c35a GenericConversionService prefers matches against inherited interfaces over superclasses (SPR-6297) 2009-12-09 16:16:55 +00:00
Juergen Hoeller ad29a2376d PropertyPlaceholderConfigurer is compatible with Spring 2.5 extensions such as GigaSpaces again (SPR-6514) 2009-12-09 16:09:12 +00:00
Juergen Hoeller 3ffc2ba48d revised section on inheriting annotations from interfaces 2009-12-09 15:32:58 +00:00
Juergen Hoeller 31144591b0 revised javadoc (SPR-5720) 2009-12-09 15:24:47 +00:00
Juergen Hoeller 8b0a4921d9 removed unnecessary logging 2009-12-09 14:59:44 +00:00
Costin Leau 74022861c5 SPR-6492
+ upgrade to JRuby 1.4.0
2009-12-09 10:57:54 +00:00
Chris Beams 481dd31006 Renamed tests for AnnotationConfig[Web]ApplicationContext; added tests for scan() and register() methods. 2009-12-08 15:29:27 +00:00
Juergen Hoeller 736c7212db SmartLifecycle beans will get auto-started on demand even if marked as lazy-init (SPR-6515) 2009-12-08 13:27:15 +00:00
Juergen Hoeller 93b17042a2 SmartLifecycle beans will get auto-started on demand even if marked as lazy-init (SPR-6515) 2009-12-08 12:17:01 +00:00
Juergen Hoeller e65ba99e23 use varargs for scan method as well 2009-12-08 10:17:27 +00:00
Costin Leau 95ddeff17d SPR-6492
EBR-551
+ seems I spoke too soon - JRuby is still not in the EBR
2009-12-08 09:19:32 +00:00
Costin Leau 085aecd51f SPR-6492
+ upgrade to JRuby 1.4.0
2009-12-08 08:57:48 +00:00
Juergen Hoeller c4d8f6b3eb extended registerAfterCompletionWithExistingTransaction's exception handling to detect JBoss RollbackException as well (SPR-6450) 2009-12-07 20:53:21 +00:00
Juergen Hoeller 5fdc29f152 polishing 2009-12-07 20:33:33 +00:00
Juergen Hoeller 1d005e12af fail when @DateTimeFormat is being used without JodaTime on the classpath (SPR-6508) 2009-12-07 20:33:03 +00:00
Juergen Hoeller 61f23710eb relaxed warning about ambiguous setters to only be logged in case of actual write access (SPR-6399) 2009-12-07 18:57:32 +00:00
Arjen Poutsma 27e0642543 SPR-6502 - Broken @RequestMapping inheritance 2009-12-07 16:44:51 +00:00
Juergen Hoeller 09a55c8ede import works with relative resources in other classpath roots again (SPR-6493) 2009-12-07 15:16:36 +00:00
Arjen Poutsma 231c8337d2 SPR-6529 - DateTimeFormatAnnotationFormatterFactory calls String.isEmpty(), which exists only in JDK1.6+ 2009-12-07 14:41:30 +00:00
Juergen Hoeller 93abbd0ef7 newTransactionStatus reverted to its original role, just without preparing synchronization (SPR-6521) 2009-12-07 14:27:27 +00:00
Arjen Poutsma 8678652f3e SPR-6528 - PathVariables of type double 2009-12-07 14:25:21 +00:00
Arjen Poutsma 976f920db2 SPR-6482 - @RequestMapping handled incorrectly when value contains "." (dot) character 2009-12-07 13:59:07 +00:00
Juergen Hoeller f36e8252c8 polishing 2009-12-07 09:43:16 +00:00
Juergen Hoeller f72769a621 added order property to AnnotationMethodHandlerAdapter (SPR-6516) 2009-12-07 09:42:44 +00:00
Juergen Hoeller abf6a7ee18 made parse and decorate non-final (SPR-6526) 2009-12-07 09:16:00 +00:00
Andy Clement 33a7bbb485 SPR-6525: avoid need to use #root for method parameter references 2009-12-06 23:21:07 +00:00
Sam Brannen e01c2eafa1 Fixed copy-n-paste errors. 2009-12-04 23:31:28 +00:00
David Syer f4763a801f SPR-5327: Duh: broken build - invalid XML. 2009-12-04 21:39:32 +00:00
Sam Brannen 11d2921767 Removed reference to the British musical and multimedia group "the the". ;) 2009-12-04 20:43:45 +00:00
Juergen Hoeller 0ea5b5ef0b opened up RestTemplate method signatures to Map<String, ?> and Object array instead of enforcing String values 2009-12-04 18:29:53 +00:00
David Syer ad3fa505f3 SPR-5327: tweak the build.xml for core to try and make commons-logging optional in generated poms 2009-12-04 18:26:25 +00:00
David Syer 1202f67cc8 SPR-5327: tweak the ivy.xml so that commons-logging is a separate configuration. It already comes out as optional in the generated poms (including core), which isn't great, but I can't see what is causing that 2009-12-04 18:25:31 +00:00
Juergen Hoeller 12892eef98 fixed String size constraint example (SPR-6517) 2009-12-04 17:29:06 +00:00
Juergen Hoeller 0d413c7e36 reverted schema update implementation for Hibernate 3.2 compatibility (SPR-6509) 2009-12-04 17:19:47 +00:00
David Syer 604a9f077d SPR-5327: update artifact ids 2009-12-04 16:15:20 +00:00
David Syer fae06dc156 SPR-6092: clarify jar name in test docs 2009-12-04 15:21:51 +00:00
David Syer 5013664ec5 BATCH-5327: Correct name of SLF4J 2009-12-04 14:00:58 +00:00
David Syer ebd15e3287 SPR-6092: add section on Ivy 2009-12-04 12:47:47 +00:00
David Syer 0400ccc11f SPR-5327: tidy up aopalliance dependency 2009-12-04 11:33:56 +00:00
David Syer d1dfa873b7 SPR-6092: add section on EBR/Maven and tidy up references to jar files throughout 2009-12-04 11:21:04 +00:00
Juergen Hoeller 95fb766d10 initial preparations for 3.0 GA 2009-12-04 00:58:38 +00:00
Juergen Hoeller e161c93f8d full support for formatters on array/collection elements (SPR-6504) 2009-12-04 00:34:40 +00:00
Juergen Hoeller 388edd7aaa lenient property name casing, beyond standard JavaBeans conventions (SPR-6491) 2009-12-03 23:34:37 +00:00
Juergen Hoeller 0a36596468 do not register default formatters for Date and Calendar (requiring explicit use of @DateTimeFormat there) 2009-12-03 23:26:08 +00:00
Juergen Hoeller 73a75220a8 do not register a default NumberFormatter (SPR-6490) 2009-12-03 22:41:44 +00:00
Juergen Hoeller ac3a1d9132 added since tag 2009-12-03 16:30:51 +00:00
Juergen Hoeller fcfe94139c updated required Hibernate version 2009-12-03 13:18:39 +00:00
Juergen Hoeller b16e502c16 fixed typo 2009-12-03 13:17:08 +00:00
Juergen Hoeller 0b577dd558 fixed dependencies 2009-12-03 13:15:33 +00:00
Sam Brannen 4093935275 JavaDoc polishing 2009-12-02 09:34:12 +00:00
David Syer 277d153604 Add trailing / to repository URLs on S3 (improves build time for clients) 2009-12-02 08:26:13 +00:00
Juergen Hoeller cb9e877e4a preparations for RC3 release 2009-12-01 02:58:38 +00:00
Juergen Hoeller 132bb8a672 polishing 2009-12-01 02:45:12 +00:00
Juergen Hoeller 126f83959b preparations for RC3 release 2009-12-01 02:26:23 +00:00
Juergen Hoeller 69124f9392 JSR-303 SpringValidatorAdapter uses field name as first argument (analogous to bind errors; SPR-6407) 2009-12-01 02:25:48 +00:00
Juergen Hoeller 5165465821 initialize synchronization after begin while instantiating TransactionStatus as early as possible (SPR-6409) 2009-12-01 01:32:51 +00:00
Thomas Risberg d67e655c17 updated version for RC3 release 2009-11-30 17:55:24 +00:00
Thomas Risberg fdfbf2a01b changed jar name to use RELEASE instead of RC1 2009-11-30 17:54:50 +00:00
Keith Donald b7b52fffea renamed path element to mapping per code review 2009-11-30 16:32:59 +00:00
Costin Leau 7a1c4d23b4 SPR-6469
+ renamed spring-agent.jar to org.springframework.instrument.jar through-out the documentation.
2009-11-30 13:18:16 +00:00
David Syer b7e37ddb07 SPR-5327: tidy up Maven dependencies (keeping commons-logging) 2009-11-30 12:57:11 +00:00
David Syer 1a06b6a0ab SPR-5327: tidy up Maven dependencies (keeping commons-logging) 2009-11-30 12:56:25 +00:00
Arjen Poutsma 81d7f5bc5a SPR-6375 - Register sensible default HTTP Message Converters based on what is available in the classpath 2009-11-30 12:21:13 +00:00
Juergen Hoeller 666700f7f3 constructor arguments can be overridden by name in child bean definitions (SPR-6463) 2009-11-30 12:17:28 +00:00
Arjen Poutsma cc32399878 SPR-6470 - Make filterModel() in MappingJacksonJsonView more lenient 2009-11-30 10:29:27 +00:00
Arjen Poutsma 541aae12ef SPR-5802 - NullPointerException when using @CookieValue annotation 2009-11-30 10:16:14 +00:00
Arjen Poutsma 73b54f4efe SPR-6466 - ContentNegotiatingViewResolver can not handle View implementations returning null as content type 2009-11-30 10:10:27 +00:00
Keith Donald c8d6360855 ability to have multiple path patterns per mapped interceptor definition 2009-11-30 07:51:29 +00:00
Keith Donald d4a21f1db8 added back mvc:interceptors element and added interceptor matching based on path pattern; needs review 2009-11-30 02:55:02 +00:00
Keith Donald 0be6473316 javadoc polishing--named Parser String arg name to 'text' 2009-11-28 21:16:01 +00:00
Keith Donald fbfa67e8a6 ordered sorting 2009-11-28 07:20:20 +00:00
Mark Fisher f6a2e58d95 SPR-6341 Added documentation for Lifecycle, SmartLifecycle, and LifecycleProcessor in the 'beans' chapter after init/destroy callbacks are covered. 2009-11-28 00:02:30 +00:00
Mark Fisher a64f0f1ebe Added tests for the DefaultLifecycleProcessor and a custom "lifecycleProcessor" bean. 2009-11-27 20:38:43 +00:00
Mark Fisher 1ac7b95c1d SPR-6460 Added "phase" attribute to the JMS namespace's "jca-listener-container" element. 2009-11-27 18:16:08 +00:00
Mark Fisher dc24944cd9 SPR-6460 Added "phase" attribute to the JMS "listener-container" element. 2009-11-27 17:42:30 +00:00
Mark Fisher b444220564 SPR-5507 When determining start/stop order, the DefaultLifecycleProcessor checks for the new Phased interface rather than SmartLifecycle now. 2009-11-27 17:30:35 +00:00
Keith Donald 57f0a7d94b added detectInterceptors compatibility check 2009-11-27 17:04:48 +00:00
Mark Fisher 5e1c00ceb2 SPR-5507 Factored out the Phased interface. 2009-11-27 15:59:12 +00:00
Arjen Poutsma e664779f3e Do not require bound classes or context for Jaxb2Marshaller.
RestTemplate now registers JAXB2 and Jackson by default, if found on the classpath.
2009-11-27 14:34:27 +00:00
Arjen Poutsma 01ce468ff2 SPR-6386 - MappingJacksonHttpMessageConverter ignores supported media types property 2009-11-27 14:14:13 +00:00
Arjen Poutsma dc0613f487 HttpMessageConverter.supports() is split into canRead/canWrite.
HttpMessageConverter.write() now allows for a specific content type.
2009-11-27 13:23:15 +00:00
Keith Donald 18c63f70c4 polishing 2009-11-27 04:31:09 +00:00
Juergen Hoeller f751acea12 fixed tests 2009-11-27 02:15:48 +00:00
Juergen Hoeller 7e5106d1ac FormatterRegistry extends ConverterRegistry now; FormattingConversionService extends GenericConversionService 2009-11-27 01:58:31 +00:00
Juergen Hoeller a1916ca765 polishing 2009-11-27 01:49:18 +00:00
Juergen Hoeller d6197b743d clarified double role of id property 2009-11-27 01:45:53 +00:00
Juergen Hoeller d54cf0ca37 polishing 2009-11-27 01:43:34 +00:00
Juergen Hoeller ac490114ae propagate full TypeDescriptor for field-level conversion as well 2009-11-27 01:43:14 +00:00
Juergen Hoeller 973fb6ce40 updated to Groovy 1.6.5 2009-11-27 01:37:43 +00:00
Juergen Hoeller 9400fb3e78 replaced custom asList method with Arrays.asList(ObjectUtils.toObjectArray(...)) 2009-11-27 01:35:45 +00:00
Juergen Hoeller cc0bd730eb polishing 2009-11-27 01:34:56 +00:00
Juergen Hoeller bc06ffb6b8 removed obsolete System.err logging for the property-not-found case 2009-11-27 01:28:54 +00:00
Juergen Hoeller 5e68cc5a58 removed inappropriate assertion that prevents static method calls 2009-11-27 01:03:48 +00:00
Juergen Hoeller 34d4e3cbe0 refined Hibernate version range 2009-11-26 16:09:48 +00:00
Costin Leau fbee526a40 + add oxm.xsd namespace alias 2009-11-26 15:44:29 +00:00
Sam Brannen 218051464d Fixed typo 2009-11-26 12:12:14 +00:00
Juergen Hoeller 1cf0c12674 restored Hibernate 3.2 compatibility (SPR-6387) 2009-11-26 11:08:22 +00:00
Arjen Poutsma 8546e64b03 Support for media subtype suffixes in include(), i.e. application/*+xml includes application/soap+xml 2009-11-26 10:41:22 +00:00
Keith Donald 8259d45583 removed now obsolete test case 2009-11-26 08:39:46 +00:00
Keith Donald de1d548725 SPR-6413 and SPR-6414 first cut: needs review, particularly compatibility note in AbstractHandlerMapping 2009-11-26 08:27:42 +00:00
Juergen Hoeller 6c89946d42 leniently fall back to the passed-in method if a bridge method couldn't be resolved (for Groovy 1.7 compatibility) 2009-11-25 16:55:13 +00:00
David Syer e10161182b RESOLVED - issue SPR-6444: TaskExecutor not initialized in task namespace 2009-11-25 13:18:31 +00:00
Arjen Poutsma 89975c8b79 SPR-6378 - RC2: Issue with RequestMethod.GET differs from M2 2009-11-25 11:12:03 +00:00
Juergen Hoeller 5d2d2bcf39 fixed supported HSQL/H2 version range (SPR-6403) 2009-11-25 00:36:50 +00:00
Juergen Hoeller bb97ca32c4 added configurable "autoGrowNestedPaths" property to DataBinder (SPR-6430) 2009-11-25 00:17:29 +00:00
Juergen Hoeller 9a2f9ccde4 added static newInstance method to BeanPropertyRowMapper (SPR-6433); aligned ParameterizedBeanPropertyRowMapper factory methods 2009-11-25 00:08:57 +00:00
Juergen Hoeller fce0361052 made getTransactionAwareConnectionProxy protected (SPR-6438) 2009-11-24 23:58:03 +00:00
Juergen Hoeller da2ddca34c fixed LifecycleProcessor lookup in a Spring Dynamic Modules context (SPR-6356); moved ConversionService lookup to prepareBeanFactory 2009-11-24 23:46:44 +00:00
Mark Fisher 021663b12f SPR-5507 The 'shutdownOrder' property of SmartLifecycle has been renamed 'phase'. The order no longer applies to shutdown only; now startup order is determined by the phase value as well. Components start in ascending order and stop in descending order. 2009-11-24 16:07:23 +00:00
Costin Leau 1f5568fa81 SPR-4724
+ most of the problems were already fixed (probably by Mark). These are just minor adjustments
2009-11-24 14:32:18 +00:00
Arjen Poutsma ef50082cad SPR-6280 - PathVariable resolution does not work properly 2009-11-24 13:53:37 +00:00
Costin Leau be60908d6d + update pom
SPR-6333
SPR-6394
2009-11-24 09:33:39 +00:00
David Syer 35517b62a0 Change groovy dependency to 1.6.3 to match ANT/ivy 2009-11-24 09:24:03 +00:00
Andy Clement 2e9683aa7c SPR-6347: guidance on when to use getValue(rootObject) vs getValue(evaluationContext) 2009-11-23 21:50:49 +00:00
Keith Donald 12e8f31b38 removed entity to string id conversion routine as it is not required 2009-11-23 00:07:39 +00:00
Keith Donald 064b6db666 Added entity conveter null checking; updated from string converters to simply test str.length() as pre-processing check 2009-11-22 15:40:41 +00:00
Keith Donald 48e1ed0a24 moved test case where it belongs 2009-11-21 18:36:40 +00:00
Keith Donald c3044e122c polish 2009-11-21 18:34:04 +00:00
Keith Donald 9d354192ef additional javadoc and tests 2009-11-21 18:30:34 +00:00
Keith Donald e3462aeef3 minor typo 2009-11-21 17:55:28 +00:00
Keith Donald 94eeb99333 used managed list to detect bean definitions 2009-11-21 17:26:07 +00:00
Keith Donald 7309b11849 mvc namespace interceptors element--ignoring test case until issue with setting collection of bean definition property values is resolved 2009-11-21 16:00:53 +00:00
Keith Donald 44fcc572a7 mvc:interceptors namespace element initial commit 2009-11-21 15:17:26 +00:00
Juergen Hoeller 602118f1a3 extended CGLIB version range (SPR-6400) 2009-11-21 00:30:50 +00:00
Mark Fisher a6b6ba88dc SPR-6368 The parser for the 'executor' element in the task namespace now creates a FactoryBean so that the pool-size range can be configured after property placeholder resolution when necessary. 2009-11-20 22:21:45 +00:00
Mark Fisher 196000d765 removed printlns from test 2009-11-20 21:57:01 +00:00
Thomas Risberg 937de9f032 removed note about getting started guide not ready until 3.0 final 2009-11-20 21:37:03 +00:00
Thomas Risberg 3562858736 updated version for the 3.0 final release 2009-11-20 21:36:05 +00:00
Thomas Risberg 5fbd87d939 updated remaing 2.5.x JavaDoc reeferences to 3.0.x ones (SPR-6402) 2009-11-20 21:24:30 +00:00
Thomas Risberg 12a237a459 changed to use 3.0 xsd references 2009-11-20 20:40:55 +00:00
Costin Leau 502c0e9055 SPR-6401
+ increase cglib range in OSGi manifest
2009-11-20 20:23:21 +00:00
Costin Leau 38d6b55363 SPR-6333
SPR-6393
+ fix invalid static field
2009-11-20 20:04:13 +00:00
Mark Fisher c6f3613411 SPR-6354 DefaultLifecycleProcessor no longer waits for the shutdown of SmartLifecycle beans that are not actually running. 2009-11-20 18:09:14 +00:00
Costin Leau 6653f25e81 SPR-6394
SPR-6333
+ eliminated compile-time dependency on GlassFish custom API for the GlassFish LTW
+ added support for GlassFish 3
2009-11-20 17:48:13 +00:00
Thomas Risberg 5a158fb76f added a "releaseResourcesAfterRead" property defaulting to false and code to handle releasing any LOB resources after read if requested (SPR-5998, SPR-6209) 2009-11-20 17:45:26 +00:00
Keith Donald d9aab1079c found hotspot; added ConverisonServiceFactoryBean 2009-11-20 14:57:40 +00:00
Keith Donald 692b1ef636 found hotspot; added ConverisonServiceFactoryBean 2009-11-20 14:43:12 +00:00
Juergen Hoeller 4024b67926 removed formal deprecation from addPropertyValue; just hinting at add now 2009-11-20 14:28:38 +00:00
Juergen Hoeller 2cb6e21161 Derby requires a publicly accessible stream creation method (SPR-6346) 2009-11-20 14:21:48 +00:00
David Syer f49a8d2e3e Add some tests (and comment out the one that is breaking the build) 2009-11-20 13:36:57 +00:00
David Syer af674bfac4 RESOLVED - issue SPR-6398: Document attributes in @Scheduled and friends
http://jira.springframework.org/browse/SPR-6398
2009-11-20 12:36:02 +00:00
Keith Donald 5716360936 doc updates 2009-11-20 05:07:33 +00:00
Keith Donald b896457586 doc updates 2009-11-20 05:00:28 +00:00
Juergen Hoeller 3b9605bc57 init/destroy methods get processed in the order of declaration at each hierarchy level (SPR-6344); process DestructionAwareBeanPostProcessors in common post-processor order; aligned metadata retrieval code 2009-11-19 23:49:10 +00:00
Costin Leau 4375b9c89a SPR-6333
SPR-6393
+ fixed the tests
2009-11-19 23:01:36 +00:00
Juergen Hoeller 4efa91d2f0 mvc:annotation-driven exposes default Validator and ConversionService as top-level beans (SPR-6377) 2009-11-19 22:34:24 +00:00
Costin Leau a9d4a58294 + fix filename problem 2009-11-19 22:33:15 +00:00
Juergen Hoeller 46cd083976 added chaining-capable "add" method to MutablePropertyValues 2009-11-19 22:30:35 +00:00
Keith Donald a300aa19b6 improved toString method 2009-11-19 22:16:22 +00:00
Keith Donald 34a75c1ae6 improved toString method 2009-11-19 22:16:06 +00:00
Costin Leau ab5e4a4ff3 SPR-6333
SPR-6393
+ eliminated compile-time dependency on oc4j classes
2009-11-19 20:28:16 +00:00
Juergen Hoeller 856fefeaad fixed javadoc to reflect current implementation (SPR-6390) 2009-11-19 19:27:40 +00:00
Juergen Hoeller b41e3956bc revised scope inheritance: default scope is "" (empty String) now; consistent isPrototype checks 2009-11-19 18:32:10 +00:00
Juergen Hoeller ee5330801d BeanDefinitions return isSingleton()=true by default again (for CXF compatibility) 2009-11-19 16:40:06 +00:00
Juergen Hoeller a741410421 TransactionTemplate catches undeclared checked exception and rethrows it as UndeclaredThrowableException (SPR-6361) 2009-11-19 16:36:15 +00:00
Juergen Hoeller eb0b4f0cbd added support for Hibernate 3.3 RegionFactory cache SPI to LocalSessionFactoryBean (SPR-6387) 2009-11-19 15:39:11 +00:00
Keith Donald f2477c4bf5 default conversion service instance caching and tests 2009-11-19 15:27:15 +00:00
Keith Donald da5432fbf5 default conversion service instance caching and tests 2009-11-19 15:23:56 +00:00
Keith Donald 7b561c76fe default conversion service instance caching and tests 2009-11-19 15:22:44 +00:00
Keith Donald 6c66406f7f removed converter matcher since its not used directly 2009-11-19 14:48:41 +00:00
Juergen Hoeller 08f9f8b8fb startup thread marked as daemon now (SPR-6382) 2009-11-19 13:01:20 +00:00
Keith Donald 3bfbcd7276 moved generic converter to spi; added entity converter; removed various service impls in favor of service factory 2009-11-19 09:11:19 +00:00
Keith Donald d85dc01e28 moved generic converter to spi; added entity converter; removed various service impls in favor of service factory 2009-11-19 09:10:51 +00:00
Arjen Poutsma 211e36c249 SPR-6371 - Jaxb2Marshaller should use AnnotationUtils 2009-11-18 14:02:29 +00:00
David Syer 7ac0e2ba02 RESOLVED - issue SPR-6366: Cannot import bean definitions using classpath*: resource location
http://jira.springframework.org/browse/SPR-6366
2009-11-18 07:54:19 +00:00
David Syer 66939ded0f RESOLVED - issue SPR-6366: Cannot import bean definitions using classpath*: resource location
http://jira.springframework.org/browse/SPR-6366
2009-11-17 09:53:10 +00:00
David Syer 17887d24a1 RESOLVED - issue SPR-6365: spring-jdbc.xsd script element claims resource patterns can be used for any SQL resource location but this is only supported for initialize-database tag
Grr: classpath*: again...
2009-11-17 08:36:37 +00:00
David Syer 7519162e65 RESOLVED - issue SPR-6365: spring-jdbc.xsd script element claims resource patterns can be used for any SQL resource location but this is only supported for initialize-database tag
Added resource pattern feature to embedded datasource XML parser.
2009-11-17 07:57:35 +00:00
Keith Donald 3f65721ba8 removed new EmbeddedDatabaeBuilder methods that don't seem very useful for embedded scenarios; javadoc polishing 2009-11-17 00:47:34 +00:00
Luke Taylor 222ae33666 SPR-6087: Updated Javadoc for HandlerInterceptor to indicate invocation order of afterCompletion() methods 2009-11-16 13:24:00 +00:00
David Syer 35472300ae OPEN - issue SPR-6346: NoSuchMethodException in DerbyEmbeddedDatabaseConfigurer
Added derby test case to EmbeddedDatabaseBuilderTests
2009-11-15 13:17:42 +00:00
Sam Brannen 35d4d7bbac Fixed typos 2009-11-15 11:57:52 +00:00
David Syer efb2647978 RESOLVED - issue SPR-6348: ResourceDatabasePopulator is too verbose when reporting ignored failures
http://jira.springframework.org/browse/SPR-6348
2009-11-14 09:04:24 +00:00
David Syer 534f8a4705 RESOLVED - issue SPR-6345: ResourceDatabasePopulator does not handle comments properly when ignoring failures
http://jira.springframework.org/browse/SPR-6345
2009-11-14 09:02:03 +00:00
Keith Donald aac9107f6b SPR-6350 2009-11-14 05:44:46 +00:00
Keith Donald 4877a0412c fixed typo 2009-11-13 19:45:57 +00:00
Luke Taylor 95ad3c923a SPR-5158: Updated description of HandlerInterceptor configuration to spell out which requests the interceptor is applied to 2009-11-13 17:32:33 +00:00
Luke Taylor 5008f7fdec SPR-6338: Fixed columns in jmx metadata-types table 2009-11-13 17:29:33 +00:00
Luke Taylor ef02feed55 SPR-6338: Rewrite of source-level JMX metadata to remove references to commons attributes 2009-11-13 17:18:13 +00:00
Luke Taylor a0b71d867f Removed javadoc refs to JMX commons attribute source 2009-11-13 15:40:17 +00:00
David Syer fc2d8ba73f SPR-5917 Add docs on Lifecycle 2009-11-13 07:48:33 +00:00
Jeremy Grelle e8845c7ead SPR-6340 - Add coverage of JSON support to reference guide 2009-11-13 02:04:22 +00:00
Arjen Poutsma a5be9c5cf5 Changing umlaut to unicode sequence 2009-11-13 01:49:56 +00:00
Jeremy Grelle 58841f3c66 Updated javadoc to reflect minimum JSP version 2.0 2009-11-13 01:39:20 +00:00
Jeremy Grelle 130ef7948d Fixed javadoc 2009-11-13 01:37:40 +00:00
Arjen Poutsma 60d2fdfcea SPR-6188 - UriTemplate: Insufficient handling of characters that need to be escaped. 2009-11-13 01:27:54 +00:00
Juergen Hoeller 8be36fafef introduced dedicated Jsr330ScopeMetadataResolver 2009-11-13 00:36:39 +00:00
Juergen Hoeller 4fb68bef04 polishing 2009-11-13 00:10:37 +00:00
Juergen Hoeller 56778110cd added dedicated onClose notification to differentiate between manual stop and close-driven stop 2009-11-13 00:05:54 +00:00
Keith Donald 4e35c59a20 fixed incorrect example and JSF reference 2009-11-12 22:43:22 +00:00
Keith Donald 3361de3875 SPR-6278 2009-11-12 21:18:17 +00:00
Andy Clement 61a8fa0ebd change PlaceOfBirth toString() so round tripping from String > new PlaceOfBirth(String) > String works ok 2009-11-12 20:56:21 +00:00
Thomas Risberg 3faf28ebaf created a protected doSetValue method so sub-classes can override the implementation easier (SPR-3978) 2009-11-12 20:51:00 +00:00
Thomas Risberg e27330ec5d created a protected doSetValue method so sub-classes can override the implementation easier (SPR-3978) 2009-11-12 20:47:48 +00:00
Thomas Risberg b88db7a594 extracted creation of new ArgPreparedStatementSetter and ArgTypePreparedStatementSetter into protected methods to allow sub-classes to override (SPR-3977) 2009-11-12 19:39:39 +00:00
Thomas Risberg 5491a63f2e added info about the new web-struts module 2009-11-12 19:11:46 +00:00
Thomas Risberg 5ebdf110f5 moved first para to chapter level and removed intro section 2009-11-12 18:23:09 +00:00
Juergen Hoeller 150c0adc74 updated changelog for RC2 release 2009-11-12 17:55:41 +00:00
Juergen Hoeller 0e1b04d082 inner beans detected as ApplicationListeners as well (SPR-6049) 2009-11-12 17:47:34 +00:00
Luke Taylor 94aad0b537 SPR-6219: Corrected typo 2009-11-12 16:55:49 +00:00
Thomas Risberg 4fe21b71a2 updated version to RC2 2009-11-12 16:55:13 +00:00
Luke Taylor afe87ea881 SPR-6220: Corrected spelling of 'DataSource' 2009-11-12 16:53:06 +00:00
Juergen Hoeller a6bba67bca added setValidating to XmlBeanDefinitionReader itself as well (SPR-6336) 2009-11-12 16:35:29 +00:00
Luke Taylor 1ddbfe0759 SPR-6205: Added doc on annotation support for multiple transaction managers 2009-11-12 16:22:42 +00:00
Juergen Hoeller 5d772554ae report error in case of constructor-arg index ambiguity (SPR-6329) 2009-11-12 16:22:42 +00:00
Arjen Poutsma d66fd9843e Reverted changes in r2282: now using varags again. 2009-11-12 16:20:36 +00:00
Arjen Poutsma bee051ece6 SWS-572 2009-11-12 16:09:08 +00:00
Juergen Hoeller 86934e2403 added SQL String and related context to translated JDBCException messages (SPR-6304) 2009-11-12 15:25:32 +00:00
Juergen Hoeller 747300f34c added support for most recent EHCache 1.6 configuration properties to EHCacheFactoryBean (SPR-6234) 2009-11-12 15:15:36 +00:00
Juergen Hoeller 9d59db7944 reintroduced DEFAULT_COOKIE_MAX_AGE in deprecated form (for binary compatibility; SPR-6276) 2009-11-12 14:25:14 +00:00
Juergen Hoeller f595b67618 avoid early Log4J initialization (SPR-6288) 2009-11-12 14:10:35 +00:00
Juergen Hoeller 613b4d182b avoid potential NPE (SPR-6300) 2009-11-12 13:42:07 +00:00
Mark Fisher 6ee17d2826 SPR-5507 javadoc 2009-11-12 13:10:10 +00:00
David Syer 568e6a3b38 RESOLVED - issue SPR-6321: Regression: ResourceEditor in 3.0 does not ignore unresolvable placeholders, but it did in 2.5.6
Different initialization exception popped up in app context
2009-11-12 11:20:51 +00:00
David Syer 38f1383853 RESOLVED - issue SPR-6321: Regression: ResourceEditor in 3.0 does not ignore unresolvable placeholders, but it did in 2.5.6 2009-11-12 11:07:15 +00:00
Keith Donald 7685b516f1 spring 3 mvc namespace whats new 2009-11-12 07:55:02 +00:00
Keith Donald ac551f756d changelog updates 2009-11-12 07:50:46 +00:00
Keith Donald b53f180c14 link to validation section 2009-11-12 07:34:50 +00:00
Keith Donald 2eff486b36 link to validation section 2009-11-12 07:34:02 +00:00
Keith Donald a2d19f1a2d link to validation section 2009-11-12 07:33:29 +00:00
Chris Beams 9f07b15185 Added Javadoc where necessary; polishing. 2009-11-12 07:29:52 +00:00
Keith Donald 2e12907fe4 polish 2009-11-12 07:28:24 +00:00
Keith Donald fefaf123e6 updated refs 2009-11-12 07:15:24 +00:00
Keith Donald 7e90e7a4d5 updated test to reflect correct behavior 2009-11-12 07:13:00 +00:00
Keith Donald eee2a2115a doc polish 2009-11-12 07:11:08 +00:00
Keith Donald 70fe75384d fixed failing tests due to generic object to object converter fallback being over eager 2009-11-12 06:57:51 +00:00
Keith Donald c58378603a validation updateS 2009-11-12 06:22:35 +00:00
Keith Donald b163f123ce valueOf and Constructor-based conversion of source objects to targetTypes 2009-11-12 05:25:03 +00:00
Keith Donald b5cda8db7b Deferring object mapper until Spring 3.1 when it will be used by other projects 2009-11-12 03:54:19 +00:00
Keith Donald 3cdb942cbe Deferring object mapper until Spring 3.1 when it will be used by other projects 2009-11-12 03:53:59 +00:00
Juergen Hoeller 6ef9c2d710 fixed validating to be true by default and to set namespaceAware accordingly 2009-11-12 02:36:53 +00:00
Costin Leau e52e4c5717 + commit actual jboss adapter 2009-11-12 02:31:50 +00:00
Juergen Hoeller c495cbb1bf MergedBeanDefinitionPostProcessors apply after all other post-processors (for @PostConstruct to be invoked after other BPPs; SPR-6066) 2009-11-12 02:30:12 +00:00
Costin Leau 4e321b1a3c + add minor fix to the internal weblogic adapter 2009-11-12 02:29:08 +00:00
Costin Leau 1dc1d5ef9a SPR-5764
+ add dynamic classfiletransformer -> JBoss translator adaptor (since there isn't any in JBoss 5.0.x)
2009-11-12 02:28:42 +00:00
Juergen Hoeller 155f6b1aa1 polishing 2009-11-12 02:27:31 +00:00
Juergen Hoeller 1c839dbe9c added setValidating method to AbstractXmlApplicationContext, analogous to GenericXmlApplicationContext 2009-11-12 02:14:01 +00:00
Juergen Hoeller 0832334648 polishing 2009-11-12 02:11:12 +00:00
Juergen Hoeller a884a407aa child bean definition's scope attribute can be inherited from parent bean definition now (SPR-3542) 2009-11-12 02:10:59 +00:00
Juergen Hoeller fcaf692225 MergedBeanDefinitionPostProcessors apply after all other post-processors (for @PostConstruct to be invoked after other BPPs; SPR-6066) 2009-11-12 02:10:44 +00:00
Mark Fisher 535ec5cffd SPR-5507 Added support for shutdown order on SmartLifecycle. DefaultLifecycleProcessor now manages the shutdown in phases depending on that order (with a timeout value per group). 2009-11-12 02:09:44 +00:00
Juergen Hoeller d666f0a7d6 added GenericXmlApplicationContext with flexible configuration options for its XML support 2009-11-12 01:59:15 +00:00
Juergen Hoeller 7428014ca3 MergedBeanDefinitionPostProcessors apply after all other post-processors (for @PostConstruct to be invoked after other BPPs; SPR-6066) 2009-11-12 01:43:34 +00:00
Costin Leau 190aee17d8 + internal improvement of WebLogic LTW
+ minor improvements to the LTW files (mainly trailing blank lines)
2009-11-12 01:28:32 +00:00
Costin Leau 846c7f6000 SPR-5764
+ redone the JBossLTW (no dependency on the JBoss API)
- removed JBoss jars
- removed JBoss imports (Spring code doesn't rely on it)
2009-11-12 01:25:39 +00:00
Juergen Hoeller d0b6891275 child bean definition's scope attribute can be inherited from parent bean definition now (SPR-3542) 2009-11-12 00:09:05 +00:00
Juergen Hoeller 4a25e2dde0 log a warning in case of ambiguous setter methods (SPR-4931) 2009-11-11 23:27:34 +00:00
Keith Donald e97c2bd7e9 rc2 updates 2009-11-11 23:10:04 +00:00
Keith Donald 48cfb73f15 polish 2009-11-11 23:04:21 +00:00
Keith Donald 5f9ec55512 polish 2009-11-11 23:04:09 +00:00
Keith Donald 035a2beaf5 polish 2009-11-11 22:39:35 +00:00
Keith Donald a90bf29765 formatting docs 2009-11-11 22:37:59 +00:00
Keith Donald d45f9df3c4 doc review 2009-11-11 21:46:00 +00:00
Juergen Hoeller 7a10b7530e improved context shown for non-qualifying dependency (SPR-5912) 2009-11-11 21:44:36 +00:00
Juergen Hoeller d6bab3b674 turned FormattingPropertyEditorAdapter into ConvertingPropertyEditorAdapter 2009-11-11 21:19:20 +00:00
Sam Brannen f8dd5fb5dc Deleting unused imports. 2009-11-11 21:14:25 +00:00
Sam Brannen 14495315a2 Deleting unused imports. 2009-11-11 21:08:32 +00:00
Sam Brannen 2415ec77f8 Fixed typo. 2009-11-11 20:46:36 +00:00
Keith Donald 2aac0aace4 polish 2009-11-11 20:44:32 +00:00
Juergen Hoeller a805819360 introduced populateDefaults template method (SPR-6010) 2009-11-11 19:47:31 +00:00
Juergen Hoeller 022b8b4d1f allow multiple tool:exports entries 2009-11-11 19:42:12 +00:00
Juergen Hoeller 5aefb2ce77 refined javadoc (SPR-5789) 2009-11-11 19:41:13 +00:00
Juergen Hoeller a06adf7203 AnnotationMetadata returns Class values by default (again), allowing for explicit retrieval of String class names where preferred (SPR-5827) 2009-11-11 19:24:43 +00:00
Juergen Hoeller bbd7fb3969 AnnotationMetadata returns Class values by default (again), allowing for explicit retrieval of String class names where preferred (SPR-5827) 2009-11-11 19:11:41 +00:00
Keith Donald afdb96ab2c polish 2009-11-11 19:04:21 +00:00
Keith Donald 6f8eb57dfa polish 2009-11-11 19:02:57 +00:00
Keith Donald 35944af7e1 polish 2009-11-11 19:00:52 +00:00
Keith Donald 522bb6ee56 polish 2009-11-11 18:57:52 +00:00
Keith Donald 7e63df9ea8 annotation driven number formatting with default number formatting rules 2009-11-11 18:53:28 +00:00
Keith Donald b56a47da97 annotation driven number formatting with default number formatting rules 2009-11-11 18:53:02 +00:00
Juergen Hoeller bfffb51257 added JBoss jars 2009-11-11 18:19:47 +00:00
Juergen Hoeller d46c1f600a TransactionAwareDataSourceProxy processes isClosed explicitly in order to avoid potential leaks (SPR-5780) 2009-11-11 18:19:16 +00:00
Thomas Risberg 2b962e7730 added unwrapping of scoped proxy tp unwrapResourceIfNecessary() (SPR-5671) 2009-11-11 18:16:41 +00:00
Arjen Poutsma 68f57aa953 SPR-6308 - Spring Expression Language creates systemProperties bean calling System.getProperties() which in enterprise shared containers is locked down 2009-11-11 16:39:20 +00:00
Thomas Risberg 7844a633b5 added entry for unversioned xsd reference 2009-11-11 16:29:31 +00:00
Thomas Risberg f38b8975c5 added entry for unversioned xsd reference 2009-11-11 16:25:34 +00:00
Keith Donald fdabfefe32 docs 2009-11-11 15:51:43 +00:00
Keith Donald a725717261 tests for custom conversion service / validator 2009-11-11 15:43:57 +00:00
Christian Dupuis cb8b603bdf update icon for mvc namespace 2009-11-11 15:42:53 +00:00
Keith Donald e690bf0c62 not needed according to Christian 2009-11-11 15:28:29 +00:00
Keith Donald 6f3dfe13d0 mvc namespace conversion-service and validator attributes 2009-11-11 15:26:08 +00:00
Luke Taylor 89d997a5bc SPR-3695: Added note on servlet/JSP/JSTL versions with reference to external blog article 2009-11-11 14:03:09 +00:00
Chris Beams 2663ab9975 fixed typo in javadoc: s/poitncut/pointcut/ 2009-11-11 01:38:26 +00:00
Chris Beams ee553f7804 SPR-6328: Rename @ImportXml -> @ImportResource and allow for usage of non-XML BeanDefinitionReader types 2009-11-11 00:48:30 +00:00
Mark Fisher 81efd48352 SPR-5507 SchedulerFactoryBean now implements SmartLifecycle instead of ApplicationListener. 2009-11-10 23:25:29 +00:00
Thomas Risberg 7d2b3f2e7e relaxed Map<String, Object> to Map<String, ?> for method parameter 2009-11-10 23:14:54 +00:00
Keith Donald 36e00054b6 polish 2009-11-10 20:46:06 +00:00
Keith Donald 417939774c removed old dir 2009-11-10 20:43:49 +00:00
Keith Donald 04dee9ab76 removed old dir 2009-11-10 20:43:10 +00:00
Keith Donald 17bbdfc13f polish 2009-11-10 20:42:33 +00:00
Keith Donald 4b76cdd1a3 date time format code review 2009-11-10 20:34:59 +00:00
Luke Taylor ae3e0c0bda SPR-5276: Updated Acegi site link to point to Spring Security 2009-11-10 20:26:49 +00:00
Keith Donald 1bb007c321 results of code review of mvc namespace 2009-11-10 19:15:32 +00:00
Luke Taylor 4a5a2b18ac SPR-6169: Clarified that DispatcherServlet configuraion options are init-param values for the servlet declaration, not context params 2009-11-10 19:03:17 +00:00
Luke Taylor d293c2248c SPR-5430,SPR-6224: Converted deprecated view property names to use '.(class)' syntax. 2009-11-10 18:44:56 +00:00
Thomas Risberg f91d44691e added note to changelog about supporting load-time weaving in JBoss 5 (SPR-5764) 2009-11-10 16:19:03 +00:00
Luke Taylor edf331b5a6 SPR-6293: Updated required tiles version to 2.1.2 2009-11-10 14:29:30 +00:00
Mark Fisher d5fd22c8fe SPR-5507 GenericMessageEndpointManager now implements SmartLifecycle instead of ApplicationListener. 2009-11-10 12:59:50 +00:00
Mark Fisher a15a9600b7 SPR-5507 AbstractJmsListeningContainer now implements SmartLifecycle instead of ApplicationListener. 2009-11-10 04:52:56 +00:00
Mark Fisher a7c1f6b730 SPR-5507 Added SmartLifecycle interface with 'isAutoStartup' method and added an 'onRefresh' method to the LifecycleProcessor. 2009-11-10 04:49:13 +00:00
Keith Donald 91dd752e71 added test dep to ivy.xml causing build failure 2009-11-10 04:32:48 +00:00
Mark Fisher 5b088f5cb4 SPR-5507 Factored out Lifecycle management to a LifecycleProcessor strategy with the default implementation as DefaultLifecycleProcessor. The 'lifecycleProcessor' bean may be defined to override the default. 2009-11-10 04:00:42 +00:00
Keith Donald 566516b89a polishing 2009-11-09 21:59:59 +00:00
Keith Donald 835b958911 polish 2009-11-09 21:10:51 +00:00
Keith Donald 6f4112af80 updated favoring style pattern string instead of Style enum for DateTimeFormat 2009-11-09 21:07:41 +00:00
Keith Donald 7ed6c164b6 javadoc polishing 2009-11-09 20:25:03 +00:00
Juergen Hoeller 90f8e5dcf8 WebSphereUowTransactionManager suspends synchronizations even without existing transaction (SPR-6167) 2009-11-09 19:59:27 +00:00
Costin Leau c3bf658058 SPR-6102
+ add old method for backwards compatibility
2009-11-09 19:11:41 +00:00
Costin Leau af0a529bb5 SPR-6102
+ loosen FrameworkServlet#createWebApplicationContext signature
2009-11-09 18:27:10 +00:00
Costin Leau bcc6413ef7 SPR-5762
+ allow unknown URL protocols to be used with import directive
2009-11-09 15:59:08 +00:00
Arjen Poutsma 077055c8f2 SPR-6291 - UrlPathHelper is too aggressive decoding URLs 2009-11-09 12:15:17 +00:00
Costin Leau 24a9ecd4a3 + removed unused imports 2009-11-09 12:02:42 +00:00
Costin Leau 9a111e504f SPR-6194
+ add setter for servlet minor version to MockServletContext
2009-11-09 11:51:30 +00:00
Arjen Poutsma 7ec9f1506a SPR-6005 - org.springframework.beans.propertyeditors.URIEditor does double escaping for % signes for URIs that contain a schema 2009-11-09 09:15:49 +00:00
Sam Brannen 2cc6155dec JavaDoc 2009-11-08 14:27:47 +00:00
Thomas Risberg 076b912f05 removed filter for classes from the JPA providers package for EclipseLink (SPR-6040) 2009-11-07 19:46:46 +00:00
Chris Beams 46aabf0b65 Additional tests rounding out @ImportXml coverage 2009-11-07 03:53:58 +00:00
Keith Donald 7bd34a6cb1 added format import to web.servlet manifest 2009-11-07 03:53:38 +00:00
Juergen Hoeller 2922b1fcb9 updated for extended RC2 period 2009-11-07 01:32:31 +00:00
Juergen Hoeller 15777818c4 made Excel tests work 2009-11-07 01:32:18 +00:00
Juergen Hoeller 2a0b3cf3c9 polishing 2009-11-07 01:30:50 +00:00
Juergen Hoeller 205b5a477b JSR-303 Validator will only register validation failures if no binding failure happened 2009-11-07 01:29:50 +00:00
Juergen Hoeller 4e233047c8 TilesConfigurer only sets up EL support if JSP 2.1 is present (for JSP 2.0 compatibility; SPR-6309) 2009-11-07 01:16:40 +00:00
Juergen Hoeller b321376703 AbstractExcelView is compatible with Apache POI 3.0 as well as 3.5 now (SPR-6298) 2009-11-07 01:11:53 +00:00
Juergen Hoeller a62068461f AbstractApplicationContext can also start up in case of system properties access failure 2009-11-07 01:09:02 +00:00
Keith Donald fe4f41d33c default config for web binding initializer and formatting/conversion system w/ mvc namespace 2009-11-07 00:41:08 +00:00
Chris Beams 8ece98c694 Fixed build breakage due to use of WebDataBinder.setDisallowedFields(String); changed calls to use the updated String[] signature. 2009-11-07 00:40:50 +00:00
Chris Beams 0a4463fb71 SPR-6158: Initial implementation and tests for @ImportXml 2009-11-07 00:32:40 +00:00
Chris Beams 20ec13ded5 SPR-5529: removed package.html files 2009-11-06 23:15:35 +00:00
Chris Beams ca0b590bb9 SPR-5523: converted a few additional package.html artifacts to package-info.java 2009-11-06 23:13:15 +00:00
Juergen Hoeller 6494041849 changed Servlet API dependency to provided (SPR-6284) 2009-11-06 16:42:14 +00:00
Keith Donald ee15bbb494 mvc namespace installation of handler mapping and handler adapter 2009-11-06 15:38:08 +00:00
Mark Fisher d96bea9f6a SPR-4716 GenericMessageEndpointManager now "auto-starts" upon receiving a ContextRefreshedEvent rather than within afterPropertiesSet(). 2009-11-06 15:24:12 +00:00
Arjen Poutsma d415d36192 Renamed Md5HashUtils to DigestUtils 2009-11-06 11:52:53 +00:00
Mark Fisher 91297d9863 SPR-6307 Quartz SchedulerFactoryBean now "auto-starts" upon receiving a ContextRefreshedEvent rather than within afterPropertiesSet(). 2009-11-05 23:41:01 +00:00
Mark Fisher 40720ab0f1 SPR-4716 AbstractJmsListeningContainer now "auto-starts" upon receiving a ContextRefreshedEvent rather than within afterPropertiesSet(). 2009-11-05 22:05:52 +00:00
Keith Donald 389ad03e84 package info file 2009-11-05 21:49:46 +00:00
Keith Donald 733be4f400 spring mvc namespace initial commit; work in progress 2009-11-05 21:49:21 +00:00
Keith Donald fed96f85ae fixed failing test due to case issue 2009-11-05 19:17:53 +00:00
Keith Donald b6ec4e30d9 javadoc polish 2009-11-05 17:48:54 +00:00
Keith Donald d65454175d iso date time format tests 2009-11-05 17:18:54 +00:00
Arjen Poutsma 8de34c6fa7 SPR-6301 - Support @RequestHeader on HttpHeaders parameters 2009-11-05 15:42:24 +00:00
Keith Donald a62b413be4 Renamed org.springframework.ui.format package to simply org.springframework.format package; 'ui' is not adding any value - it makes the package name longer and also discourages use of formatters outside in other "non ui" environments where localized formatting of field values is needed. 2009-11-05 15:21:22 +00:00
Keith Donald f0de1c3069 revised matchable converter lookup algorithm; added conversion service bean container tests 2009-11-05 14:52:57 +00:00
Arjen Poutsma c812cd370b Fixing test 2009-11-05 13:44:52 +00:00
Arjen Poutsma db252cd0af SPR-6303 - Add more logging to RestTemplate 2009-11-05 13:32:14 +00:00
Arjen Poutsma f1075c7b04 javadoc. 2009-11-05 10:17:37 +00:00
Keith Donald bc4d52a7e3 added date midnight 2009-11-05 05:24:50 +00:00
Keith Donald 2405848c4c comment on ignored test 2009-11-05 05:21:19 +00:00
Keith Donald ba0f1da96f more joda time formatting tests 2009-11-05 05:19:27 +00:00
Keith Donald 8a15486de3 fixed bug related to annotation driven formatting 2009-11-04 23:12:24 +00:00
Keith Donald ff39bc376f formatting tests and polishing 2009-11-04 23:02:10 +00:00
Keith Donald 9ec337b736 joda time formatting tests 2009-11-04 22:53:26 +00:00
Keith Donald 791832789d polish 2009-11-04 17:38:17 +00:00
Keith Donald 0df1bac33c since 3.0 2009-11-04 17:33:09 +00:00
Keith Donald 9fdd11c89c polish 2009-11-04 17:25:37 +00:00
Keith Donald 6d020502b9 polish 2009-11-04 17:23:31 +00:00
Keith Donald 53f3d0b755 polish 2009-11-04 17:22:09 +00:00
Keith Donald 374ea05028 polish 2009-11-04 17:08:51 +00:00
Keith Donald ffbfa2992c polish 2009-11-04 17:07:25 +00:00
Keith Donald 0a78287a8f formatters now plugged into unified type conversion api with formatter specific registry spi 2009-11-04 00:08:47 +00:00
Keith Donald 2e4fa28ca6 removed embedded databases factory in favor of new useDefaultScripts builder method 2009-11-03 23:19:26 +00:00
Keith Donald f1d012bffa embeddedd databases convenience factory; builder polishing 2009-11-03 23:05:41 +00:00
Scott Andrews 6c80dbaa9e polish - removing unused import 2009-11-03 21:02:22 +00:00
Scott Andrews 67b5781dab SPR-6296 Spring:url tag should not use application/x-www-form-urlencoded encoding
Work around for application/x-www-form-urlencoded encoding.  Replaces '+' from java.net.URLDecoder with charset specific encoded space value ('%20' for most charsets).

The custom urlEncode method should be replaced with calls to a true URL encoder once available.
2009-11-03 21:01:23 +00:00
Ramnivas Laddad 868cf09b2d Modified staticmethod mocking to remove compile-time dependency on JUnit (see ROO-314 and related issues) 2009-11-03 00:51:22 +00:00
Sam Brannen 04a7656292 Updated ivy settings so that org.jboss.util is downloaded to the local repository; updated Eclipse classpath regarding latest version of org.jboss.util; added classpath entry for org.jboss.classloading.spi so that JBoss5ClassLoader compiles in Eclipse. 2009-11-01 17:02:08 +00:00
Keith Donald 470302ecc6 javadoc 2009-10-30 20:35:29 +00:00
Keith Donald c8fd4a45fc more eclipse compile errors 2009-10-30 19:59:31 +00:00
Keith Donald f1cab9acda fixed failing test; take 2 2009-10-30 19:52:19 +00:00
Keith Donald 4151c52af6 removed unused import 2009-10-30 19:34:55 +00:00
Keith Donald 7a4ca36413 Fixed failed tests 2009-10-30 19:34:21 +00:00
Keith Donald 0b46950818 fixed eclipse classpath compile errors 2009-10-30 19:26:39 +00:00
Keith Donald a2be2e15e9 polish; fixed failed tests 2009-10-30 19:19:27 +00:00
Keith Donald 3a3edb53f6 polish / code review of data source embedded and init 2009-10-30 19:01:48 +00:00
Keith Donald 913bc03a3b ui.format system refining from RC1 feedback: Support for one format annotation applying to multiple field types, Printer/Parser building blocks for more flexibility, full Joda time formatting support, FormattingService as a service entry-point for clients to use 2009-10-30 18:44:40 +00:00
Thomas Risberg 471fbf7ebf added classes from contributed patch for load-time weaving in JBoss 5 (SPR-5764) 2009-10-30 17:11:26 +00:00
David Syer 14e7b46163 RESOLVED - issue SPR-5917: fixed classpath pattern for ANT 2009-10-30 11:51:50 +00:00
David Syer e9a37e4400 RESOLVED - issue SPR-5917: DataSourceInitializer and namespace support for creating and populating databases
Moved classes but not resources (fixed)
2009-10-30 11:26:45 +00:00
David Syer 747f71f9d2 RESOLVED - issue SPR-5917: DataSourceInitializer and namespace support for creating and populating databases
Tweak initializer to allow placeholders for script locations
2009-10-30 11:09:49 +00:00
David Syer 0c8a320130 RESOLVED - issue SPR-5917: updated jdbc docs 2009-10-30 10:32:15 +00:00
David Syer 0db68e1b57 RESOLVED - issue SPR-5917: DataSourceInitializer and namespace support for creating and populating databases
Moved populator to init package and added namespace features
2009-10-30 10:31:37 +00:00
Ramnivas Laddad ab403468f9 Mark junit dependency as compile, since aspects depend on it at compile-time 2009-10-29 17:18:49 +00:00
Arjen Poutsma f839969b6c javadoc. 2009-10-29 12:32:17 +00:00
Arjen Poutsma 2288b2523e SPR-6021 - Allow for using MultiValueMap in GET request for mapping multiple request params 2009-10-29 11:18:43 +00:00
Mark Fisher 53eb612a68 SPR-6059 Avoiding NPE for OR operator. If the value is null instead of a valid boolean or Boolean, it will now trigger an EvaluationException. 2009-10-28 23:14:29 +00:00
Thomas Risberg 4a315ba6d1 fixed rertieval of generated keys for HSQLDB 1.9 and fixed some typos (SPR-6266) 2009-10-28 22:25:58 +00:00
Mark Fisher f4460dcbf7 SPR-6059 Avoiding NPE for unary-not and ternary operators. If the value is null instead of a valid boolean or Boolean, it will now trigger an EvaluationException. 2009-10-28 21:57:09 +00:00
Thomas Risberg a2cd909306 fixed rertieval of generated keys for HSQLDB 1.9 and fixed some typos (SPR-6266) 2009-10-28 19:40:32 +00:00
Thomas Risberg 84c1b56e35 fixed null handling for all Derby drivers to be the same as for the embedded driver (SPR-6000) 2009-10-28 17:14:47 +00:00
Mark Fisher 0baa29f1ac removed @Override from interface method 2009-10-28 14:45:31 +00:00
Mark Fisher 0400b68afb SPR-6240 Added namespace support for ErrorHandler strategy on JMS "listener-container" elements. 2009-10-28 14:36:01 +00:00
David Syer 0e85c66f2f SPR-6246: Java6 @Override removed 2009-10-28 13:56:11 +00:00
David Syer b580696550 Exclude Jetty version of servlet API 2009-10-28 13:43:55 +00:00
David Syer bce723d9e3 SPR-6246: split up Velocity test cases for neatness. Add fix for bug in exception creation in VelocityView. 2009-10-28 13:43:27 +00:00
Mark Fisher 3346752cfd INT-6051 SpEL selection and projection may now be applied to arrays. 2009-10-28 03:42:36 +00:00
Ramnivas Laddad 65f10cceb9 Removed unneeded empty directories 2009-10-28 01:28:28 +00:00
Ramnivas Laddad 92d6dfbe8d Renamed static_mock package to staticmock 2009-10-28 01:23:43 +00:00
Mark Fisher 776edbcae3 SPR-6051 avoiding NPE in TypedValue.toString() 2009-10-27 23:59:46 +00:00
Ramnivas Laddad d1f3772ca1 Fixed a build issue 2009-10-27 19:35:01 +00:00
David Syer 6aa97d5a3a RESOLVED - issue SPR-6038: HSQLDB+Quarz using data source causes "Unexpected token: FOR in statement " exception
Missing ivy dependency
2009-10-27 19:24:15 +00:00
Ramnivas Laddad 66261ecb8c Moved over JPA exception translator from Roo 2009-10-27 19:15:54 +00:00
David Syer 2c0cf49b94 RESOLVED - issue SPR-6038: HSQLDB+Quarz using data source causes "Unexpected token: FOR in statement " exception
Detect HSQL in LocalDataSourceJobStore and force locks to be taken locally (with a SimpleSemaphore)
2009-10-27 18:39:42 +00:00
David Syer 89424579ae OPEN - issue SPR-6038: HSQLDB+Quarz using data source causes "Unexpected token: FOR in statement " exception
Convert test case to JUnit 4
2009-10-27 18:25:18 +00:00
David Syer 092a25d0d8 SPR-4783: missing commit for bean def parser (duh) 2009-10-27 18:03:38 +00:00
Ramnivas Laddad dee410c0c4 Fixed test by moving Delegate to its own file 2009-10-27 17:38:50 +00:00
Ramnivas Laddad 064343d056 Make JUnit a compile-time dependency, since static mock functionality depends on its annotations. 2009-10-27 17:23:23 +00:00
Ramnivas Laddad 451bbce345 Moved over static mock testing from Roo; added tests 2009-10-27 17:16:02 +00:00
David Syer 57afe3baab RESOLVED - issue SPR-4783: OK, that wasn't it (reverted previous dumb change). Scratch, scratch... 2009-10-27 15:48:59 +00:00
David Syer 0cf31f012d RESOLVED - issue SPR-4783: Add name attribute to XML namespaces that want to support it (through parser base class)
Duh: bitten by the classpath*: again
2009-10-27 15:33:59 +00:00
David Syer f23921153d Add resource pattern so that tests run properly with resources in non-standard locations 2009-10-27 15:23:13 +00:00
David Syer dec2ca30c2 RESOLVED - issue SPR-4783: Add name attribute to all namespaces that use AbstractBeanDefinitionParser and declare name= attribute (includes <lang:groovy.../>). 2009-10-27 15:22:36 +00:00
David Syer 1a9599c815 RESOLVED - issue SPR-4661: Improve context-property-placeholder configurablity
Classpath ordering broke the build (duh: test-classes comes before classes in Maven but not Ant).
2009-10-27 14:49:10 +00:00
David Syer b250c65c45 RESOLVED - issue SPR-4661: Improve context-property-placeholder configurablity
Remove spaces from locations (seems like integration from SPR-6195 didn't reach the build yet)
2009-10-27 13:57:48 +00:00
David Syer 4be237dd84 RESOLVED - issue SPR-6195 2009-10-27 13:41:22 +00:00
David Syer a29253f2ca RESOLVED - issue SPR-4661: Improve context-property-placeholder configurability
Added new features to property override and placeholders (order, locations, system-properties-mode, ignore-*)
2009-10-27 13:38:29 +00:00
David Syer c63cdb2444 OPEN - issue SPR-6246: Velocity MethodInvocationExceptions not properly reported
Added test case for exception.  This probably fails on a non-Sun JVM?
2009-10-27 12:32:14 +00:00
David Syer 2978a4d0eb SPR-6160: resolved by referring to 'future release' instead of 2.5 2009-10-27 11:59:59 +00:00
David Syer 46818b038a SPR-6257: Resolved in beans.xml 2009-10-27 11:56:06 +00:00
Arjen Poutsma d0893c425e SPR-6247 - Multipart Content-Type charset is ignored in CommonsFileUploadSupport. 2009-10-27 11:42:36 +00:00
Arjen Poutsma d54a975af4 SPR-6248 - Accept header should not be mandatory for properly handling response body. 2009-10-27 10:50:45 +00:00
David Syer a86baca9cb Add atinject dependency for TCK test 2009-10-26 22:48:35 +00:00
David Syer 8b2a7c8be8 Fix wrong Maven dependency in pom.xml for validation and inject APIs 2009-10-26 22:38:08 +00:00
David Syer 560e07a966 Fix wrong Maven dependency in pom.xml for validation and inject APIs 2009-10-26 22:37:45 +00:00
David Syer 3c9eed1c22 SPR-6273: resolved with patch - use recursive call to reset low order bits and then re-seek match for pattern 2009-10-26 22:37:04 +00:00
Juergen Hoeller 7b54746a50 verified choice of primary bean in case of implicit name match in a scanning plus factory method scenario (SPR-6065) 2009-10-26 15:28:09 +00:00
Sam Brannen 1b92a2fae1 [SPR-6124] Verified that timed transactional tests fail with the TestNG integration in the TestContext framework. 2009-10-26 13:38:59 +00:00
Sam Brannen 02dfe94396 [SPR-6128] Verified that claims raised in this issue no longer apply. 2009-10-26 13:00:04 +00:00
Keith Donald 381d1d5a94 default date/time converters 2009-10-25 04:52:26 +00:00
Sam Brannen d868785b5f fixed DocBook structure and typo 2009-10-24 19:37:10 +00:00
Sam Brannen 83f3df14bd Updating Mail chapter regarding changes in Spring 2.0 and 3.0. 2009-10-24 19:32:05 +00:00
Sam Brannen e651c69a44 Polishing the Portlet sections of the reference manual. 2009-10-24 19:25:09 +00:00
Sam Brannen f14c2de5e9 Polishing the Portlet sections of the reference manual. 2009-10-24 18:58:39 +00:00
Sam Brannen dc897e7b34 Polishing 2009-10-24 17:33:23 +00:00
Sam Brannen d13d556260 Polishing the Portlet sections of the reference manual. 2009-10-24 17:04:52 +00:00
Sam Brannen 642549a1e7 Polishing the web integration sections of the reference manual. 2009-10-24 17:04:08 +00:00
Juergen Hoeller 8a09c8e7da reworked ConfigurationClass(Web)ApplicationContext into AnnotationConfig(Web)ApplicationContext; revised BeansException signatures 2009-10-23 17:46:16 +00:00
Juergen Hoeller 87b2f23692 updated version ranges for javax.el and javax.inject 2009-10-23 17:26:12 +00:00
Sam Brannen cc07b8d002 Polishing the web integration sections of the reference manual. 2009-10-22 13:17:39 +00:00
Sam Brannen 2a4fe95e24 Polishing the MVC sections of the reference manual. 2009-10-22 12:54:34 +00:00
Sam Brannen a995c6f65f Polishing the MVC sections of the reference manual. 2009-10-22 12:53:03 +00:00
Sam Brannen 50f96a268e Added the @Inject TCK to the Eclipse classpath. 2009-10-20 22:27:04 +00:00
Sam Brannen a789bf2f1e Polishing the MVC sections of the reference manual. 2009-10-20 21:56:22 +00:00
Juergen Hoeller ee8ed4e410 fixed getBean signature ambiguity in tests 2009-10-20 20:14:49 +00:00
Juergen Hoeller cf580f024a added first cut of getBean(Class) lookup method 2009-10-20 19:52:30 +00:00
Juergen Hoeller a83756f771 deprecated remoting support for JAX-RPC (in favor of JAX-WS) 2009-10-20 18:35:35 +00:00
Juergen Hoeller 54221500c1 fixed PersistenceInjectionTests 2009-10-20 18:30:55 +00:00
Juergen Hoeller 94533976d0 full compliance with the JSR-330 TCK 2009-10-20 18:18:25 +00:00
Juergen Hoeller a429e230b6 revised version checks and exception signatures 2009-10-20 16:53:24 +00:00
Sam Brannen ccb103417d Polishing the MVC sections of the reference manual. 2009-10-19 22:32:15 +00:00
Sam Brannen 32fb767c87 Polishing the reference manual. 2009-10-19 18:26:02 +00:00
Sam Brannen c399cb1b27 fixed typos 2009-10-19 18:23:51 +00:00
Juergen Hoeller a7f0d50643 fixed ParseException constructor calls (SPR-6239) 2009-10-19 12:59:17 +00:00
Keith Donald db2ff40e4b commented out test failing nightly snapshot 2009-10-19 02:42:29 +00:00
Keith Donald 1c0f188adc maven central joda-time artifact 2009-10-19 02:14:34 +00:00
Keith Donald e4f50f5b73 SPR-6245 bean wrapper copy constructor not copying all state 2009-10-19 01:06:44 +00:00
Keith Donald 2fe6003923 SPR-6199 2009-10-19 00:13:30 +00:00
Keith Donald 0e4064fecc added null handling, fixed bug relating to conversion of non-generic collections 2009-10-18 22:20:53 +00:00
Sam Brannen 206963bcba Polishing the reference manual. 2009-10-18 21:35:56 +00:00
Keith Donald 66e6560560 polish 2009-10-17 06:39:35 +00:00
Keith Donald 44a238616c polish 2009-10-17 06:10:59 +00:00
Keith Donald db9f25d6de polish 2009-10-17 06:10:29 +00:00
Keith Donald be94b45636 polish 2009-10-17 05:54:36 +00:00
Keith Donald bd0356a712 polish 2009-10-17 05:49:28 +00:00
Keith Donald 9584a81687 conditional mapping 2009-10-17 05:33:04 +00:00
Keith Donald 3c4596a424 conditional mapping and polish 2009-10-17 05:32:30 +00:00
Keith Donald f63c3d5313 polish 2009-10-17 04:03:56 +00:00
Keith Donald f55b54ec3b builder 2009-10-16 23:15:48 +00:00
Keith Donald c833269aa3 polish 2009-10-16 23:14:01 +00:00
Keith Donald 106847e739 polish 2009-10-16 23:11:24 +00:00
Keith Donald a221fb5718 MapperFactory and MapperBuilder config API 2009-10-16 22:44:54 +00:00
Sam Brannen 5616770a27 Corrected minor errors regarding JDO, grammar, etc. 2009-10-16 21:29:30 +00:00
Sam Brannen c686035773 Updated Eclipse classpath regarding javax.inject and javax.validation. 2009-10-16 10:16:25 +00:00
Sam Brannen c29cbc18ee Cleaning up and upgrading Eclipse classpaths. 2009-10-16 10:11:10 +00:00
Sam Brannen ad1bfbcbfd Added Eclipse project settings for the new web.struts module. 2009-10-15 23:24:38 +00:00
Keith Donald 3fb3549997 polish 2009-10-15 15:49:26 +00:00
Juergen Hoeller e99cda3739 updated to final versions of JSR-330 and JSR-303 APIs 2009-10-15 14:31:41 +00:00
Arjen Poutsma b42cf25599 SPR-6236: Reintroduce Struts support 2009-10-15 14:04:13 +00:00
Arjen Poutsma 7031c31904 Updated build settings 2009-10-15 13:57:28 +00:00
Arjen Poutsma 7461d70582 SPR-6236: Reintroduce Struts support 2009-10-15 10:50:58 +00:00
Juergen Hoeller 11d987009a revised destroy method lookup after deserialization (avoiding NPE in case of default-destroy-method; SPR-6211) 2009-10-15 10:33:05 +00:00
Arjen Poutsma 7fa9105096 SPR-6236: Reintroduce Struts support 2009-10-15 10:31:47 +00:00
Arjen Poutsma e24e768054 SPR-6164 - a Uri Value is incorrectly extracted if it contains '.'. 2009-10-15 09:18:14 +00:00
Keith Donald 64ded0484e polish 2009-10-15 00:38:18 +00:00
Keith Donald 402f0924da polish 2009-10-15 00:36:31 +00:00
Keith Donald 66d901b9fe naming improvements from mark fisher code review 2009-10-15 00:33:17 +00:00
Keith Donald 4563cb2804 initial joda time support courtesy of Oliver Gierke 2009-10-15 00:20:14 +00:00
Keith Donald d5a954833c method invoking formatter as a convenience 2009-10-14 22:47:14 +00:00
Mark Fisher bc207042d0 SPR-6170 updated CronSequenceGenerator according to patch applied to the 1.0.x branch of Spring Integration 2009-10-14 22:22:21 +00:00
Sam Brannen 62d7369607 JavaDoc polishing 2009-10-14 22:06:51 +00:00
Keith Donald 4d9bf3a45f removed valueOf convention b/c of unwanted side effects 2009-10-14 21:37:57 +00:00
Keith Donald dc076ee6fe fixed failing tests 2009-10-14 20:45:53 +00:00
Keith Donald 728a1415d9 added convention-based default valueOf formatter 2009-10-14 18:57:36 +00:00
Sam Brannen a696a4fec9 DataBinder now accepts var-args to set allowed, disallowed, and required fields 2009-10-14 14:49:24 +00:00
Sam Brannen 52f03fc759 Added "Changes in version 3.0.0.RC2" section. 2009-10-14 14:47:17 +00:00
Sam Brannen 704d4b785b [SPR-6227] Parameterizing with Class<?> and Class<T> where appropriate; suppressing unchecked warnings; and fixed JavaDoc typos. 2009-10-14 14:07:48 +00:00
Sam Brannen 986ccbe2c6 Suppressing unchecked and serial warnings. 2009-10-14 14:03:11 +00:00
Arjen Poutsma 17d5b31af3 SPR-6206 - When looking up methods with @RequestMapping annotation, unannotated bridge methods are included 2009-10-14 12:24:04 +00:00
Sam Brannen 52ad49b3ae fixed typo and JavaDoc polishing. 2009-10-14 10:48:00 +00:00
Arjen Poutsma 5310035700 SPR-6214 - Using @ResponseBody throws HttpMediaTypeNotAcceptableException when it supports writing an acceptable MediaType 2009-10-14 10:46:29 +00:00
Sam Brannen 0f06771249 fixed typo 2009-10-14 10:45:17 +00:00
Arjen Poutsma 523dba7285 SPR-6183 - integration-tests should not be included in the packaged distribution 2009-10-14 10:31:59 +00:00
Arjen Poutsma 8738fd7b7b SPR-6177 - HttpHeadersTests fails with non-english locale 2009-10-14 09:53:25 +00:00
Juergen Hoeller 74f4749372 fixed extraction of Controller suffix (SPR-6153) 2009-10-13 23:10:48 +00:00
Juergen Hoeller b2129577b9 polishing 2009-10-13 22:48:25 +00:00
Juergen Hoeller cfa7216fac deprecated scheduling support for JDK 1.3 Timer 2009-10-13 21:52:44 +00:00
Juergen Hoeller 3331f16ef7 revised RootBeanDefinition constructors 2009-10-13 21:39:27 +00:00
Juergen Hoeller e2af25b891 avoid hard-coded dependency on backport-concurrent (SPR-6161) 2009-10-13 21:37:05 +00:00
Juergen Hoeller b4ffdcdf18 polishing 2009-10-13 20:59:10 +00:00
Juergen Hoeller 84447cdf94 DataBinder activates autoGrowNestedPaths by default; fixed enum binding with WebRequestDataBinder 2009-10-13 20:55:57 +00:00
Juergen Hoeller a293f50851 Enum counts as simple value type 2009-10-13 20:51:59 +00:00
Juergen Hoeller 49b647ca93 check against MultipartRequest mixin interface 2009-10-13 20:51:01 +00:00
Juergen Hoeller 677baaceb8 polishing 2009-10-13 20:49:34 +00:00
Andy Clement c9057fd1da SPR-6230: SpEL improvements 2009-10-13 18:11:34 +00:00
Arjen Poutsma 06286b19ce Added URI variant methods to the RestTemplate. 2009-10-13 14:20:24 +00:00
Sam Brannen 6aee6a16ab polishing 2009-10-13 11:46:40 +00:00
Sam Brannen c8b8cf45b4 fixed typos and programlisting formatting. 2009-10-13 11:20:32 +00:00
Sam Brannen 9cb3fb7012 fixed typo 2009-10-13 11:19:35 +00:00
Keith Donald 9c3a0569c9 polish 2009-10-12 19:38:55 +00:00
Keith Donald b781a39b46 polish 2009-10-12 19:25:35 +00:00
Keith Donald 16d294c2c0 spring 3 object mapping ref docs 2009-10-12 19:14:45 +00:00
Sam Brannen b287d5a9f1 JUnit 4.6 --> 4.7 2009-10-11 18:31:19 +00:00
Sam Brannen 3dfb1d5c9c [SPR-6222] Updating PetClinic Ivy dependencies so that the web-app runs. 2009-10-11 18:24:36 +00:00
Sam Brannen 2e59673e73 [SPR-6222] Updating PetClinic tutorial. 2009-10-11 18:23:26 +00:00
Sam Brannen f57d702370 [SPR-6222] Updating PetClinic build documentation regarding migration to Spring Build and changes resulting from the upgrade to Spring 3.0. 2009-10-11 18:08:44 +00:00
Sam Brannen 0b069ebe46 Updating PetClinic build documentation regarding migration to Spring Build. 2009-10-11 15:53:51 +00:00
Sam Brannen 8fe497ef53 Updating PetClinic build documentation regarding migration to Spring Build. 2009-10-11 15:30:56 +00:00
Sam Brannen 7983ded6e0 Renamed PetClinicSuiteTests to PetClinicTestSuite so that it doesn't get picked up by Spring Build. 2009-10-11 15:06:29 +00:00
Sam Brannen a3c3b257e1 Pet Clinic tests now run against JUnit 4.7. 2009-10-11 15:03:18 +00:00
Sam Brannen a75a975219 Pet Clinic test suite now includes VisitsAtomViewTest. 2009-10-11 15:02:24 +00:00
Sam Brannen 2827f80d34 Removed @Override. 2009-10-08 13:32:49 +00:00
Sam Brannen 66550c3340 Added an empty implementation of the missing setExclude() method so that the class compiles. 2009-10-08 13:25:43 +00:00
Keith Donald 96cfa0c37d custom mappable type tests 2009-10-07 21:33:53 +00:00
Keith Donald 8fd3de9397 mappable type factory extension point / polish 2009-10-07 20:27:48 +00:00
Keith Donald e3983fe796 polish 2009-10-07 19:37:07 +00:00
Keith Donald 8fe055b0e0 mapping exclusions 2009-10-07 19:28:39 +00:00
Keith Donald a73324bc24 polish 2009-10-07 19:11:22 +00:00
Keith Donald a4476e5e0e nested bean mapper test 2009-10-07 19:03:33 +00:00
Keith Donald f692c765d2 addNestedMapper 2009-10-07 17:50:03 +00:00
Keith Donald 3450c5de0b polish 2009-10-07 17:36:30 +00:00
Keith Donald ec04357580 polish 2009-10-07 17:28:28 +00:00
Keith Donald 9cf508d80d javadoc 2009-10-07 17:18:10 +00:00
Keith Donald ba5335f66e polish 2009-10-07 17:03:02 +00:00
Keith Donald c333494085 javadoc 2009-10-07 17:02:22 +00:00
Keith Donald 6d31db1017 renamed to MappingContext since no spel dep 2009-10-07 16:56:13 +00:00
Keith Donald acf574c3e3 added conversion service performance optimizations; added mapping cyclical ref handling; removed ConverterInfo in favor of specifying S and T at registration time if necessary 2009-10-07 16:54:36 +00:00
Andy Clement c9f0e68c82 SPR-5307: Committing test but can't be uncommented until Spring depends on AspectJ 1.6.7 2009-10-07 02:54:44 +00:00
Keith Donald 0437305669 nested revision 2009-10-06 21:40:59 +00:00
Keith Donald 0f5074db2b spel mapping, polish 2009-10-06 21:31:49 +00:00
Sam Brannen 2c2d79a4bf polishing 2009-10-06 21:11:51 +00:00
Sam Brannen b7e36461ca Now mentioning JSR-330 annotations in test chapter. 2009-10-06 21:10:56 +00:00
Sam Brannen c200715076 Now verifying support for @Named as well. 2009-10-06 21:10:06 +00:00
Chris Beams d020d73118 SPR-6186: removed remaining duplicate check for @Configuration 2009-10-06 04:30:26 +00:00
Chris Beams cbadf350e1 Continued progress on SPR-5682: Provide dedicated ApplicationContext implementations for use with @Configuration classes
Resolved sub-task SPR-6186: Eliminate duplicate code between ConfigurationClassApplicationContext and ConfigurationClassWebApplicationContext
2009-10-06 01:38:16 +00:00
Sam Brannen ab10d37fae Corrections regarding BindingResult(s); added a tip regarding programmatic use of LocalValidatorFactoryBean. 2009-10-05 22:24:42 +00:00
Sam Brannen 710ae3a9d2 SpringJUnit4ClassRunnerAppCtxTests now verifies seamless support for using @Inject in addition to @Autowired, etc. 2009-10-05 22:08:01 +00:00
Keith Donald 0a843e60a6 recursive mapping support 2009-10-05 20:28:10 +00:00
Chris Beams fd8935ba0b SPR-5682:
* polishing for ConfigurationClassApplicationContext & tests
* added ConfigurationClassWebApplicationContext & tests
* next: refactoring out duplications between ConfigurationClassApplicationContext & ConfigurationClassWebApplicationContext
2009-10-05 05:27:30 +00:00
Chris Beams 772a74a636 SPR-5682: fixing test breakage on CI server due to strange non-determinism in the order of bean names being returned in the key set of the map of beans matching the required type. 2009-10-05 03:29:20 +00:00
Chris Beams 8c5f78c0d6 polishing 2009-10-05 00:51:19 +00:00
Chris Beams a48234cf5f SPR-5682: Initial support for ConfigurationClassApplicationContext 2009-10-05 00:35:17 +00:00
Keith Donald e7c8f1ef8b SPR-6179, additional mapper test cases 2009-10-04 04:13:27 +00:00
Sam Brannen 6ea83afe1e Corrected typos and cleaned up DocBook structure. 2009-10-03 23:45:23 +00:00
Sam Brannen 0860f3bb8c [SPR-6174] DataBinder now uses var-args to set allowed/disallowed/required fields. 2009-10-03 22:23:41 +00:00
Sam Brannen f08d15c86f Fixed minor grammatical errors. 2009-10-03 22:19:21 +00:00
Sam Brannen 06872dd465 Fixed minor typo. 2009-10-03 22:18:50 +00:00
Keith Donald 341835a142 mapper initial commit 2009-10-02 16:28:53 +00:00
Sam Brannen 5c055ed6dd [SPR-6174] DataBinder now uses var-args to set allowed/disallowed/required fields. 2009-10-01 23:28:27 +00:00
Sam Brannen 0eda92a51a Fixed minor grammatical errors. 2009-10-01 22:52:46 +00:00
Andy Clement 076fc89a50 SPR-5518: Documented ability to use text rather than symbols for SPEL operators (lt, le, gt, ge, eq, ne, div, mod, not). Can help in XML specification of expressions. 2009-10-01 19:39:20 +00:00
Andy Clement 10e26e6dc7 SPR-6123: doc update on writing good pointcuts (should include a within()) 2009-10-01 19:05:11 +00:00
Juergen Hoeller 71a045328c renamed getAnnotations to getMethodAnnotations; added getMethodAnnotation and getParameterAnnotation convenience methods 2009-10-01 15:20:31 +00:00
Juergen Hoeller b152ac34fd CustomEditorConfigurer supports PropertyEditor instances again (with deprecation warning); for XFire compatibility (SPR-6157) 2009-10-01 13:40:55 +00:00
Juergen Hoeller 0c47a01953 fixed ContentNegotiatingViewResolver to work with the combination of ignoreAcceptHeader=true plus defaultContentType as well (SPR-6163) 2009-10-01 12:06:58 +00:00
Juergen Hoeller 7a700edaa7 understand "on"/"off", "yes"/"no", "1"/"0" as boolean values (analogous to CustomBooleanEditor) 2009-10-01 11:18:48 +00:00
Juergen Hoeller b465f204bd renamed internal *GenericConverters to *Converters 2009-10-01 11:07:22 +00:00
Juergen Hoeller 0543a294ee expose arrays as comma-delimited element String 2009-10-01 11:05:45 +00:00
Juergen Hoeller 784068346d PathMatchingResourcePatternResolver leniently ignores non-existing root directories 2009-09-30 15:04:31 +00:00
Keith Donald 3fa533ddd8 SPR-6032 & SPR-6033: Auto grow nested path enhancements to BeanWrapper 2009-09-29 19:54:35 +00:00
Ramnivas Laddad 832db0abbc Updated Groovy version for Eclipse project to mathc ivy.xml 2009-09-28 20:56:13 +00:00
Ramnivas Laddad 191293f2ef Fixed a commented test 2009-09-28 20:55:12 +00:00
Sam Brannen f95dff6975 org.springframework.instrument.classloading --> org.springframework.instrument.tomcat 2009-09-26 21:02:58 +00:00
Sam Brannen bfddb0938b Abed Rabbo --> Abedrabbo 2009-09-26 20:58:50 +00:00
Juergen Hoeller 72d9640801 final touches for 3.0 RC1 2009-09-25 15:00:43 +00:00
Juergen Hoeller 270fc84923 added ".vm" as resource file extension 2009-09-25 14:48:21 +00:00
Juergen Hoeller 4d29f65a9c @Event/ResourceMapping uniquely mapped to through event/resource id, even across controllers (SPR-6062); type-level @RequestMapping header conditions validated in Portlet environments as well 2009-09-25 14:45:35 +00:00
Mark Fisher 76122c931d updated javadoc 2009-09-25 14:25:56 +00:00
Mark Fisher 22e1305cf0 updated reference documentation now that the <executor/> and <scheduler/> element's 'size' attribute has been renamed to 'pool-size' 2009-09-25 14:21:49 +00:00
Mark Fisher 80ac130dfe Renamed the 'size' attribute to 'pool-size' for the <executor/> and <scheduler/> elements in the task namespace. 2009-09-25 14:19:42 +00:00
Arjen Poutsma cafc106ccc Renamed org.springframework.instrument.classloading module to org.springframework.instrument.tomcat 2009-09-25 12:51:58 +00:00
Juergen Hoeller 72f4572930 preparing for RC1 release 2009-09-25 11:03:57 +00:00
Juergen Hoeller e408cbeecd moved converter initialization code to constructor 2009-09-25 10:57:40 +00:00
Juergen Hoeller ea40fb9bcd all @SessionAttributes get exposed to the model before handler method execution; MultipartRequest is available as a mixin interface on (Native)WebRequest as well 2009-09-25 10:46:38 +00:00
Juergen Hoeller 9cb1338b94 all @SessionAttributes get exposed to the model before handler method execution; MultipartRequest is available as a mixin interface on (Native)WebRequest as well 2009-09-25 10:42:49 +00:00
Arjen Poutsma e49869ea78 SPR-6148 - @ResponseBody with returned String results in unresolvable view ServletException 2009-09-25 10:34:54 +00:00
Arjen Poutsma 5b12503c47 SPR-6144 - @ResponseStatus annotation is ignored in an @Controller redirect (RedirectView)
SPR-5468 - Modify RedirectView to allow 301 Permanent Redirects
2009-09-25 10:23:06 +00:00
Juergen Hoeller 6fe0e36fe0 polishing 2009-09-25 09:59:17 +00:00
Juergen Hoeller ce4e3784d1 updated dependencies 2009-09-25 09:58:54 +00:00
Juergen Hoeller 39a97a61af resolve handler bean name early; validate header conditions as well 2009-09-25 09:53:30 +00:00
Juergen Hoeller aec2bc097e polishing 2009-09-25 09:45:10 +00:00
Juergen Hoeller 09e6a85edd fixed overview files 2009-09-25 08:47:18 +00:00
Arjen Poutsma 04fa5d4b99 SPR-6093 - MVC Annotation Inheritance 2009-09-25 08:45:58 +00:00
Mark Pollack d8245c800b Add minimal doc for JSR 330 support. 2009-09-25 08:17:12 +00:00
Mark Pollack 7ae8be05d1 SPR-5994 - The release archive contains an unecessary .zip file of the contents under the reference doc directories html and html-single 2009-09-25 07:20:45 +00:00
Mark Pollack c6cd1a528e SPR-6119 - Add slf4j dependency back to orm's pom.xml but in test scope as it is needed to run tests that use Hibernate
SPR-5956 - Remove commons-logging dependency definitions in pom.xml for all but spring-core so as to make exclusion rule easier for user who use slf4j
2009-09-25 05:16:55 +00:00
Juergen Hoeller cd1df84d7d removed slf4j dependency (not used in Spring itself; SPR-6119) 2009-09-24 23:16:35 +00:00
Juergen Hoeller 34d2a69a82 removed separate placeholder test class 2009-09-24 22:58:15 +00:00
Juergen Hoeller 60acaf5671 updated dependencies 2009-09-24 22:55:21 +00:00
Juergen Hoeller 5c1b0e6caf removed classes which are not used in 3.0 yet 2009-09-24 22:54:35 +00:00
Juergen Hoeller a59d205b36 removed 3.1 feature classes 2009-09-24 22:53:17 +00:00
Juergen Hoeller 2781b876d2 PropertyPlaceholderConfigurer supports "${myKey:myDefaultValue}" defaulting syntax 2009-09-24 22:51:38 +00:00
Juergen Hoeller 0f43d6c592 PropertyPlaceholderConfigurer supports "${myKey:myDefaultValue}" defaulting syntax 2009-09-24 22:34:02 +00:00
Juergen Hoeller 8eca898d44 removed outdated "cacheJspExpressions" feature from ExpressionEvaluationUtils 2009-09-24 15:56:00 +00:00
Juergen Hoeller c761082eea added simplest possible ExpressionEvaluator 2009-09-24 15:48:48 +00:00
Juergen Hoeller 89aa13e8e5 removed Apache JSTL references completely 2009-09-24 15:35:28 +00:00
Juergen Hoeller 0463c612b5 removed Apache JSTL references completely 2009-09-24 15:31:10 +00:00
Juergen Hoeller 811e9fc043 consistent dependencies 2009-09-24 15:09:57 +00:00
Juergen Hoeller e2093a8414 fixed regression: looking for annotation on original bean class as well, not just on exposed bean type (SPR-5981) 2009-09-24 14:59:26 +00:00
Juergen Hoeller ad492e906e PropertyOverrideConfigurer's "ignoreInvalidKeys" ignores invalid property names as well (SPR-5792) 2009-09-24 14:40:13 +00:00
Juergen Hoeller 557dd1f1c4 initialize transaction synchronization before doBegin call in order to avoid OutOfMemory failures after resource binding 2009-09-24 14:02:40 +00:00
Juergen Hoeller 49bf85baaa factored out common resolveTypeArgument(s) method to GenericTypeResolver 2009-09-24 12:51:52 +00:00
Juergen Hoeller b8c1130eec detect @Bean methods on registered plain bean classes as well (SPR-5795) 2009-09-24 10:45:56 +00:00
Juergen Hoeller 38110d35d2 polishing 2009-09-24 10:21:40 +00:00
Arjen Poutsma 501a1ea9af SPR-5910 - Slight Improvement for Main JavaDoc in RedirectView 2009-09-24 08:31:33 +00:00
Mark Pollack bd098ce1db pom maintenance - sync with ivy.xml
update junit version in ivy.xml for org.sf.aspects
2009-09-24 06:09:54 +00:00
Mark Fisher 616a48acc2 SPR-6142 AbstractMessageListenerContainer now accepts an implementation of the ErrorHandler strategy for handling any uncaught exceptions thrown while processing a Message. The default behavior is still to log at error-level only (no ErrorHandler). 2009-09-23 22:06:46 +00:00
Juergen Hoeller 33265eecbd polishing 2009-09-23 21:19:28 +00:00
Juergen Hoeller 9508f41a91 made InitDestroyAnnotationBeanPostProcessor's logger field transient (SPR-5962) 2009-09-23 21:17:30 +00:00
Juergen Hoeller d4c16e91df SPR-6094: PostConstruct now processed top-down (base class first); @PreDestroy processed bottom-up (subclass first) 2009-09-23 20:53:21 +00:00
Juergen Hoeller 64bf3b74b5 revised Hessian/Burlap exception clauses (SPR-5897) 2009-09-23 19:35:44 +00:00
Keith Donald 2bd30a49ad more tests 2009-09-23 18:36:11 +00:00
Keith Donald 7a6dafd5ad completed generic converter implementation 2009-09-23 18:25:04 +00:00
Juergen Hoeller ce800fb45a allow instrumentation to be specified as a regular VM agent even in OSGi (SPR-6147) 2009-09-23 18:14:20 +00:00
Juergen Hoeller dc05ef6548 revised JBoss VFS support 2009-09-23 17:05:39 +00:00
Juergen Hoeller e56aa91bd7 "data.sql" instead of "test-data.sql" (SPR-6020) 2009-09-23 16:16:40 +00:00
Juergen Hoeller c802253402 "data.sql" instead of "test-data.sql" (SPR-6020) 2009-09-23 15:58:38 +00:00
Rob Harrop 2eb6f497a9 updated testing chapter of ref guide 2009-09-23 14:59:21 +00:00
Juergen Hoeller 6fc190ec25 AbstractBeanDefinitionParser can deal with null return value as well (SPR-5872) 2009-09-23 13:51:14 +00:00
Keith Donald 438f128db6 todos 2009-09-23 04:50:03 +00:00
Keith Donald 187d025c19 map converters 2009-09-23 04:45:04 +00:00
Keith Donald 1ee4ac1b52 string to map converters 2009-09-23 04:20:23 +00:00
Mark Fisher dedecf7ae9 SPR-6142 Moved ErrorHandler strategy interface to the org.springframework.util package so that it can be used by MessageListener containers in addition to TaskSchedulers. 2009-09-23 00:44:58 +00:00
Mark Fisher e2c36fd592 Updated the context module's .classpath file for Groovy 1.6.3 (from 1.5.1) 2009-09-22 23:52:27 +00:00
Keith Donald e6c3227d2d more generic converters 2009-09-22 20:28:23 +00:00
Keith Donald ed611be838 conversion utils helper for common code 2009-09-22 15:37:26 +00:00
Juergen Hoeller 871fc14fbb restored parent property to accept ConversionService instead of GenericConversionService 2009-09-22 13:37:32 +00:00
Juergen Hoeller 0698947e6d skip processing when no PlatformTransactionManager found (SPR-3955) 2009-09-22 13:31:56 +00:00
Keith Donald c693f216f1 Beefed up test suite 2009-09-21 22:59:48 +00:00
Keith Donald e9416db472 javadoc and final 2009-09-21 22:35:39 +00:00
Keith Donald 01e900c33a documented hooks 2009-09-21 22:24:36 +00:00
Keith Donald a6e28f4eb5 polish 2009-09-21 21:32:01 +00:00
Keith Donald 6ce33dba75 getConverter calls now throw exception and query parent 2009-09-21 21:24:37 +00:00
Arjen Poutsma 5faa4d90ac SPR-6130 - Be able to specify a default content type when no extension is used in ContentNegotiatingViewResolver 2009-09-21 14:27:22 +00:00
Mark Pollack 4f94f45ec4 pom maintenance 2009-09-21 07:37:30 +00:00
Keith Donald fe525f5100 polish 2009-09-21 05:51:10 +00:00
Keith Donald 5bae005366 removed ignored test now that convert system has been revised 2009-09-21 05:40:55 +00:00
Keith Donald 17f7796d42 polish 2009-09-21 05:39:16 +00:00
Keith Donald cb54869726 collection to object 2009-09-21 05:30:54 +00:00
Keith Donald 67c02f6c35 generic converter revising 2009-09-21 05:14:14 +00:00
Jeremy Grelle 982ece595c SPR-5931 - Allow non-standard attributes in <form> tags 2009-09-21 02:48:00 +00:00
Juergen Hoeller 566eeba8ca specified excluded names matched against unprefixed FactoryBean names as well (SPR-5926) 2009-09-20 22:22:35 +00:00
Juergen Hoeller 9f75eb4f44 do not check for action exception in resource phase (SPR-6129) 2009-09-20 21:12:41 +00:00
Keith Donald fada151878 array to object 2009-09-18 23:15:33 +00:00
Keith Donald d37c5aba94 polish 2009-09-18 23:06:29 +00:00
Keith Donald 48bc060a77 collection and array merged into one 2009-09-18 23:02:52 +00:00
Keith Donald 2ca694350e array to collection conversion 2009-09-18 22:18:41 +00:00
Juergen Hoeller 6c4fb85753 marked JBoss VFS dependency as optional (SPR-6127) 2009-09-18 21:34:25 +00:00
Juergen Hoeller 66ce8248b5 JSR-330 etc 2009-09-18 21:30:30 +00:00
Keith Donald 25854bd764 polish 2009-09-18 21:07:53 +00:00
Keith Donald b4fd51abd5 polish 2009-09-18 20:41:15 +00:00
Keith Donald 45c542e51e updated for change in conversion service api; source type desc now required 2009-09-18 20:32:41 +00:00
Keith Donald b2e3837956 polish 2009-09-18 20:28:36 +00:00
Keith Donald f1f4bd9fb4 generic converter updates 2009-09-18 20:08:45 +00:00
Keith Donald d3b43ebccb refined generic converter concept 2009-09-18 19:57:59 +00:00
Juergen Hoeller 6420fd303b fixed checkbox macro (SPR-6120) 2009-09-18 14:42:36 +00:00
Keith Donald 8e800f0322 map to map generic converter 2009-09-18 14:30:23 +00:00
Juergen Hoeller ac6e26388f added default editors for "java.util.Currency" and "java.util.TimeZone" 2009-09-18 14:15:06 +00:00
Juergen Hoeller 99753f0d1c polishing 2009-09-18 14:07:19 +00:00
Juergen Hoeller 89216a4b9a marked Hibernate Validator as optional 2009-09-18 14:02:24 +00:00
Juergen Hoeller 7b42a12161 consistent loading of optional classes 2009-09-18 14:01:39 +00:00
Juergen Hoeller 8d66c90760 revised JTA 1.1 support and javadoc 2009-09-18 13:48:37 +00:00
Jeremy Grelle 1c134925ba SPR-6114 - Upgrade the Spring JSP tag libraries to JSP 2.0 2009-09-17 22:39:35 +00:00
Keith Donald d29a894d57 javadoc 2009-09-17 21:32:31 +00:00
Keith Donald 563ef683f9 polish 2009-09-17 21:27:57 +00:00
Keith Donald e9d53cb2e8 ignore failing test for now while revising converter system 2009-09-17 21:11:52 +00:00
Keith Donald 1d9607b465 javadoc 2009-09-17 21:03:19 +00:00
Keith Donald e26163505a added sf4j logging to run tests in eclipse 2009-09-17 20:25:34 +00:00
Keith Donald d848d21f09 polish 2009-09-17 20:16:26 +00:00
Keith Donald e153a1a968 tidying string to char conversion 2009-09-17 20:05:38 +00:00
Keith Donald 5c3e71d494 polish 2009-09-17 19:56:19 +00:00
Keith Donald 3ef485bbbe polish 2009-09-17 19:53:17 +00:00
Keith Donald 31441627de updated formatter conversion service adapter to work with type descriptor 2009-09-17 19:48:55 +00:00
Keith Donald 39c1ab923f tidying 2009-09-17 19:24:35 +00:00
Keith Donald 33c19b8b14 Converter system implementation cleanup and tidying; wip 2009-09-17 19:24:07 +00:00
Thomas Risberg 10c30f0315 modified createRelative according to David Ward's suggestion for JBSPRING-4 (SPR-5120) 2009-09-17 15:58:25 +00:00
Juergen Hoeller ad4f50a0d4 removed outdated reflection code 2009-09-17 15:24:24 +00:00
Juergen Hoeller 9ef1d2b1ad adapted to Converter signature change 2009-09-17 15:20:04 +00:00
Juergen Hoeller 6f2642f2d3 consistently use varargs signature 2009-09-17 10:24:56 +00:00
Juergen Hoeller 87e939a4e9 adapted to Converter signature change 2009-09-17 10:24:08 +00:00
Juergen Hoeller 160521074b avoid caching for expression results even when specified as TypedStringValue (SPR-6115) 2009-09-17 10:04:36 +00:00
Keith Donald 8bf1ee5e7c polish 2009-09-16 19:25:07 +00:00
Keith Donald 1c6965132f convert polishing: removed checked exception from Converter interface to support direct use, added Converter to each implementation for consistency 2009-09-16 19:24:56 +00:00
Keith Donald 881c3ed6fa Mapper and SpelMapper 2009-09-16 15:40:11 +00:00
Sam Brannen a7ab109ab7 TestNG 5.10 2009-09-16 11:15:37 +00:00
Rob Harrop 01fb1825f5 [SPR-6063] fixed issue with inconsistent views of PropertyDescriptors 2009-09-16 09:53:14 +00:00
Rob Harrop aa08c11976 [SPR-5859] @ManagedOperation can now be used on getters/setters 2009-09-16 09:25:48 +00:00
Juergen Hoeller 2a0d68cb5c restored getMostSpecificMethod's traversal of the inheritance hierarchy 2009-09-15 22:31:08 +00:00
Juergen Hoeller fd81aa205d protected @Autowired method can be overridden with non-annotated method to suppress injection; private @Autowired methods with same signature will be called individually across a hierarchy (SPR-6112) 2009-09-15 15:52:13 +00:00
Juergen Hoeller fa2bb722f0 initial JSR-330 injection support 2009-09-15 14:12:16 +00:00
Juergen Hoeller ad1269622b @Scope annotations not sufficient for scanning anymore 2009-09-15 12:36:45 +00:00
Juergen Hoeller e1a3e44485 initial JSR-330 injection support 2009-09-15 12:00:55 +00:00
Arjen Poutsma 429d78b902 javadoc. 2009-09-15 11:02:44 +00:00
Juergen Hoeller 34357d2b1f revised DefaultBindingErrorProcessor to use direct getPropertyName() and getValue() calls on PropertyAccessException itself (SPR-6111) 2009-09-15 10:51:50 +00:00
Arjen Poutsma 9f19e5e73b Polish 2009-09-15 09:17:10 +00:00
Keith Donald 5fa7347641 polish 2009-09-14 23:18:31 +00:00
Keith Donald 0d6b9f1241 polish 2009-09-14 23:17:03 +00:00
Juergen Hoeller ca928944db marked Derby dependency as optional (SPR-6109) 2009-09-14 23:08:32 +00:00
Keith Donald 0d7f4117ab polish 2009-09-14 22:51:22 +00:00
Keith Donald c0d2c6fed4 polish 2009-09-14 22:43:44 +00:00
Keith Donald af1c507f93 polish 2009-09-14 22:40:44 +00:00
Keith Donald 9e9f9df041 polish 2009-09-14 22:25:55 +00:00
Keith Donald df7a4dba3a polish 2009-09-14 22:00:54 +00:00
Keith Donald 5c525e546c polish 2009-09-14 21:59:12 +00:00
Keith Donald 90697e884d polish 2009-09-14 21:32:13 +00:00
Keith Donald d5ed42e860 spring 3 validation docs; jsr303 integration 2009-09-14 20:54:46 +00:00
Rob Harrop 90652bf8ae [SPR-5727] CronTriggerBean supports start delay 2009-09-14 15:53:05 +00:00
Rob Harrop 320f08ac79 [SPR-6017] a few more tweaks to how getLocalName is handled 2009-09-14 15:00:37 +00:00
Juergen Hoeller bb70c9a4c4 @RequestParam and co support placeholders and expressions in their defaultValue attributes (SPR-5922); @Value expressions supported as MVC handler method arguments as well (against request scope) 2009-09-14 10:48:15 +00:00
Rob Harrop 7835e66abb [SPR-6017] a few more tweaks to how getLocalName is handled 2009-09-14 10:43:04 +00:00
Arjen Poutsma ee0a59d464 Test -> Tests 2009-09-14 10:24:42 +00:00
Rob Harrop 7d37c92e4f [SPR-6017] a few more tweaks to the BeanDefinitionParserDelegate public contract 2009-09-14 10:02:15 +00:00
Juergen Hoeller 582c092f0e revised use of generic provider class for Eclipse compile compatibility 2009-09-13 21:27:03 +00:00
Sam Brannen f1bfcf0d25 [SPR-6104] @TestExecutionListeners now supports a 'listeners' alias for its existing 'value' attribute. 2009-09-13 13:55:34 +00:00
Rob Harrop fe16447112 more work on enabling non-namespace extensions of xml parsing 2009-09-11 20:00:04 +00:00
Keith Donald 1e9fc388ac added javax validation, hibernate, and vfs dependencies into eclipse 2009-09-11 19:04:03 +00:00
Rob Harrop 1480202aa3 [SPR-5644] Support for Enum<?> and Enum<T> values as FQN.FIELD_NAME in type conversion 2009-09-11 18:31:51 +00:00
Thomas Risberg f7562614bc changed from M4 to RC1 2009-09-11 15:34:32 +00:00
Thomas Risberg 8303d4945e updated the oxm exceptions figure (SPR-6095) 2009-09-11 15:11:52 +00:00
Juergen Hoeller 2d3c6fa55f removed outdated dependency on standard taglib (SPR-6099) 2009-09-11 14:22:26 +00:00
Thomas Risberg 64c46d48bb extended the range for org.jboss.virtual (SPR-5120) 2009-09-10 11:12:23 +00:00
Thomas Risberg 184f63f689 fixed component scanning for JBoss 5 VFS; applied revised vfs-fixes-3.patch; added ResourceHandlingUtils (SPR-5120) 2009-09-10 10:35:04 +00:00
Thomas Risberg 377359b924 polished 2009-09-09 17:28:34 +00:00
Thomas Risberg aeee120431 Beverly's edits reviewed; fixed coverage for SimpleJdbcCall and the use of default parameter values (SPR-5929) 2009-09-09 17:28:21 +00:00
Thomas Risberg c1f0301433 reduced size of level 4 subsection headings 2009-09-09 17:27:05 +00:00
Thomas Risberg ea674f2fa6 revised the detection of Sybase (SPR-6053) 2009-09-09 13:25:27 +00:00
Juergen Hoeller 4be3c5d88c ObjectFactory etc 2009-09-08 23:05:11 +00:00
Juergen Hoeller cfdb106910 polishing 2009-09-08 23:03:22 +00:00
Juergen Hoeller 634d4b4d4c BeanFactory prefers local primary bean to primary bean in parent factory (SPR-5871) 2009-09-08 23:01:26 +00:00
Juergen Hoeller ee1c68ead4 polishing 2009-09-08 22:35:55 +00:00
Juergen Hoeller 45dc856993 Jpa/JdoTransactionManager passes resolved timeout into Jpa/JdoDialect's beginTransaction; HibernateJpaDialect applies timeout onto native Hibernate Transaction before begin call (SPR-5195) 2009-09-08 22:35:32 +00:00
Rob Harrop 414d6633ea [SPR-6048] fixed Exception signature in CronTriggerBean.afterPropertiesSet() 2009-09-08 21:57:41 +00:00
Rob Harrop 2b96fe8b5d [SPR-5993] Fixed notice file 2009-09-08 21:50:26 +00:00
Rob Harrop 8f6a42bf64 [SPR-3635] [SPR-5039] [SPR-5813] JMX annotation inheritance fixed 2009-09-08 21:37:02 +00:00
Juergen Hoeller 7f7173f790 added copy of SerializationTestUtils to beans module 2009-09-08 21:00:48 +00:00
Juergen Hoeller 209f43bee7 BeanFactory supports ObjectFactory as a dependency type for @Autowired and @Value (SPR-6079) 2009-09-08 20:55:00 +00:00
Rob Harrop 7448214657 reworked PropertyPlaceholderConfigurer to use new PropertyPlaceholderHelper 2009-09-08 20:10:26 +00:00
Rob Harrop f20c074ff4 reworked PropertyPlaceholderHelper 2009-09-08 19:09:12 +00:00
Rob Harrop d16faafc4f [SPR-6025] support for recursive property placeholder replacement in system properties 2009-09-08 17:13:02 +00:00
Rob Harrop 3fe09d70cd [SPR-6025] added SystemPropertyUtilsTests 2009-09-08 16:29:43 +00:00
Rob Harrop 8357bcb050 [SPR-6025] PropertyPlaceholderUtils introduced 2009-09-08 16:24:38 +00:00
Rob Harrop df3881d1e8 Update groovy dependency to match ivy.xml 2009-09-08 16:23:09 +00:00
Thomas Risberg ceca0db645 added synchronization to compile method (SPR-6001) 2009-09-08 16:19:34 +00:00
Rob Harrop ae461db82a fix to resource handling in PluggableSchemaResolver 2009-09-08 08:37:10 +00:00
Juergen Hoeller 6651ff0c55 fixed formatter annotation lookup 2009-09-08 01:35:36 +00:00
Juergen Hoeller c63567c2ef JSR-303 etc 2009-09-08 00:50:52 +00:00
Juergen Hoeller 70038bcf3c fixed format tests 2009-09-08 00:15:09 +00:00
Juergen Hoeller 0d084bd7f8 updated test dependencies 2009-09-08 00:11:28 +00:00
Juergen Hoeller 6e95b2c311 polishing 2009-09-08 00:05:09 +00:00
Juergen Hoeller a86a698e5b initial JSR-303 Bean Validation support; revised ConversionService and FormatterRegistry 2009-09-07 23:58:42 +00:00
Sam Brannen f9f9b431a6 [SPR-4643] SpringJUnit4ClassRunner now optionally calls JUnit 4.7's BlockJUnit4ClassRunner.withRules() method using reflection in order to provide backward compatibility with JUnit 4.5 and 4.6. 2009-09-07 21:03:32 +00:00
Juergen Hoeller 7aff0755a3 expression parser uses context's ConversionService by default 2009-09-07 18:53:01 +00:00
Juergen Hoeller 7123e4f81e expression parser uses context's ConversionService by default 2009-09-07 18:37:59 +00:00
Juergen Hoeller efaf76b46f polishing 2009-09-07 18:37:01 +00:00
Juergen Hoeller 57f90ad4ef polishing 2009-09-07 18:07:17 +00:00
Juergen Hoeller 1045847cf7 updated to CGLIB 2.2 and EHCache 1.6.2 2009-09-07 18:04:27 +00:00
Juergen Hoeller e6436bbbbe fixed currently-in-creation check to apply with any log level (SPR-5996) 2009-09-07 12:50:49 +00:00
Juergen Hoeller c5e49fc6dc refined PathMatchingResourcePatternResolver's treatment of non-readable directories (SPR-6086) 2009-09-07 12:44:59 +00:00
Mark Fisher c10342a553 Added documentation for @Scheduled and @Async annotations. 2009-09-07 04:06:18 +00:00
Rob Harrop afd6fe9048 [SPR-5927] fixed FormTag attribute clearing 2009-09-06 19:09:29 +00:00
Mark Fisher b18a1dc5b3 added documentation for the task namespace 2009-09-06 18:24:16 +00:00
Rob Harrop bfa4231c9d removed dependency on ServletException 2009-09-04 18:56:26 +00:00
Rob Harrop aee3f14d3c removed unecessary dependency on ServletException 2009-09-04 18:46:55 +00:00
Rob Harrop c3546f4c78 fixed missing dependencies in iml file 2009-09-04 18:44:31 +00:00
Thomas Risberg b482d6db12 revised the detection of Sybase (SPR-6053) 2009-09-04 18:37:50 +00:00
Rob Harrop 019c3c253a [SPR-6017] updated DBDR and BDPD to allow for overriding of namespace-specific methods 2009-09-04 18:22:37 +00:00
Rob Harrop 5d17db64ec updated javax.el dependency to match the IDEA project file 2009-09-04 18:17:38 +00:00
Rob Harrop 05fe679384 [SPR-6004] Fixed NPE in BeanDefinitionParserDelegate when using empty namespace as the default 2009-09-04 16:59:07 +00:00
Andy Clement 855eac549e SpelExpressionParser made threadsafe 2009-09-03 20:09:11 +00:00
Keith Donald cd20be7a4f polish 2009-09-03 18:52:39 +00:00
Keith Donald 80570a28c0 polish 2009-09-03 16:54:24 +00:00
Keith Donald b4aa322c4c polish 2009-09-03 16:43:44 +00:00
Keith Donald 21d9b70fd8 polish 2009-09-03 16:32:09 +00:00
Keith Donald 9b2f161b7e polish 2009-09-03 16:30:46 +00:00
Rob Harrop a03ca86372 [SPR-6057] test case to show that bug is already fixed 2009-09-03 16:18:22 +00:00
Keith Donald ca159f6d9a polish 2009-09-03 15:01:54 +00:00
Keith Donald 223e1e4522 polish 2009-09-03 14:44:10 +00:00
Keith Donald 35c4a4b3b0 polish 2009-09-03 14:06:10 +00:00
Juergen Hoeller d0c8545d9b updated setCookieMaxAge to match getCookieMaxAge return type (SPR-6070) 2009-09-03 12:15:19 +00:00
Keith Donald 477c4d3865 updaten new in 3 2009-09-03 05:32:19 +00:00
Keith Donald 19450cd069 updaten new in 3 2009-09-03 05:30:56 +00:00
Keith Donald e7095748f3 polish 2009-09-03 04:44:21 +00:00
Keith Donald 421aab0fa5 polish 2009-09-03 04:41:37 +00:00
Keith Donald 354e6fafe9 polish 2009-09-03 04:17:18 +00:00
Keith Donald d18bc356f2 polish 2009-09-03 03:40:37 +00:00
Keith Donald 835ebfcd25 setting up FormatterRegistrY 2009-09-03 03:36:57 +00:00
Keith Donald 70083474e1 polish 2009-09-02 23:47:21 +00:00
Keith Donald 900660ae56 converter / formatter docs initial commit 2009-09-02 23:34:01 +00:00
Thomas Risberg d10be7443f Fixed JavaDoc for determineRootDir method (SPR-5340) 2009-09-02 20:03:12 +00:00
Keith Donald f323a5bb5d fixed broken classpaths for ehcache and junit 2009-09-02 16:29:43 +00:00
Sam Brannen 0a781f3084 Including HibernateSessionFlushingTests in the suite. 2009-09-01 17:33:29 +00:00
Sam Brannen 2dee54b78a [SPR-4702] now updating TestContext state before calling before/after test class life cycle callbacks. 2009-09-01 17:33:12 +00:00
Juergen Hoeller ba425c34f8 updated to EHCache 1.6.0 2009-08-31 11:40:48 +00:00
Juergen Hoeller 8675281972 updated to AspectJ 1.6.5 2009-08-31 11:30:30 +00:00
Juergen Hoeller 8754f0bc85 updated dependencies 2009-08-31 11:25:54 +00:00
Chris Beams 19bccaaa11 updates made during my review of beans.xml:
* eliminated all usage of "the section entitled", because <xref> links already render including "the section called ".  This was resulting in sentences like 'see also the section entitled the section called "@Autowired"'. This issue affected nearly all sections of the documentation, so went beyond just beans.xml

* fixed table overflow in the "Using filters to customize scanning" section (approx. p.90)

* fixed all code overflows in <programlisting/> elements

* corrected a couple minor syntax errors with SpEL examples (missing closing braces)

* added 'language="..."' element to <programlisting> elements where appropriate to enable syntax highlighting.

* normalized all code indention to four-space (some code listings were using one- and two-space)

* updated all code listings to use same-line opening braces.

* eliminated section regarding backward compatibility with Spring DTDs and singleton=true|false.  This seems like cruft to me, and we shouldn't keep historical notes around forever.

* Added <note> regarding the new thread scope (SimpleThreadScope) to Section 3.5 Bean Scopes.  Also updated the section on registering a custom Scope implementation to use the SimpleThreadScope as an example.

* updated the new-in-3.xml section to improve the @Configuration example
2009-08-31 05:36:34 +00:00
Thomas Risberg 7b6029d515 Beverly's edits reviewed; modified the introduction part to include the preface text 2009-08-29 03:17:02 +00:00
Sam Brannen a45d1dec65 [SPR-6011] SpringJUnit4ClassRunner once again supports collective timeouts for repeated tests 2009-08-28 17:29:37 +00:00
Sam Brannen 984504735e [SPR-6011] SpringJUnit4ClassRunner once again supports collective timeouts for repeated tests. 2009-08-28 17:28:25 +00:00
Mark Fisher e0c63d8cba minor typos and tweaks to 'expressions' chapter 2009-08-28 12:44:54 +00:00
Sam Brannen eda193fc98 Added assertPersonCount() functionality for increased robustness. 2009-08-28 09:23:02 +00:00
Arjen Poutsma 66a799552f SPR-2784: Support MultipartFile-array property 2009-08-28 09:15:19 +00:00
Costin Leau ae8c053568 + fixed NPE when closing up non-initialized contexts 2009-08-28 05:43:12 +00:00
Juergen Hoeller 773bdcded5 changed NamedParameter/SimpleJdbcOperations parameter signatures to accept any Map value type (SPR-6046) 2009-08-27 13:53:00 +00:00
Arjen Poutsma e1b73ade8a Removed duplicate OrderItem 2009-08-27 13:51:47 +00:00
Juergen Hoeller 904c2358cd adapted to changes in non-lenient mode 2009-08-27 10:45:46 +00:00
Arjen Poutsma 636c4901c0 More autoboxing madness. 2009-08-27 10:30:47 +00:00
Juergen Hoeller fb7fd4bb52 added superfluous cast to get around ambiguity problem with some compilers 2009-08-27 10:23:04 +00:00
Costin Leau 015284af7c + add implicit (String) type for typed string values w/o a specified type 2009-08-27 09:47:15 +00:00
Arjen Poutsma c870e01757 Added castor properties 2009-08-27 09:26:01 +00:00
Arjen Poutsma 157a87e910 SPR-6003 - Improve CastorMarshaller support for loading class descriptors 2009-08-27 09:05:36 +00:00
Juergen Hoeller 52b51888f9 first cut of changes for 3.0.0.RC1 2009-08-27 01:01:25 +00:00
Juergen Hoeller 83289cb8b0 updated JPA 2.0 compatibility to EclipseLink 2.0.0.M7 2009-08-27 00:51:47 +00:00
Mark Fisher d3a6c48cf0 modified intro to accommodate new order and added features 2009-08-27 00:17:08 +00:00
Mark Fisher b5661ebd12 Moved Quartz and Timer discussion after TaskExecutor and TaskScheduler 2009-08-26 23:48:47 +00:00
Sam Brannen a07da0d950 [SPR-6043] @NotTransactional is now deprecated 2009-08-26 23:23:07 +00:00
Mark Fisher eb5d47c64e Added documentation for the TaskScheduler abstraction. 2009-08-26 22:06:34 +00:00
Juergen Hoeller ce3c72f8c2 compatibility with Hibernate 3.5 beta 1 2009-08-26 15:20:53 +00:00
Sam Brannen 4a7c299761 [SPR-5995] SpringJUnit4ClassRunner is now compatible with JUnit 4.5 - 4.7 2009-08-26 14:46:28 +00:00
Juergen Hoeller e0bb838259 MBeanServerFactoryBean returns JDK 1.5 platform MBeanServer for agent id "" (SPR-5909) 2009-08-26 13:42:28 +00:00
Sam Brannen 8fb53c801e [SPR-5995] Updated documentation regarding compatibility with JUnit 4.5, 4.6, and 4.7. 2009-08-26 13:13:06 +00:00
Sam Brannen da3eb580f6 [SPR-5995] Renamed makeNotifier() to springMakeNotifier() in order to allow compatibility with JUnit 4.5, 4.6, and 4.7. 2009-08-26 12:37:59 +00:00
Juergen Hoeller 5a55b8384a refined logging in JMS SingleConnectionFactory and DefaultMessageListenerContainer 2009-08-26 12:01:51 +00:00
Arjen Poutsma 5c2d63745f SPR-6037 - Ability to configure a XStream subclass on XStreamMarshaller 2009-08-26 09:36:50 +00:00
Juergen Hoeller 04cd95ff50 fixed accidental test failures 2009-08-25 13:49:10 +00:00
Juergen Hoeller 9a48f3f3a8 try to create unknown collection implementation types via default constructor 2009-08-25 13:29:22 +00:00
Chris Beams b118aae971 s/(init|destroy)MethodName/(init|destroy)Method/ to reflect recent changes made when porting @Bean to Spring core. 2009-08-25 05:10:42 +00:00
Christian Dupuis a7acea2329 remove obsolete xsd 2009-08-24 23:09:25 +00:00
Costin Leau 0179c66d2a + add security manager checks to avoid the creation of inner privileged action classes 2009-08-24 15:53:48 +00:00
Juergen Hoeller 04b619ebfb fixed accidental test failures 2009-08-24 13:48:21 +00:00
Juergen Hoeller 427edfe93c fixed package-info 2009-08-24 13:36:32 +00:00
Juergen Hoeller fee838a65e support for default "conversionService" bean in an ApplicationContext; revised formatting package, now integrated with DataBinder and AnnotationMethodHandlerAdapter; revised AccessControlContext access from BeanFactory 2009-08-24 13:30:42 +00:00
Sam Brannen 9f9f2349cd polishing 2009-08-24 12:14:57 +00:00
Sam Brannen 77821845a7 [SPR-4702] Updated JavaDoc regarding before/after test class lifecycle callbacks. 2009-08-22 21:50:02 +00:00
Sam Brannen 9eb19ac816 Polishing test annotation declarations and JavaDoc. 2009-08-21 11:44:38 +00:00
Keith Donald a1b3b87540 polish 2009-08-20 03:53:49 +00:00
Keith Donald 641407cb4d missing field test case 2009-08-20 03:51:20 +00:00
Keith Donald 901e88c575 polish 2009-08-20 03:45:08 +00:00
Keith Donald 78304c0ccf core context.message, context.alert, model.binder modules; includes SpEL-based GenericBinder implementation 2009-08-20 03:40:23 +00:00
Keith Donald 2bd664f7ee removed framework specific annotation in favor of user-defined for now 2009-08-19 15:02:50 +00:00
Keith Donald 704cc79cee polish 2009-08-19 14:43:20 +00:00
Arjen Poutsma 8d7d3cff1b SPR-6009 - @ExceptionHandler methods are still expected to return a ModelAndView, even when consuming a ServletResponse/OutputStream/Writer 2009-08-19 11:03:28 +00:00
Arjen Poutsma 3b7691d525 SPR-6008 - @ResponseStatus on @ExceptionHandler method is ignored 2009-08-18 14:37:23 +00:00
Arjen Poutsma 5680cd4a19 SWS-548 - Expose suppressNamespace and suppressXSIType as properties to CastorMarshaller 2009-08-18 10:45:20 +00:00
Keith Donald 20f5f99e9a SPR-6013, SPR-6014, SPR-6015 tests 2009-08-17 23:13:29 +00:00
Keith Donald db40e15a3e polish 2009-08-17 18:43:47 +00:00
Keith Donald 2381452e9a SPR-6012, SPR-6013, SPR-6014 initial commit 2009-08-17 18:35:04 +00:00
Arjen Poutsma 839e94618d SWS-548 - Expose suppressNamespace and suppressXSIType as properties to CastorMarshaller 2009-08-17 08:50:41 +00:00
Sam Brannen 601120979b [SPR-5964] Upgraded to TestNG 5.10 2009-08-11 10:31:06 +00:00
Sam Brannen 42638585b5 [SPR-5963] Upgraded to JUnit 4.7 2009-08-11 10:12:20 +00:00
Sam Brannen 5d17515dc5 [SPR-5888] Upgraded to TestNG 5.9.0. 2009-08-11 09:26:40 +00:00
Mark Pollack 7b26ae479b pom maintenance - extraneous dependency on cglib-nodep 2009-08-10 23:31:56 +00:00
Arjen Poutsma 2df7ceac16 Removed ci.build=true 2009-08-10 09:00:11 +00:00
Costin Leau 8dbf86fb7a + update copyright dates on some files
+ migrated test from JUnit 3 to 4
2009-08-09 08:47:24 +00:00
Juergen Hoeller 2d7c2d6fff revised wrapper type handling 2009-08-09 06:36:16 +00:00
Juergen Hoeller d41344eb1f preparations for 3.0 M4 release 2009-08-09 01:00:23 +00:00
Juergen Hoeller dd67900109 revised core conversion package for BeanWrapper/BeanFactory integration 2009-08-09 00:52:41 +00:00
Juergen Hoeller 45a0cadf8e revised core conversion package for BeanWrapper/BeanFactory integration 2009-08-09 00:46:49 +00:00
Juergen Hoeller e9823b57b4 revised embedded database support 2009-08-08 20:37:47 +00:00
Juergen Hoeller 3ac3a72e91 added test with custom repository annotation 2009-08-08 13:57:05 +00:00
Juergen Hoeller 6e25ca8175 JMS SingleConnectionFactory uses minimized number of start calls (for Oracle AQ; SPR-5987) 2009-08-08 01:33:01 +00:00
Juergen Hoeller 23a1d07fbf JMS SingleConnectionFactory uses minimized number of start calls (for Oracle AQ; SPR-5987) 2009-08-08 01:25:02 +00:00
Juergen Hoeller 83bd56c6de JMS SingleConnectionFactory uses minimized number of start calls (for Oracle AQ; SPR-5987) 2009-08-08 01:01:39 +00:00
Juergen Hoeller 6b824d9af7 revised WebApplicationContext id determination; lazy logger initialization in ContextLoaderListener (SPR-5977) 2009-08-08 00:48:55 +00:00
Mark Pollack 33bb81b3ab SPR-5986 - Error in pointing links about versions for documentation and content 2009-08-07 13:41:40 +00:00
Juergen Hoeller 9a0108ac6a added support for @WebServiceProvider annotation to Spring's JaxWsServiceExporters (SPR-5988) 2009-08-07 10:00:27 +00:00
Mark Pollack 2cd71758ed Apply Beverly's edits to mvc chapter. 2009-08-07 03:41:34 +00:00
Mark Pollack 19dc0d32d6 Apply Beverly's edits to mvc chapter. 2009-08-07 03:23:47 +00:00
Costin Leau 14e983ff9a + removed unneeded method (one less item off the stack) 2009-08-06 22:50:13 +00:00
Costin Leau af6275a56e + small fix to reflection util to avoid accessibility calls 2009-08-06 22:44:04 +00:00
Costin Leau af8af8c633 + added fine grained privileged blocks to preserve the caller security stack when invoking the callee 2009-08-06 22:31:57 +00:00
Costin Leau 81eb11486d + fixed exception unwrapping
+ optimized path for getBean (and thus fixed another test)
2009-08-06 19:08:14 +00:00
Mark Fisher 65e00f7540 added support for ErrorHandler with DelegatingErrorHandlingRunnable in the TimerManagerTaskScheduler 2009-08-06 16:36:15 +00:00
Costin Leau d5d3104b7b + interaction with user code uses now dedicated privileged when running under a security manager 2009-08-06 16:34:39 +00:00
Thomas Risberg fe5b5022f0 Beverly's edits reviewed; spell checked 2009-08-06 16:27:20 +00:00
Thomas Risberg c6edc5869a removed RC1 references 2009-08-06 16:26:36 +00:00
Mark Pollack 3081396c15 pom maintenance - changes needed to run inside eclipse via m2eclipse 2009-08-06 06:04:56 +00:00
Juergen Hoeller a7a97316e7 turned requestedSessionId into a settable property 2009-08-05 22:01:46 +00:00
Mark Pollack ed61da9112 remove spring-parent to list of bundles 2009-08-05 21:17:40 +00:00
Mark Pollack eed7bdfb41 add spring-parent to list of bundles and see if it gets published to maven-central 2009-08-05 20:42:15 +00:00
Mark Pollack 3005ad3029 add spring-parent to list of bundles and see if it gets published to maven-central 2009-08-05 20:37:33 +00:00
Mark Pollack 3e02887dd2 SPR-5979 - Reference guide refers to non-existing type StandardScopes
SPR-5965 - Typo error in reference documentation - "What's new in Spring 3.0"
2009-08-05 19:02:55 +00:00
Mark Pollack 97e3b5ca8c SPR-5976 - Upgrade POMS to JUnit 4.6 2009-08-05 17:48:53 +00:00
Mark Pollack f9016fdbe4 SPR-5970 - Tidy up Maven central POM for spring-webmvc 2009-08-05 17:44:54 +00:00
Mark Pollack 1683179434 SPR-5968 - Maven central POM for spring-web has wrong versions of dependencies and a missing dependency 2009-08-05 17:44:08 +00:00
Mark Pollack 8d1fdd8c3c SPR-5969 - Tidy up Maven central POM for spring-context-support
SPR-5976 -  Upgrade POMS to JUnit 4.6
2009-08-05 17:41:54 +00:00
Keith Donald bdd43f5f9f pruned presentation model system from trunk to move to dev branch as its a 3.1 feature now 2009-08-05 15:51:59 +00:00
Keith Donald 3ae3196ca7 pruned presentation model system from trunk to move to dev branch as its a 3.1 feature now 2009-08-05 15:29:26 +00:00
Keith Donald 00f90cd816 pruned presentation model system from trunk to move to dev branch as its a 3.1 feature now 2009-08-05 15:25:54 +00:00
Arjen Poutsma 93e99556c0 SPR-4700 - Add single checkbox input macro for Velocity and Freemarker 2009-08-05 12:16:11 +00:00
Arjen Poutsma 7043dff97b 2009-08-05 11:54:07 +00:00
Arjen Poutsma 8db13bb445 Deprecated org.springframework.enums 2009-08-05 11:51:13 +00:00
Arjen Poutsma b95f3f6792 Getting rid of @Ignore 2009-08-05 11:31:11 +00:00
Mark Pollack 7d75082b22 SPR-5851 - Set Maven repositories as non-snapshot 2009-08-04 17:26:28 +00:00
Mark Fisher 4afcddcbc7 added PeriodicTrigger implementation 2009-08-04 15:58:54 +00:00
Arjen Poutsma 43519a57db Doc 2009-08-04 13:44:09 +00:00
Arjen Poutsma 1915192d9a 2009-08-04 12:41:36 +00:00
Sam Brannen 372173f968 Parameterized/generified static methods in BeanUtils. 2009-08-04 12:06:14 +00:00
Arjen Poutsma 4267f8488f SPR-5975 - BufferedImageHttpMessageConverter doesn't work on Google AppEngine 2009-08-04 08:07:24 +00:00
Thomas Risberg 54d403e6b8 revisions after spell check; tweaked text in section covering rollback rules 2009-08-04 03:42:12 +00:00
Thomas Risberg 7c06ea99bb final revisions and marked all comments 2009-08-03 20:19:19 +00:00
Thomas Risberg 791faf4e63 put the definite article back in some places for Spring Framework to be consistent with common usage 2009-08-03 15:38:48 +00:00
Arjen Poutsma 3d29023ef3 Updating POMs to contain Junit & EasyMock version numbers. Apparently, the maven ant tasks cannot resolve our parent pom. 2009-08-03 09:21:44 +00:00
Mark Fisher 50956e0d37 added tests for ThreadPoolTaskScheduler 2009-08-01 03:12:19 +00:00
Mark Fisher 970fcab5de Added ErrorHandler strategy for asynchronous tasks submitted to a scheduler. Replaced DelegatingExceptionProofRunnable with DelegatingErrorHandlingRunnable. Both ThreadPoolTaskScheduler and ConcurrentTaskScheduler now support the ErrorHandler strategy. 2009-08-01 02:57:15 +00:00
Mark Fisher 228e1d80fa CronSequenceGenerator is now package-protected (only used by CronTrigger) 2009-07-31 18:49:18 +00:00
Thomas Risberg c9cc30a379 updated chapter title 2009-07-31 13:25:06 +00:00
Keith Donald a6330ca61e Fixed failing test due to compiler differences 2009-07-31 04:31:59 +00:00
Keith Donald 77b294fe59 native web request parameter map tests 2009-07-31 04:15:23 +00:00
Keith Donald 9ed5353947 unified map view of request parameters, including multiparts 2009-07-31 04:10:55 +00:00
Keith Donald d456a9326e moved multipart and bind to web project since independent of servlet and required by new native web request parameter map 2009-07-31 04:10:22 +00:00
Keith Donald 9eb85af234 moved multipart and bind to web project since independent of servlet and required by new native web request parameter map 2009-07-31 03:44:59 +00:00
Keith Donald e986434a25 moved collection utilities to util 2009-07-31 02:38:10 +00:00
Thomas Risberg 4bf3a9c9bd changed J2EE to Java EE 2009-07-30 18:32:05 +00:00
Thomas Risberg 40c4941cbf changed structure - added Parts for intro chapters and appendices; changed J2EE to Java EE 2009-07-30 18:31:00 +00:00
Thomas Risberg dd96d6d249 Beverly's edits reviewed; changed J2EE to Java EE 2009-07-30 18:29:56 +00:00
Keith Donald fc7c49a284 updated manifest template to add model package import 2009-07-30 11:28:28 +00:00
Keith Donald e020b5752a initial BindingLifecycle @MVC integration 2009-07-30 11:18:39 +00:00
Arjen Poutsma 44cf4e207a SPR-5633 - Portlet-version of @ExceptionHandler 2009-07-30 10:10:36 +00:00
Keith Donald db487b6d42 fixe bug in element type for jeremyg 2009-07-29 21:30:48 +00:00
Juergen Hoeller 17dfc8b0fc fixed constructor resolution algorithm to trigger ambiguity exception as late as possible 2009-07-29 16:43:12 +00:00
Sam Brannen c7661d5341 [SPR-5781] Added a "note" for static import for assertions; additional polishing. 2009-07-29 15:51:18 +00:00
Juergen Hoeller 5d009a2a98 prevent non-public access to bean class as well, if demanded 2009-07-29 15:15:47 +00:00
Arjen Poutsma 12e43ff92d SPR-5953 - Allow SimpleMappingExceptionResolver to Resolve HTTP Status Codes 2009-07-29 12:57:56 +00:00
Arjen Poutsma 2d4ae59ff1 SPR-5961 2009-07-29 12:49:54 +00:00
Arjen Poutsma 9eb962d941 2009-07-29 09:37:34 +00:00
Arjen Poutsma dc59ca427c Using correct encoding (ISO-8859-1) instead of JVM default when no character encoding is given. 2009-07-29 08:37:59 +00:00
Andy Clement 7c6ea9b80d per Ramnivas' suggestion, removing this bit to try and fix snapshot builds 2009-07-28 22:03:09 +00:00
Juergen Hoeller 3cb073abce revised non-lenient resolution 2009-07-28 14:43:37 +00:00
Keith Donald 1d6a7e57c1 delegate to presentation model 2009-07-28 14:01:55 +00:00
Arjen Poutsma b11970ed8d SPR-5923 - HttpMessageConverter selection as a result of @ResponseBody should consider the requested content type 2009-07-28 13:12:12 +00:00
Keith Donald de234e6839 polish 2009-07-27 22:23:50 +00:00
Keith Donald d2d1de5457 mvc binding lifecycle; packaged with model map for now since it depends on it 2009-07-27 22:20:07 +00:00
Keith Donald f0ca94d5f3 new presentation model methods; ability to surpress commit of dirty value in PMB 2009-07-27 21:49:09 +00:00
Keith Donald 0f434883dd binding lifecycle per design review 2009-07-27 21:25:51 +00:00
Keith Donald cd9f0bc10c package info 2009-07-27 18:23:33 +00:00
Sam Brannen 522475a05b [SPR-5893] polishing 2009-07-27 15:57:16 +00:00
Mark Fisher fa1676460a Replaced BinderSupport with a refactored AbstractBinder that delegates to a FieldBinder whose creation is the responsibility of each subclass. 2009-07-27 14:39:20 +00:00
Juergen Hoeller 1eabe2b441 lenientConstructorResolution flag applies to factory methods as well 2009-07-27 14:09:42 +00:00
Keith Donald e85ad67fd0 javadoc 2009-07-27 12:39:23 +00:00
Keith Donald ca060cea42 binder support 2009-07-27 12:36:16 +00:00
Arjen Poutsma 880eb9e2b2 SPR-5622: Changed javadoc to reflect current HandlerExceptionResolvers. 2009-07-27 11:24:46 +00:00
Arjen Poutsma 307fb0aec8 SPR-5942: MarshallingHttpMessageConverter should not require both marshaller and unmarshaller 2009-07-27 11:15:43 +00:00
Mark Fisher ac56f1f9b1 Removed @Override on interface method. 2009-07-27 01:10:53 +00:00
Mark Fisher 88a68042ba Initial import of GenericBinder. 2009-07-27 01:05:46 +00:00
Keith Donald 110ada7626 polish 2009-07-26 21:28:53 +00:00
Keith Donald 0124224ebf polish 2009-07-26 21:27:58 +00:00
Keith Donald ce8f07994d polish 2009-07-26 21:25:39 +00:00
Keith Donald 505f3c245a polish 2009-07-26 21:24:00 +00:00
Keith Donald da7e596b2a default message factory 2009-07-26 21:22:13 +00:00
Keith Donald 4ed3924e6f javadoc polish; added errors() to BindingResults 2009-07-26 20:57:22 +00:00
Keith Donald e6b6743c44 bind template polish 2009-07-26 20:24:44 +00:00
Keith Donald a66aa8c320 added bind template / field binder 2009-07-26 20:23:51 +00:00
Sam Brannen ccb0a30169 fixed minor typo 2009-07-25 23:03:24 +00:00
Sam Brannen 755b514468 [SPR-5798] fixed typos 2009-07-25 22:41:16 +00:00
Keith Donald 16b06306e0 presentation model binder tests 2009-07-25 17:40:42 +00:00
Keith Donald dbf41e630b polish 2009-07-25 17:39:35 +00:00
Keith Donald edd7bb8d03 collapsed into support 2009-07-25 04:42:58 +00:00
Keith Donald 990d446c84 polish 2009-07-25 04:40:31 +00:00
Keith Donald 726d3464c1 obsolete 2009-07-25 04:23:01 +00:00
Keith Donald 4a1d51f082 updated test package structure 2009-07-25 04:21:44 +00:00
Keith Donald 63336ff4a4 polish 2009-07-25 04:14:43 +00:00
Keith Donald 934d4a5fe0 moved model binding and validation related code into model module-level package; separated out ui concerns into ui subpackage 2009-07-25 04:07:21 +00:00
Keith Donald de5528840d presentation model binder 2009-07-24 23:20:49 +00:00
Keith Donald 8709959a98 polish 2009-07-24 21:01:57 +00:00
Keith Donald 5f9a541386 polish 2009-07-24 21:01:33 +00:00
Keith Donald 55aae08e32 polish 2009-07-24 20:14:51 +00:00
Mark Fisher 1bfb26e4b2 updated aspectj weaver version in .classpath files to match ivy.xml configuration 2009-07-24 20:09:01 +00:00
Keith Donald f261b5c3c4 javadoc polish 2009-07-24 20:07:20 +00:00
Keith Donald a7465c1475 javadoc polish 2009-07-24 19:40:11 +00:00
Keith Donald bbe4c2b611 polish 2009-07-24 19:32:34 +00:00
Keith Donald a6cd69dc7c polish 2009-07-24 19:17:47 +00:00
Keith Donald 9bdbad55e5 javadoc improvements 2009-07-24 19:11:54 +00:00
Keith Donald 4255b7b1b2 updated package descriptions to reflect latest refactoring 2009-07-24 16:16:13 +00:00
Keith Donald 5cb5169237 Refactored class naming to capture ui.binding system as a general PresentationModel framework; PresentationModel and FieldModel are the key API elements now 2009-07-24 15:50:37 +00:00
Juergen Hoeller c7b019cd5c @Required does not get processed on beans returned by @Bean factory methods (SPR-5744) 2009-07-24 13:29:28 +00:00
Keith Donald 840ac88b29 more pruning 2009-07-23 14:03:20 +00:00
Keith Donald a74422ed65 polish 2009-07-23 13:55:39 +00:00
Keith Donald 14018541e2 polish 2009-07-23 13:43:23 +00:00
Keith Donald 55a7ba8357 binding executor 2009-07-23 13:39:33 +00:00
Keith Donald 29768cb068 binding factory locator 2009-07-23 13:31:06 +00:00
Keith Donald a3b57e2a84 polish 2009-07-22 20:02:35 +00:00
Keith Donald d5e6d91cc4 polish 2009-07-22 19:56:24 +00:00
Keith Donald ab7e985d72 polish 2009-07-22 19:55:35 +00:00
Keith Donald 6e05d3bd6e updated tests 2009-07-22 19:37:26 +00:00
Keith Donald 6c5fb23e79 data binding system polish; package improvements 2009-07-22 19:37:06 +00:00
Juergen Hoeller f519406c37 @Primary/@Lazy/@DependsOn supported as meta-annotations; @Bean supported as meta-annotation on factory methods as well 2009-07-22 15:23:22 +00:00
Christian Dupuis a4bbd9abda xsds now use schemaLocation attribute on xsd:import elements to specify the concrete schema version to import 2009-07-22 14:06:44 +00:00
Juergen Hoeller 4deef3796e @PostConstruct works for multiple private init methods of the same name in a hierarchy (SPR-5945) 2009-07-22 12:52:47 +00:00
Mark Pollack 9696c66517 Finished applying Beverly's edits 2009-07-22 04:53:58 +00:00
Keith Donald 5f99d02292 formatValue collection/array 2009-07-21 23:27:24 +00:00
Keith Donald 4e50c51139 list binding working 2009-07-21 22:54:52 +00:00
Keith Donald 14dd30c5a5 nested binding work; list binding still has kinks 2009-07-21 22:32:06 +00:00
Juergen Hoeller f739c3fde1 resort to using @Bean directly 2009-07-21 15:22:58 +00:00
Juergen Hoeller 3462b43bb1 getAnnotationAttributes generally supports meta-annotation lookup 2009-07-21 14:44:07 +00:00
Juergen Hoeller dbdd6eca60 AnnotationUtils.getAnnotation generally supports meta-annotation lookup 2009-07-21 14:35:42 +00:00
Juergen Hoeller ec1f0e6211 support scope meta-annotations on factory methods as well 2009-07-21 14:23:25 +00:00
Juergen Hoeller 54285ea57c polishing 2009-07-21 14:19:18 +00:00
Juergen Hoeller 3f6e4282d6 WebSphereUowTransactionManager falls back to UOWManagerFactory lookup by default 2009-07-21 14:18:53 +00:00
Juergen Hoeller ea8f628c9c polishing 2009-07-21 14:14:53 +00:00
Juergen Hoeller 364641e9bc revised static annotation check 2009-07-21 14:12:16 +00:00
Juergen Hoeller b2f9786ee8 completed Hessian 3.2 upgrade 2009-07-21 13:08:59 +00:00
Juergen Hoeller 8c7aec3c97 scoped proxies retain original qualifiers (SPR-5911) 2009-07-21 13:00:00 +00:00
Juergen Hoeller da7aa37aa6 refined generic getProxy signature 2009-07-21 12:44:23 +00:00
Juergen Hoeller d64bc93e36 updated Hessian support for Hessian 3.2 compatibility; general remoting refinements 2009-07-21 12:31:03 +00:00
Sam Brannen 05903d640b * @ContextConfiguration's loader attribute is now inherited if not declared locally
* TransactionalTestExecutionListener no longer flushes transactions before rolling back
2009-07-21 12:22:09 +00:00
Sam Brannen b3f3705286 [SPR-5944] Documented potential "false positives" in ORM test code. 2009-07-21 12:12:42 +00:00
Sam Brannen ee1938eb74 [SPR-5315][SPR-5699] Reverted changes to TransactionalTestExecutionListener: transactions are no longer automatically flushed before rolling back. 2009-07-21 11:03:59 +00:00
Keith Donald ec2833cd63 nested properties polish 2009-07-20 22:29:14 +00:00
Keith Donald dc5faec189 all tests back compiling, still a few failing marked ignored 2009-07-20 22:05:28 +00:00
Keith Donald 603ffe80c8 list element binding 2009-07-20 20:34:02 +00:00
Keith Donald 2da1bb8607 more passing tests 2009-07-20 19:07:32 +00:00
Keith Donald f39f91701d property not found / required 2009-07-20 16:10:06 +00:00
Keith Donald 3cd3cddbe0 type formatters 2009-07-20 14:26:29 +00:00
Sam Brannen b2c723a76e [SPR-5916] polishing. 2009-07-20 12:14:56 +00:00
Sam Brannen fc79d98b6a [SPR-5916] ContextLoader class is now inherited from class hierarchy if not specified explicitly via @ContextConfiguration's loader attribute on the current test class. 2009-07-20 09:35:33 +00:00
Christian Dupuis 7f3c4cec25 STS-260: added missing import-package headers so that editor works again 2009-07-20 08:46:19 +00:00
Keith Donald 8ceb64fe0c binding rule impl 2009-07-20 06:22:11 +00:00
Keith Donald 8147281c74 additional binding metadata 2009-07-20 03:48:57 +00:00
Keith Donald 9c78616e11 additional binding metadata 2009-07-20 03:48:32 +00:00
Keith Donald 263d502f51 polish 2009-07-19 06:42:33 +00:00
Keith Donald 0993e9cfb9 polish 2009-07-19 06:33:43 +00:00
Keith Donald 09c5d0eb97 binding status 2009-07-19 06:26:48 +00:00
Keith Donald 8d3fbc5df8 binding system refactoring - work in progress 2009-07-18 16:18:22 +00:00
Juergen Hoeller 8e2797153b revised lenient constructor resolution (follow-up to SPR-5816) 2009-07-16 17:22:03 +00:00
Juergen Hoeller 7eabd2da56 introduced "nonPublicAccessAllowed" flag (SPR-5882) 2009-07-16 15:52:27 +00:00
Sam Brannen ba27c29dc4 [SPR-5916] polishing. 2009-07-16 13:50:54 +00:00
Juergen Hoeller a9254b34d1 introduced "lenientConstructorResolution" flag (SPR-5816) 2009-07-16 13:27:47 +00:00
Juergen Hoeller f4a83c5c74 consistently allow array element 2009-07-16 11:35:25 +00:00
Juergen Hoeller cf29d1c367 constructor argument type matching supports arrays and simple class names now (SPR-5844) 2009-07-16 11:25:52 +00:00
Mark Pollack 35b2a7e612 Applied and reviewed Beverly's final edits up to section "beans-factory-scopes" 2009-07-16 06:41:52 +00:00
Mark Pollack 241280d24d Beverly's edits reviewed. 2009-07-16 03:17:53 +00:00
Chris Beams 9e0d87c518 SPR-5932 - Singleton @Bean methods behave like prototypes in a Spring DM environment
* s/registerCallbacks/registerStaticCallbacks/ - see issue comments for full details
2009-07-15 19:38:47 +00:00
Ramnivas Laddad 977cee4272 Override clover.do for spring-aspects to avoid build failure 2009-07-15 16:13:36 +00:00
Juergen Hoeller 68363f17a7 avoid potential NPE (SPR-5930) 2009-07-15 15:07:37 +00:00
Chris Beams 9163d8043b updated .jms dependency on junit 4.6.0 from test->runtime to test->compile. touched all org.eclipse.jdt.core.prefs (during the process of importing the projects). only the date comments within each have changed. 2009-07-15 07:26:31 +00:00
Ramnivas Laddad ef6395b949 Fixed a type in target name 2009-07-14 21:29:48 +00:00
Ramnivas Laddad 1a5b542309 Another attempt to fix clover-related build failure 2009-07-14 20:13:14 +00:00
Keith Donald 9be56a39b4 moved binding configuration to publis binder api 2009-07-14 13:58:39 +00:00
Arjen Poutsma a8e8382034 Added more headers. 2009-07-14 09:24:15 +00:00
Arjen Poutsma 8073efd69f SPR-5924 - REOPENED -PathVariable mappings are greedy over hard coded mappings 2009-07-14 07:08:02 +00:00
Ramnivas Laddad 252bd3942c Stub out the clover target to allow successful building of snapshots 2009-07-13 21:27:19 +00:00
Keith Donald 0576fe2654 removed experimental stuff 2009-07-13 21:22:59 +00:00
Keith Donald 2cf157e09a polish 2009-07-13 21:17:54 +00:00
Arjen Poutsma abfc479bdb SPR-5924 - REOPENED -PathVariable mappings are greedy over hard coded mappings 2009-07-13 15:35:24 +00:00
Arjen Poutsma c9f4de3ebf Added more headers. 2009-07-13 13:05:46 +00:00
Arjen Poutsma ff1dac8381 SPR-5870 - Add support for content negotiation based on a request parameter value 2009-07-13 09:44:07 +00:00
Ramnivas Laddad b1cb69fcb9 Override clover.instrument target to avoid build failure. Created SPR-5921 to fix this propertly. 2009-07-12 22:46:36 +00:00
Keith Donald 6206e5f11f ignore failing test for now 2009-07-12 18:32:26 +00:00
Keith Donald 9f8638e557 fixed element type bug 2009-07-12 18:29:19 +00:00
Keith Donald 5904814ec6 ignore cases from some tricky scenarios 2009-07-12 18:05:13 +00:00
Keith Donald eb4a767f6b removed last ignore 2009-07-12 18:00:18 +00:00
Keith Donald 737c66d729 polish 2009-07-12 17:57:18 +00:00
Keith Donald 89a8e4073b more el converters 2009-07-12 17:49:13 +00:00
Keith Donald 1344a6d4d0 more converters; since 3.0 2009-07-12 17:47:33 +00:00
Ramnivas Laddad 29139dfd1a Fixed SPR-5920 by implementing GenericInterfaceDrivenDependencyInjectionAspect 2009-07-12 05:58:55 +00:00
Ramnivas Laddad 7199fcc233 Fixed SPR-5918.
Had to override the test.do definition in build.xml. Need to consult the spring-build team to add the change to spring-build itself. 
Since classes in test sources from another project cannot be shared, had to duplicate those classes.
2009-07-12 04:47:59 +00:00
Sam Brannen 29327798c1 [SPR-5699] Investigating issues surrounding automatic flushing of the underlying ORM tool's session via TransactionalTestExecutionListener. 2009-07-11 16:45:48 +00:00
Keith Donald c519f2bd3a string to map 2009-07-10 23:42:39 +00:00
Keith Donald f53e627bb5 string array to map converter 2009-07-10 23:27:27 +00:00
Keith Donald e4c868b837 javadoc 2009-07-10 21:32:24 +00:00
Andy Clement 84bdd1ab8e better method name 2009-07-10 19:44:40 +00:00
Andy Clement 3788a84b8e for Keith and his binder: fault in support for maps (if attempt made to reference into null map) and for general objects, e.g. foo.bar if foo was null, attempt to dynamically build foo. 2009-07-10 19:43:50 +00:00
Andy Clement e3e34b04d4 for Keith and his binder: fault in support for maps (if attempt made to reference into null map) and for general objects, e.g. foo.bar if foo was null, attempt to dynamically build foo. 2009-07-10 19:43:37 +00:00
Andy Clement 85eda27cd4 for Keith and his binder: fault in support for maps (if attempt made to reference into null map) and for general objects, e.g. foo.bar if foo was null, attempt to dynamically build foo. 2009-07-10 19:43:32 +00:00
Keith Donald e85a6740d8 new tests for andy 2009-07-10 18:49:38 +00:00
Arjen Poutsma 6598fd736d BindingJacsonConverter/View -> MappingJacksonConverter/View 2009-07-10 14:25:39 +00:00
Sam Brannen cab7a9250d Updated change log 2009-07-10 12:25:34 +00:00
Sam Brannen 5054802eb9 [SPR-5914] Updated reference manual to point out that class-level usage of @IfProfileValue overrides method-level usage. 2009-07-10 12:15:58 +00:00
Sam Brannen 696d78c144 [SPR-5914] ProfileValueUtils now properly ensures that class-level usage of @IfProfileValue overrides method-level usage. 2009-07-10 11:45:31 +00:00
Mark Pollack 0d98baa5c1 SPR-5619 2009-07-10 04:02:08 +00:00
Mark Pollack 69422e771f SPR-5619 - (OpenSessionInViewTests, ClassUtilTests fixed)
Update org.sf.web/.classpath to refer to tiles 2.1.2
2009-07-10 03:30:12 +00:00
Mark Pollack 8c9346718b POM maintenance/development - initial jarjar support in maven build for ASM 2009-07-10 02:12:50 +00:00
Mark Pollack 0c16554e23 SPR-5803 and additional POM maintenance/development 2009-07-09 19:38:07 +00:00
Keith Donald c9a87de141 polish 2009-07-09 15:37:41 +00:00
Keith Donald 5cb03fa290 collapsed binding factory into binder for time being 2009-07-09 15:36:31 +00:00
Juergen Hoeller a8fa8f4942 JMS SingleConnectionFactory performs start call within connection monitor (for Oracle AQ) 2009-07-09 10:27:02 +00:00
Juergen Hoeller 542b88fb04 only call LocaleResolver when encountering an actual HttpServletRequest 2009-07-09 10:03:17 +00:00
Keith Donald 2db239031f polish 2009-07-09 05:51:49 +00:00
Keith Donald 80760ed7a4 polish 2009-07-09 05:22:51 +00:00
Keith Donald 0c1c5fffba collection property type formatters 2009-07-09 05:18:15 +00:00
Keith Donald 2be6ce0407 binding string to list 2009-07-09 04:37:28 +00:00
Keith Donald 2aef75b907 list binding tests 2009-07-09 03:30:19 +00:00
Keith Donald cbe6695273 formatted annotation to apply to formatted value object classes 2009-07-08 23:21:09 +00:00
Keith Donald 90bafe35cb forgot to commit type descriptor 2009-07-08 22:46:29 +00:00
Keith Donald 2bbf827d57 numerous binding enhancements; removed lazy binding for time being 2009-07-08 21:43:35 +00:00
Juergen Hoeller 5ff6191d72 preserve custom pre-bound RequestAttributes implementations (for Grails) 2009-07-08 15:11:15 +00:00
Juergen Hoeller 68e07239c7 extended checkResource(Locale) signature 2009-07-08 13:37:27 +00:00
Juergen Hoeller 2b13afd891 updated Tiles support for Tiles 2.1 compatibility (SPR-5411) 2009-07-08 13:29:39 +00:00
Arjen Poutsma 928855e47a Javadoc 2009-07-08 10:15:58 +00:00
Andy Clement d3c54d979e SPR-5906: test and fix for using expressions in property list keys and values 2009-07-07 20:13:21 +00:00
Andy Clement dcb52dbbc1 SPR-5906: test and fix for using expressions in property list keys and values 2009-07-07 20:13:18 +00:00
Andy Clement a2bce8c2a8 SPR-5905: support for inner type references in type references 'T(com.foo.A$B)' or in ctor calls 'new com.foo.A$B()' 2009-07-07 17:24:58 +00:00
Andy Clement dbdac9fa31 SPR-5847: require quotes for dotted map key names, eg. map['a.b.c'] 2009-07-07 16:32:56 +00:00
Andy Clement a4b7ce168c SPR-5804: problems with map access if it is the root object; SPR-5847: alternative map referencing strategies: a.b == a[b] == a['b'] 2009-07-07 16:08:10 +00:00
Sam Brannen 2b869d57f2 [SPR-5902] JavaDoc polishing. 2009-07-06 22:36:47 +00:00
Sam Brannen e31d947eb9 [SPR-5640] Updated reference manual regarding new support for marking the test application context as 'dirty' after each test method within a given test class. 2009-07-06 22:23:55 +00:00
Sam Brannen eef6fd3f09 [SPR-5640] polishing 2009-07-06 19:24:34 +00:00
Andy Clement eb69e7574b SPR-5899: Invoking methods or constructors passing null (including varargs support) 2009-07-06 19:21:26 +00:00
Sam Brannen c254f389c0 [SPR-5640] Added support for marking the test application context as 'dirty' after each test method within a given test class via the new DirtiesContext.classMode() attribute. 2009-07-06 19:17:16 +00:00
Andy Clement ea2580af68 SPR-5518: textual alternatives for operators (eq, lt, le, gt, ge, ne, div, mod, not) - removes messy escaping for expressions declared in XML. 2009-07-06 18:53:48 +00:00
Sam Brannen e77e070e7a [SPR-4702] Reference manual updates 2009-07-06 18:04:37 +00:00
Sam Brannen 1f087b412d [SPR-4702] Explicit tests for TestExecutionListener's new beforeTestClass() and afterTestClass()} lifecycle callback methods with TestNG support classes. 2009-07-06 15:08:06 +00:00
Sam Brannen 0483cb5a3d [SPR-4702] Explicit tests for TestExecutionListener's new beforeTestClass() and afterTestClass()} lifecycle callback methods. 2009-07-06 14:48:27 +00:00
Sam Brannen 51b8b99dfc [SPR-4702] JavaDoc updates 2009-07-06 13:41:01 +00:00
Sam Brannen 8dec6af038 [SPR-4702] Added support for @DirtiesContext at the test class level. 2009-07-06 12:58:56 +00:00
Sam Brannen 0222a4a56c Polishing: suppressing warnings. 2009-07-05 21:29:28 +00:00
Sam Brannen f26e2e3d7b [SPR-4702] Improving JavaDoc for TestExecutionListener. 2009-07-05 11:50:19 +00:00
Keith Donald dc935dcd6d added validation result 2009-07-03 15:14:23 +00:00
Keith Donald 2bc76bcd68 initial validation constraint spi commit 2009-07-03 15:13:47 +00:00
Sam Brannen 70ee067400 [SPR-5887] Updated documentation regarding upgrade to JUnit 4.6. 2009-07-03 11:27:13 +00:00
Sam Brannen ba746a8e51 [SPR-5887] Upgraded to JUnit 4.6. 2009-07-03 11:21:39 +00:00
Sam Brannen ceffa783d4 [SPR-5889] Customized Spring Build to include TestNG tests in the automated build process; added global build.versions properties file as well. 2009-07-03 10:49:17 +00:00
Sam Brannen 91c9f544b1 [SPR-5889] Renaming TestNG tests from *Tests_ back to *Tests, but keeping @org.junit.Ignore to exclude them from the JUnit test run. 2009-07-03 09:57:19 +00:00
Sam Brannen 620c9b1f96 [SPR-5895] Upgraded to EasyMock 2.5.1. 2009-07-03 09:32:15 +00:00
Sam Brannen 8bfb56c75b [SPR-5887] Upgraded to JUnit 4.6.0. 2009-07-02 18:07:55 +00:00
Sam Brannen 4da16bb1f9 Made fragile tests a little less fragile: increased max times. 2009-07-02 18:06:20 +00:00
Sam Brannen 0bbca8624f Made fragile tests a little less fragile: increased max times. 2009-07-02 18:02:58 +00:00
Sam Brannen 0c2fa5208d [SPR-5888] Upgrading to TestNG 5.9. 2009-07-02 16:03:31 +00:00
Sam Brannen 58db51324d Made fragile tests a little less fragile: increased max times. 2009-07-02 16:02:24 +00:00
Arjen Poutsma 0f22e22ff3 Javadoc 2009-07-02 11:31:44 +00:00
Mark Pollack 474ffaac63 Beverly's copy edits - to be reviewed. 2009-07-01 15:24:04 +00:00
Arjen Poutsma e1b9c18536 Added defaultViews property. 2009-07-01 10:01:19 +00:00
Arjen Poutsma ef67fc245f FixedJsonView 2009-07-01 09:40:11 +00:00
Andy Clement 7e05c928dd support for concatenation with String via operator '+' - for Ramnivas. 2009-06-30 19:19:07 +00:00
Sam Brannen a32448da02 Added link to the Mockito test spy "mock" testing library. 2009-06-30 18:40:33 +00:00
Arjen Poutsma ca97981d52 Fixing the build, stupid java.util.Date 2009-06-30 09:05:56 +00:00
Thomas Risberg f289b0ff15 updated note re. 3.0 tutorial 2009-06-29 16:59:22 +00:00
Sam Brannen 98320fb854 Fixed Eclipse .classpath by adding org.codehaus.jackson, org.codehaus.jackson.mapper, and org.mozilla.javascript. 2009-06-29 11:14:39 +00:00
Keith Donald 3c76303416 polish 2009-06-26 16:09:18 +00:00
Keith Donald e4d091489b polish 2009-06-26 15:35:28 +00:00
Keith Donald 7e3c1bf09a prepping for jsr 303 integration 2009-06-26 15:33:35 +00:00
Keith Donald 0edc3d94bd polish 2009-06-26 15:19:03 +00:00
Keith Donald b0129111c5 javadoc 2009-06-26 15:11:00 +00:00
Keith Donald 60c2b38c03 Alerts test 2009-06-26 15:09:56 +00:00
Keith Donald 3b68cde32b alerts static factory 2009-06-26 14:47:18 +00:00
Keith Donald 18412ae295 polish 2009-06-26 12:47:52 +00:00
Keith Donald 604e4b6db3 polish 2009-06-26 05:28:25 +00:00
Keith Donald 03c125ebd0 javadoc 2009-06-26 05:16:59 +00:00
Keith Donald 9c5a538ae7 bind and validate lifecycle rename 2009-06-26 05:02:00 +00:00
Keith Donald 023d05e37f set locale 2009-06-26 04:52:50 +00:00
Thomas Risberg 6bb5bdd0c6 moved some misplaced JPA sections 2009-06-26 03:45:48 +00:00
Thomas Risberg 9eacd10615 removed some instances of unnecessary <value></value> elements 2009-06-26 03:37:18 +00:00
Thomas Risberg a24eccb390 fixed JavaConfig example 2009-06-25 22:02:18 +00:00
Keith Donald a0a5fcb4d9 polish 2009-06-25 20:28:53 +00:00
Keith Donald 00702e4e1c polish 2009-06-25 20:27:39 +00:00
Keith Donald 5828010bae Added binder factory; simplified public binder api 2009-06-25 20:26:22 +00:00
Keith Donald 9b7e9942db polish 2009-06-25 19:18:02 +00:00
Keith Donald 6ce119483d copyright 2009-06-25 18:26:07 +00:00
Keith Donald 3f5c43aaf5 message builder 2009-06-25 18:23:07 +00:00
Thomas Risberg 05e3c00a98 added link to Dave's transaction article 2009-06-25 16:54:42 +00:00
Thomas Risberg abc47e56bd updated WebSphere and WebLogic transaction manager sections to reflect currently supported versions 2009-06-25 14:51:37 +00:00
Thomas Risberg efb63fb524 removed old @SuppressWarnings("unchecked") 2009-06-25 12:42:14 +00:00
Arjen Poutsma 49dd707b8a Test for SPR-5822 - Extend @CookieValue mapping to support user-defined types 2009-06-25 11:50:00 +00:00
Thomas Risberg c1a1becd29 polish 2009-06-25 10:59:33 +00:00
Keith Donald a0520501d3 removed user values in favor of simple map after code review 2009-06-25 03:17:04 +00:00
Keith Donald 8eb8602125 eclipse refactor changed code unexpectedly 2009-06-24 22:26:17 +00:00
Keith Donald 1117050815 naming improvements since design review 2009-06-24 22:24:15 +00:00
Keith Donald 511701ebf4 polish 2009-06-24 22:09:46 +00:00
Thomas Risberg 11bf19a3b3 Re-added the methods using a ParameterizedRowMapper with a @deprecated notice to provide backwards compatibility (SPR-5837) 2009-06-24 16:41:06 +00:00
Arjen Poutsma 5ae919af1c SPR-5853 - JSON formatting view for Spring MVC 2009-06-24 14:03:10 +00:00
Arjen Poutsma 398729cda1 SPR-5853 - JSON formatting view for Spring MVC 2009-06-24 13:55:36 +00:00
Arjen Poutsma 56b0606584 Fixing build 2009-06-24 13:26:01 +00:00
Arjen Poutsma 951c664cc4 Removed JsonFactory property, which is redundant with the ObjectMapper property. 2009-06-24 12:36:49 +00:00
Keith Donald f1b936515f @Model and @Bound annotations for configuring Binder instance from annotation model beans 2009-06-23 17:53:16 +00:00
Arjen Poutsma 13c3c577eb SPR-5835 - CookieGenerator default max age value leads to expiration date back in 1977 2009-06-23 09:57:44 +00:00
Ben Hale 42590de197 Removing typo in POM 2009-06-23 07:25:20 +00:00
Juergen Hoeller 4b335dd7e2 added missing space 2009-06-22 20:02:40 +00:00
Juergen Hoeller 87314b950e method invocation result gets set as JobExecutionContext result (SPR-5831) 2009-06-22 17:52:12 +00:00
Juergen Hoeller 6ee8fbe533 added explicit package imports for H2 and HSQLDB 2009-06-22 17:36:49 +00:00
Sam Brannen c996f7ea7b copyright and typo 2009-06-21 12:54:04 +00:00
Arjen Poutsma 3169d428ec SPR-5760 - XStreamMarshaller can not activate XStream automatic annotations detection feature 2009-06-19 13:57:03 +00:00
Arjen Poutsma c2e65baa70 SPR-5838 - XstreamMarshaller does not support field aliasing 2009-06-19 13:51:59 +00:00
Mark Pollack bb3c9c1898 clean up use of old <value></value> usage.
Refer to STS and p-namespace
2009-06-19 13:43:33 +00:00
Arjen Poutsma 54ffedce0d Documentation 2009-06-19 12:30:57 +00:00
Mark Pollack e3ce3306fe replace XML usage of JndiObjectFactoryBean with <jee:jndi-lookup/> 2009-06-19 12:22:18 +00:00
Mark Pollack bf08c3ffbf Document Elvis Operator (?: ) and Safe Navigation Operator (?.)
remove references to ANTLR
2009-06-19 11:58:00 +00:00
Arjen Poutsma ea2ece4516 SPR-5772 - Annotation handler method matching doesn't get method/param choice right 2009-06-19 10:26:14 +00:00
Arjen Poutsma ddcd9f4905 SPR-5836 - RestTemplate - postForObject() method 2009-06-19 07:50:06 +00:00
Keith Donald 4ea373b7dd factored out alert from message; made binding responsible for alert generation 2009-06-18 18:09:01 +00:00
Sam Brannen f749eacbc2 Disabled testExecuteLifecycleBindingErrors() until it passes consistently in the Ant build on Mac OS X. 2009-06-18 12:14:46 +00:00
Sam Brannen 10829f8b20 Repairing Eclipse classpaths and Ivy config:
- org.apache.openjpa -> 1.1.0
 - com.sun.syndication -> 1.0.0
 - javax.el -> 1.0.0
2009-06-18 11:36:04 +00:00
Mark Fisher b2d73b9824 The 'task' sub-element of the 'scheduled-tasks' element is now 'scheduled' to be consistent with the @Scheduled annotation (and to avoid task:task). 2009-06-17 19:39:51 +00:00
Keith Donald 9368e76ffc web bind and lifecycle tests; polish 2009-06-17 15:56:07 +00:00
Keith Donald 62eae6d06a message argument accessor - thanks andy 2009-06-17 03:12:44 +00:00
Arjen Poutsma a4419c98bf Removed REST chapter. 2009-06-16 15:06:46 +00:00
Arjen Poutsma 1f13148458 Moved REST Etag filter to MVC chapter 2009-06-16 14:37:57 +00:00
Arjen Poutsma e9ac4bc0ad Moved REST HTTP Method Conversion to View chapter. 2009-06-16 14:31:42 +00:00
Arjen Poutsma 06777c8123 Moved REST @ExceptionResolver to MVC chapter. 2009-06-16 14:16:38 +00:00
Arjen Poutsma b57085909c Moved REST views to View chapter. 2009-06-16 14:11:35 +00:00
Mark Pollack 7b1ff5859e minor cleanup 2009-06-16 02:37:19 +00:00
Arjen Poutsma 444378c426 SPR-5825 - ShallowEtagHeaderFilter doesn't work: response body is empty 2009-06-15 10:58:45 +00:00
Arjen Poutsma c254924b4c Added @Override 2009-06-15 09:30:46 +00:00
Keith Donald 3504ba3374 polish 2009-06-13 18:38:04 +00:00
Keith Donald 7ef1dace6e polish 2009-06-13 18:31:32 +00:00
Keith Donald 6d59dad4b2 since 3.0; lifecycle pkg 2009-06-13 18:26:48 +00:00
Keith Donald 42cdeb4302 since 3.0 2009-06-13 18:25:59 +00:00
Keith Donald 079b856a6c javadoc 2009-06-13 18:02:40 +00:00
Keith Donald aba0b6d7e0 ignore failing test for now - andy c to investigate next wk 2009-06-13 17:23:40 +00:00
Keith Donald dea3f3433b ignore failing test for now - andy c to look at next wk 2009-06-13 17:20:49 +00:00
Keith Donald d0079c6058 el-based message resolution; expected failure right now 2009-06-13 17:18:12 +00:00
Keith Donald 97e7dfb398 intermediate commit - wip bind and validate lifecycle 2009-06-13 12:45:25 +00:00
Mark Pollack f05df17037 Remove the emphasis on BeanFactory and replace with use of ApplicationContext
Remove example of ObjectFactoryCreatingFactoryBean
Some chapter restructuring
More explicit listings of non-XML based configuration options.
2009-06-12 21:01:05 +00:00
Sam Brannen 2eeeb1b919 Project now builds in Eclipse: added org.codehaus.jackson JARs and sorted classpath entries. 2009-06-12 15:51:20 +00:00
Sam Brannen d6d72b225c Fixed typo 2009-06-12 15:09:23 +00:00
Sam Brannen 7038e1fa3d [SPR-5824] Removed references to StandardScopes from the reference manual; updated examples accordingly; corrected typos; etc. 2009-06-12 14:29:29 +00:00
Sam Brannen 3caecbd1ef A "path patch": AntPatchStringMatcher -> AntPathStringMatcher ;) 2009-06-12 14:26:37 +00:00
Arjen Poutsma ed98bf0668 SPR-5812 - Custom regex matching for @PathVariable 2009-06-12 12:58:27 +00:00
Sam Brannen 0096930a72 Moving Validator and ValidateResults from src/test to src/main so that the build is no longer broken. 2009-06-12 12:18:34 +00:00
Arjen Poutsma 9a84ef4686 - Javadoc
- Renamed JacksonHttpMessageConverter to BindingJacksonHttpMessageConverter
2009-06-12 11:26:13 +00:00
Sam Brannen d26df490b5 JavaDoc typo 2009-06-12 09:56:39 +00:00
Sam Brannen 20195eb66b JavaDoc typo 2009-06-12 09:29:24 +00:00
Arjen Poutsma 3ca8c9be17 SPR-5823 - JSON HttpMessageConverter 2009-06-12 07:53:53 +00:00
Juergen Hoeller 1242400789 marked several dependencies as optional (SPR-5820) 2009-06-11 21:59:07 +00:00
Keith Donald 04fa16b699 successes/failures impl 2009-06-11 21:00:19 +00:00
Keith Donald 75c7a7aeeb polish 2009-06-11 20:56:47 +00:00
Thomas Risberg f70d14e2c2 added support to SimpleJdbcInsert for including synonyms when table metadata is retrieved; this only applies to Oracle (SPR-4782) 2009-06-11 20:54:09 +00:00
Keith Donald 1d6a3e5360 bind and validate lifecycle initial commit 2009-06-11 20:29:01 +00:00
Keith Donald 8998228fac formatter registry 2009-06-11 19:03:43 +00:00
Mark Pollack d89c8e5ea4 Internal formatting changes introduced only by XmlMind editor, mostly changing < to %lt; 2009-06-11 18:15:55 +00:00
Andy Clement 6875df28d9 change from string compare to code compare for Spel exceptions 2009-06-11 16:18:13 +00:00
Andy Clement 69e48828cc change from SpelMessages to SpelMessage. Changed exception getter to getMessageCode() from getMessageUnformatted 2009-06-11 16:17:44 +00:00
Keith Donald b9b893f868 annotation factory for currency format is overkill 2009-06-11 14:21:19 +00:00
Keith Donald dcb3448748 javadoc 2009-06-11 14:15:52 +00:00
Arjen Poutsma f7bf6138f8 SPR-5808 - Make HttpMessageConverterExtractor top level class 2009-06-11 09:51:45 +00:00
Arjen Poutsma 59e41a270d SPR-5808 - Make HttpMessageConverterExtractor top level class 2009-06-11 09:35:56 +00:00
Arjen Poutsma 58d3e704bf SPR-5745 - Support lazy initialization within Jaxb2 OXM classes 2009-06-11 09:20:29 +00:00
Arjen Poutsma 1dc346a32c SPR-5802 - NullPointerException when using @CookieValue annotation 2009-06-11 08:53:56 +00:00
Keith Donald 6403107c08 Removed model parameterized type after review with juergen 2009-06-10 20:44:35 +00:00
Keith Donald 72e89510da added user values holder after review with juergen 2009-06-10 20:36:43 +00:00
Keith Donald 7c433712d1 remove unused field 2009-06-10 14:42:42 +00:00
Keith Donald be75a43c62 added web binder 2009-06-10 14:38:59 +00:00
Keith Donald 37eb0feb2b polish 2009-06-10 13:43:22 +00:00
Keith Donald 991f618a7d createUserValues factory method to Binder 2009-06-10 13:38:24 +00:00
Arjen Poutsma 332d2287da - Merged server-side REST into MVC chapter
- Merged client-side REST into Remoting chapter
- Removed sections about Controller interface, in favor of @Controller
- Updated samples to be more 'RESTful'
2009-06-10 11:09:39 +00:00
Arjen Poutsma 0ab21795fb Javadoc 2009-06-10 10:36:06 +00:00
Thomas Risberg 268f04aac8 updated xxx-2.5.xsd references to 3.0 2009-06-09 23:39:37 +00:00
Thomas Risberg c9bcc771dc updated ORM coverage to provide <tx:advice> and @Transactional samples; removed ProxyFactoryBean example 2009-06-09 23:30:36 +00:00
Thomas Risberg 48e7c44c35 changed section ids so they don't clash with aop-spring.xml 2009-06-09 23:28:54 +00:00
Mark Pollack 278488d11e Documentation cleanup.
Move classic aop-api chapter to appendix
Move JMS 1.0.2 related documentation to appendix
Remove references to Commons Annotations and source level metadata abstraction
Fix program highlighting issue in beans.xml
2009-06-09 21:29:53 +00:00
Keith Donald 503f69b960 polish 2009-06-09 20:14:17 +00:00
Keith Donald 71cbd982e3 separated interface from impl 2009-06-09 19:27:13 +00:00
Keith Donald 58e60fb844 polish 2009-06-09 19:02:44 +00:00
Keith Donald 78b4254d39 polish 2009-06-09 18:59:44 +00:00
Keith Donald 04115a4ff4 todo 2009-06-09 15:30:40 +00:00
Keith Donald a437fdfc7d binding result tracking 2009-06-09 15:21:34 +00:00
Juergen Hoeller a1f1717d03 added JAX-WS workaround for WebLogic 10.3 (SPR-5771) 2009-06-09 14:16:18 +00:00
Keith Donald 9a5c4cab72 polish 2009-06-08 20:42:09 +00:00
Juergen Hoeller 7158742f2a removed unnecessary JTA dependency 2009-06-08 17:39:43 +00:00
Juergen Hoeller 2e0f663092 @Configurable injection failure logged with refined message and without a full stacktrace (SPR-5752) 2009-06-08 15:54:00 +00:00
Juergen Hoeller 95a7ec6587 @ManagedResource is marked as inherited now, for generic management-aware base classes (SPR-3500) 2009-06-08 15:38:55 +00:00
Keith Donald 0cb28f5b41 javdoc 2009-06-08 05:06:37 +00:00
Keith Donald 5bef156258 removed binding failures - not yet needed 2009-06-08 04:28:36 +00:00
Keith Donald 065102bca9 date subpackage 2009-06-08 04:22:10 +00:00
Keith Donald b8b84f4f39 javado polish 2009-06-08 04:09:31 +00:00
Keith Donald 68631eb80d Added surpress warning unchecked 2009-06-07 21:24:33 +00:00
Keith Donald 65c90c56c0 Added AnnotatioFormatterFactory allowing Formatters to be created from property @Annotation values; polish 2009-06-07 21:22:37 +00:00
Keith Donald 534871e6f6 UI message system initial commit; support for adding UI messages of different severities INFO, WARNING, ERROR, FATAL 2009-06-06 19:13:27 +00:00
Christian Dupuis 8c65ed9e0b some updates to error reporting to let errors show up in STS 2009-06-06 07:59:26 +00:00
Mark Fisher df6ba69bc5 The <task:annotation-driven/> element now registers the post-processor for @Scheduled in addition to the already existing @Async support. Both "scheduler" and "executor" attributes are available. 2009-06-06 02:11:39 +00:00
Mark Fisher c218b6c6c7 removed @Override annotations from interface methods 2009-06-06 02:02:18 +00:00
Mark Fisher 2c7463262c Initial commit of @Scheduled annotation and ScheduledAnnotationBeanPostProcessor. 2009-06-06 01:57:45 +00:00
Mark Fisher 6dd2ce940f fixed NPE on latch in test 2009-06-06 01:37:15 +00:00
Mark Fisher 044cc965c4 closing context at end of test methods 2009-06-06 01:25:10 +00:00
Mark Fisher ec6cea54bc Added tests for AsyncAnnotationBeanPostProcessor. 2009-06-06 01:15:05 +00:00
Mark Fisher 6c98e444fe Added tests for ExecutorBeanDefinitionParser. 2009-06-06 01:07:18 +00:00
Mark Fisher 59eaf97886 Added support for the 'executor' element within the 'task' namespace for creating a ThreadPoolTaskExecutor instance. 2009-06-05 01:18:53 +00:00
Thomas Risberg f4e75deb0a added some additional tests (SPR-3322, SPR-5162) 2009-06-03 20:06:04 +00:00
Thomas Risberg 0d5c9c1b75 improved integration; added delegation to NamedParameterJdbcTemplate for batchUpdate from SimpleJdbcTemplate; added call to proteced getParsedSql method; fixed bugs (SPR-3322, SPR-5162) 2009-06-03 19:26:24 +00:00
Juergen Hoeller 81a8b8fd19 strict matching of named arguments 2009-06-03 13:16:01 +00:00
Juergen Hoeller 3426ad3781 prepared 3.0 versions of the remaining namespaces 2009-06-03 10:29:17 +00:00
Juergen Hoeller 53333c3ed0 XML constructor-arg element allows for specifying a constructor argument by name now, with target argument names read from the class file via ASM or from Java 6's @ConstructorProperties annotation (SPR-3313) 2009-06-03 10:21:57 +00:00
Keith Donald 0a0b10b2ff polish 2009-06-02 23:00:26 +00:00
Keith Donald a696d78bd1 polish 2009-06-02 22:29:27 +00:00
Thomas Risberg 8079262705 Updated BeanPropertyRowMapper to remove spaces from column names to improve matching to properties (SPR-5758) 2009-06-02 20:58:44 +00:00
Mark Fisher 3192b926ea Added support for the 'annotation-driven' element within the 'task' namespace to enable detection of the @Async annotation on Spring-managed objects. 2009-06-02 16:58:43 +00:00
Andy Clement 12923f196a new feature for binder - automatically create lists and entries in lists upon referencing nulls 2009-06-02 16:42:43 +00:00
Arjen Poutsma e013ed0685 SPR-5523: JAXB2 is using package-info.java now as well. 2009-06-02 08:56:39 +00:00
Arjen Poutsma 374afccadc SPR-5523: JAXB2 is using package-info.java now as well. 2009-06-02 08:56:07 +00:00
Chris Beams ca65dbae39 Fixing build breakage by removing oxm.jaxb package-info.java and replacing it with the old package.html. The problem was that the new package-info.java was ending up overriding a generated package-info.java that contains important @XmlSource annotations. 2009-06-02 05:02:10 +00:00
Andy Clement 1fc8abade7 updates for Binding code - able to retrieve the type descriptor for a property and ask detailed questions (eg getAnnotations()) 2009-06-02 00:25:59 +00:00
Andy Clement 1e0207cf04 modified so that when the descriptor represents a method parameter, we retrieve the annotations from the method and not the method parameter (seems to make more sense - certainly in the binding case) 2009-06-02 00:25:20 +00:00
Andy Clement ac9e42fa29 BinderTests - two ignored tests reactivated. Binder - modified how annotation based formatters are registered/looked up 2009-06-02 00:24:43 +00:00
Keith Donald 28848f3132 fixed issue that did not compile with sun compiler 2009-06-01 23:23:13 +00:00
Keith Donald 6ea55e9bda more tests 2009-06-01 23:03:19 +00:00
Mark Fisher 3b42200cda initial commit of the AsyncAnnotationBeanPostProcessor 2009-06-01 22:23:40 +00:00
Mark Fisher e67aa6cbb2 Added tests for the 'scheduled-tasks' element parsing within the 'task' namespace. 2009-06-01 21:40:45 +00:00
Mark Fisher b9a3065c0c Added tests for the 'scheduler' element parsing within the 'task' namespace. 2009-06-01 21:16:11 +00:00
Thomas Risberg 01ae825334 polished 2009-06-01 20:52:09 +00:00
Thomas Risberg fbd0be2d65 added convenience execute method that takes vararg of objects in the order of the parameters plus the corresponding executeFunction/executeObject methods (SPR-4739) 2009-06-01 20:43:39 +00:00
Thomas Risberg 7c053127dd added convenience method that takes vararg of objects in the order of the declared parameters (SPR-5696) 2009-06-01 20:40:08 +00:00
Keith Donald b9682d7823 forgot to commit 2009-06-01 18:49:00 +00:00
Mark Fisher b0d11e8c15 Added package declarations and comments to package-info.java files where they had been missing. 2009-06-01 18:47:52 +00:00
Keith Donald 16ad6a3617 initial data binder commit; dateformatter 2009-06-01 18:34:22 +00:00
Ben Hale 8f3ea6d9e6 Back out export of META-INF 2009-06-01 08:07:14 +00:00
Chris Beams a9696c7282 RESOLVED - SPR-5523: Replace all 'package.html' artifacts with 'package-info.java'
* Applied patch submitted by Carlos Zuniga
2009-06-01 04:14:22 +00:00
Thomas Risberg f3e6242568 added override for supportsGetGeneratedKeys for Derby; driver reports this is unsupported, but it seems to work OK 2009-05-29 14:06:01 +00:00
Thomas Risberg 60af7aba16 fixed duplicate section ids 2009-05-29 11:34:54 +00:00
Thomas Risberg b1c6ae99c4 fixed problem retrieving out parameter for function call with MS SQL Server (SPR-5435) 2009-05-28 23:25:25 +00:00
Thomas Risberg 1a790688f4 added 4060 as DataAccessResourceFailure code for MS-SQL (SPR-5788) 2009-05-28 17:11:48 +00:00
Juergen Hoeller a5c324f934 Hibernate AnnotationSessionFactoryBean detects Hibernate's special @Entity annotation too (SPR-5787) 2009-05-28 11:25:39 +00:00
Juergen Hoeller a26a2275c3 revised Java 6 checks to test for the presence of specific Java 6 interfaces/classes only 2009-05-28 11:16:42 +00:00
Arjen Poutsma 15e51c5fb3 Minor changes 2009-05-28 11:13:38 +00:00
Ben Hale 3e4b552b6d Changes to allow snapshot build to proceed. 2009-05-28 08:14:12 +00:00
Thomas Risberg 4105957596 added batchUpdate methods to NamedParameterJdbcTemplate (SPR-3322) 2009-05-28 03:15:47 +00:00
Andy Clement 88e32a3cfe test coverage. now > 95% 2009-05-27 19:59:32 +00:00
Andy Clement 233c84e0b9 test coverage 2009-05-27 19:37:17 +00:00
Andy Clement 1746cc76d1 findbugs issue addressed 2009-05-27 19:22:53 +00:00
Andy Clement e5fea54aea fix for ternary or elvis using a full expression for their result components. parser polishing 2009-05-27 19:16:45 +00:00
Christian Dupuis 1a7ec7daf2 use the annotation meta data in problem reporting 2009-05-27 15:53:35 +00:00
Christian Dupuis 1c5e1e04e0 use the annotation meta data in problem reporting 2009-05-27 15:20:25 +00:00
Ben Hale 4311c6cab6 Spring Build update 2009-05-27 13:41:19 +00:00
Juergen Hoeller aaa9fc73ae polishing 2009-05-27 12:54:19 +00:00
Andy Clement 0a2f936b80 remove antlr dependency 2009-05-27 04:38:36 +00:00
Andy Clement 5ea898bdb4 remove antlr dependency 2009-05-27 04:37:45 +00:00
Andy Clement d372a9ac5d use new SpEL parser 2009-05-27 04:33:21 +00:00
Andy Clement 886739f1d8 Hand written SpEL parser. Removed antlr dependency. tests upgraded to JUnit4 - 93% coverage. 2009-05-27 04:20:18 +00:00
Thomas Risberg e5b553c16a Fixed SimpleJdbcInsert to use SQL type info for all insert operations 2009-05-26 21:25:35 +00:00
Christian Dupuis b23071280f added missing license header 2009-05-26 20:01:36 +00:00
Christian Dupuis cc5747ad14 added restriction tool annotation to oxm namespace 2009-05-26 20:01:17 +00:00
Christian Dupuis ca9526de6c added correct aop image 2009-05-26 20:00:51 +00:00
Keith Donald 2fa2e54c72 polish 2009-05-26 16:22:09 +00:00
Keith Donald 07f19f7441 format system initial commit 2009-05-26 16:18:42 +00:00
Arjen Poutsma 9f4480a1b8 SPR-5774 - UriTemplate not matching querystrings 2009-05-26 12:25:22 +00:00
Christian Dupuis 6cc33fc609 added spring.tooling descriptor and images for all namespaces 2009-05-26 11:58:09 +00:00
Sam Brannen e5f37c8230 The text which was previously "instilled with boldness" (i.e., emboldened) is now just bold. ;) 2009-05-25 15:41:09 +00:00
Arjen Poutsma ce47e86b1c SPR-5782 - BufferedImageHttpMessageConverter 2009-05-25 12:45:51 +00:00
Arjen Poutsma 0d66d2680b Fixing tests 2009-05-25 12:00:53 +00:00
Arjen Poutsma 3a1c88f059 SPR-5782 - BufferedImageHttpMessageConverter 2009-05-25 11:52:43 +00:00
Arjen Poutsma 51f0fc07fa SPR-5782 - BufferedImageHttpMessageConverter 2009-05-25 11:48:46 +00:00
Arjen Poutsma 6cb7f2cfc8 SPR-5766 - @ResponseBody 2009-05-25 10:28:36 +00:00
Sam Brannen af56f6497c Updated regarding generics; fixed typos. 2009-05-25 09:04:05 +00:00
Sam Brannen 5f473b9f26 polishing 2009-05-25 08:59:01 +00:00
Sam Brannen 18039162b9 polishing 2009-05-25 08:58:27 +00:00
Sam Brannen be7bbcd228 Corrected typos and polishing. 2009-05-24 16:30:13 +00:00
Keith Donald f4bc0ab061 polish 2009-05-23 21:27:44 +00:00
Keith Donald b093094c50 renamed back to TypeDescriptor after ConversionContext proved not good enough name for any change 2009-05-23 21:23:10 +00:00
Keith Donald b9aa82a0c4 removed @since 3.0--no point if its not consistent and whole package is 3.0 anyway 2009-05-23 19:54:36 +00:00
Ben Hale 54c768de5d [SPR-5734] Created a javadoc.links preset to link in external javadocs 2009-05-23 05:19:59 +00:00
Thomas Risberg 660cd3d00a further re-working of the ORM chapter 2009-05-22 19:01:32 +00:00
Thomas Risberg 62406474e0 first cut at re-organizing the ORM chapter; moved outdated sections to new Classic Spring Usage appendix 2009-05-22 16:16:12 +00:00
Sam Brannen 4cedea6531 Added "derby.log" to the subversion ignore list. 2009-05-22 14:48:52 +00:00
Sam Brannen a07b890934 Fixed typos; Class --> Class<?>; and both constructors are now private. 2009-05-22 14:41:27 +00:00
Sam Brannen 1b79fffaee Polishing 2009-05-22 14:40:27 +00:00
Mark Pollack 44b7ef43d3 reformatting due to loading inside XmlMind 4.1 2009-05-22 13:40:27 +00:00
Arjen Poutsma 9944b57de3 SPR-5768 - Rearrange logic in ServletHandlerMethodInvoker.getModelAndView() 2009-05-22 10:52:10 +00:00
Arjen Poutsma d7d1ae89f3 SPR-5767 - Misleading error message in HandlerMethodInvoker.resolveRequestBody() 2009-05-22 10:45:52 +00:00
Mark Fisher 0007643af9 SPR-4359 renamed 'concurrent' namespace to 'task' 2009-05-22 03:12:43 +00:00
Mark Pollack 7b815b5e05 SPR-5740 2009-05-21 20:41:57 +00:00
Mark Pollack 8364b611f6 SPR-5735 2009-05-21 20:25:18 +00:00
Mark Fisher 1b302b70d0 SPR-4359 the 'scheduling' namespace is now 'concurrent' 2009-05-21 18:41:13 +00:00
Juergen Hoeller e70d2ce14c polishing 2009-05-20 00:31:00 +00:00
Juergen Hoeller a3af9e7330 revised use of id and display name (id may be null; SPR-5761) 2009-05-20 00:12:19 +00:00
Juergen Hoeller da4f1d0eb7 revised use of id and display name (id may be null; SPR-5761) 2009-05-19 23:48:44 +00:00
Thomas Risberg 762f1c632b updated code examples with generics; took out Java 1.4 references; polished 2009-05-19 23:45:19 +00:00
Juergen Hoeller 63589ef05f polishing 2009-05-19 22:46:22 +00:00
Juergen Hoeller 6964633909 reflective loading of driver classes 2009-05-19 22:42:03 +00:00
Juergen Hoeller 7dc9ec53a1 return generics-capable Class references 2009-05-19 22:39:58 +00:00
Juergen Hoeller e7eb684304 added additional cast for javac 2009-05-19 22:39:20 +00:00
Juergen Hoeller e137b10978 polishing 2009-05-19 22:33:30 +00:00
Juergen Hoeller fc1df58e2b fixed build; revised generic declarations 2009-05-19 22:31:31 +00:00
Mark Pollack 41c8352e16 Documentation fixes: SPR-5748, SPR-5723, SPR-5750, SPR-5753, SPR-5747 2009-05-19 22:09:06 +00:00
Jennifer Hickey 822ed03826 SPR-5256 2009-05-19 21:02:43 +00:00
Sam Brannen 8f359ece3f Minor fixes for grammar and spelling 2009-05-19 19:02:22 +00:00
Sam Brannen b47c81ea2c Suppressing serialization warnings 2009-05-19 15:33:45 +00:00
Keith Donald 50bcecac95 removed unused import 2009-05-18 13:14:55 +00:00
Keith Donald 8cbab5acb6 costin code review comments 2009-05-18 13:13:34 +00:00
Keith Donald 0cc3542aed applied joris's no derby log patch 2009-05-17 15:39:17 +00:00
Sam Brannen 72c330fffb Updated copyright. 2009-05-17 10:22:40 +00:00
Sam Brannen 76aa8b2119 Spring TestContext Framework autowiring tests now include an explicit test for the @Autowired-@Qualifier combination. 2009-05-17 10:22:03 +00:00
Keith Donald d13567bc8f added support for null conversion point type 2009-05-17 03:09:59 +00:00
Keith Donald 18be2ffadc fixed autoboxing bug 2009-05-17 02:22:02 +00:00
Keith Donald c5cc75693d Added to docs 2009-05-16 22:58:18 +00:00
Keith Donald e54519d02e made package private 2009-05-16 22:14:22 +00:00
Keith Donald c6c0dd555b removed unused imports 2009-05-16 22:13:21 +00:00
Keith Donald f3ae7bd961 applied Joris's patch to shutdown Embedded Derby DB; adjusted manifest template to restrict derby version range from 10.5.1. to 10.6 2009-05-16 22:11:18 +00:00
Keith Donald 0c85f3df55 doc polishing 2009-05-16 18:46:56 +00:00
Keith Donald 3c0cbac2fc added derby to manifest 2009-05-16 15:49:49 +00:00
Keith Donald a12ffa5c4c removed @Override 2009-05-16 15:34:47 +00:00
Keith Donald eee52f8804 derby embedded db support initial commit; shutdown use case needs work 2009-05-16 15:05:28 +00:00
Andy Clement 662dbaaed8 SPR-5692: export META-INF so that aop.xml is visible to aspectj load time weaving in an OSGi environment 2009-05-16 01:48:23 +00:00
Thomas Risberg 94d6fa8cb1 removed TopLink coverage 2009-05-15 21:52:23 +00:00
Keith Donald 4394dad372 commented out failing el test for now - todo 2009-05-15 21:34:11 +00:00
Keith Donald b33be88c9d tests passing again 2009-05-15 21:31:57 +00:00
Keith Donald 46c9a003eb BindingPoint to ConversionPoint, javadoc 2009-05-15 20:32:23 +00:00
Thomas Risberg 2ede4d2731 cleaned up transaction chapter 2009-05-15 20:15:18 +00:00
Keith Donald cf2453e8eb renamed TypeDescriptor to BindingPoint 2009-05-15 17:30:03 +00:00
Keith Donald 6f74369cb3 polish 2009-05-15 17:28:55 +00:00
Ben Hale acf17381b9 Upgrade to spring-build 2009-05-15 17:01:37 +00:00
Thomas Risberg b2526f337a removed getting-started; added section on new tutorial 2009-05-15 15:25:43 +00:00
Juergen Hoeller 814a807446 generified JtaTransactionManager code 2009-05-15 15:04:11 +00:00
Christian Dupuis 33de330b0e minor change to use registerBeanComponent instead of directly registering the BeanDefinition 2009-05-15 13:42:24 +00:00
Christian Dupuis d80005a955 fixed tooling related problem where empty value of an attribute that should take a bean reference would call the RuntimeBeanReference constructor in the namespace parser and throw a IllegalArgumentException although the problem has already been reported using the ProblemReporter API 2009-05-15 13:24:59 +00:00
Christian Dupuis 48c97342fe some minor tweaks to the scheduling namespace parser to make it more tooling friendly; applied new tools:annotation to method attribute in scheduling xsd 2009-05-15 13:24:28 +00:00
Christian Dupuis fba5e5f0db fixed tooling related problem where empty value of an attribute that should take a bean reference would call the RuntimeBeanReference constructor in the namespace parser and throw a IllegalArgumentException although the problem has already been reported using the ProblemReporter API 2009-05-15 13:22:30 +00:00
Juergen Hoeller dffec3cdcd quick attempt to fix core.convert breakage 2009-05-15 11:35:41 +00:00
Christian Dupuis eb3ece4208 added spring-tool-3.0.xsd; new expected-method element to describe possible methods for an attribute 2009-05-15 11:03:37 +00:00
Keith Donald 9a261470ad converter system refactoring from community input 2009-05-14 21:36:49 +00:00
Juergen Hoeller a1793457b2 OSGI manifests etc 2009-05-13 20:52:40 +00:00
Juergen Hoeller 30851e36a3 added Commons Lang for Velocity tests 2009-05-13 20:52:06 +00:00
Juergen Hoeller 14732c5dc2 @Import detects and accepts existing configuration class in any order of processing 2009-05-13 20:49:45 +00:00
Thomas Risberg 1ded650a6c finnished updating code examples with generics/varargs for jdbc chapter 2009-05-13 18:45:24 +00:00
Thomas Risberg 585627319d updated version to 3.0.RC1 2009-05-13 18:44:39 +00:00
Juergen Hoeller 433d52b728 @Import detects and accepts existing configuration class of the desired type 2009-05-13 16:19:56 +00:00
Juergen Hoeller 0a8a80ede3 Velocity/FreeMarker/TilesViewResolver only return a view if the target resource exists now 2009-05-13 14:26:56 +00:00
Juergen Hoeller 47992ea07c Velocity/FreeMarker/TilesViewResolver only return a view if the target resource exists now 2009-05-13 14:22:03 +00:00
Juergen Hoeller b0ed6d5685 polishing 2009-05-12 23:53:45 +00:00
Juergen Hoeller 0471d5d3ea removed outdated imports 2009-05-12 23:50:35 +00:00
Juergen Hoeller ad5d090c86 removed outdated imports 2009-05-12 23:40:45 +00:00
Juergen Hoeller f1c852b14c polishing 2009-05-12 23:39:56 +00:00
Juergen Hoeller 59101c096f replaced Commons Collections dependency with Spring-provided LinkedCaseInsensitiveMap; revised CollectionFactory and Spring Map implementations for consistency 2009-05-12 23:37:43 +00:00
Juergen Hoeller da71f266ae ConfigurationClassBeanDefinition implements AnnotatedBeanDefinition 2009-05-12 23:12:51 +00:00
Juergen Hoeller cce6e2f4cd added SourceExtractor support 2009-05-12 22:27:37 +00:00
Thomas Risberg df8219d56e fixed typo and JavaDocs 2009-05-12 20:21:05 +00:00
Thomas Risberg 95213d488c updating code examples with generics/varargs; polishing 2009-05-12 18:18:29 +00:00
Thomas Risberg c55569b51e relaxed parameter type from ParameterizedRowMapper<T> to RowMapper<T> 2009-05-12 18:18:05 +00:00
Juergen Hoeller b1e464fc60 marked "javax.xml.bind" as optional instead of "javax.xml.stream" 2009-05-12 16:56:34 +00:00
Juergen Hoeller bbd69da37f updated all Spring Framework OSGI manifests to list unversioned imports explicitly; relaxed several OSGi bundle dependencies to optional and extended version ranges 2009-05-12 16:43:15 +00:00
Juergen Hoeller 20f12e6158 removed outdated Attributes references 2009-05-12 16:14:09 +00:00
Juergen Hoeller 12d6aa232a added setMetadataReaderFactory method 2009-05-12 16:13:36 +00:00
Arjen Poutsma 51f539b0ad SPR-5725: Typos in Spring REST documentation 2009-05-12 08:47:36 +00:00
Arjen Poutsma d8071acd55 SPR-5724: Documentation for RESTful webservice examples slightly incorrect for 3.0.0.M3 2009-05-12 08:46:14 +00:00
Arjen Poutsma 9cbc1d502d SPR-5746 - Allow XStreamMarshaller subclasses to customise XStream object 2009-05-12 08:41:09 +00:00
Arjen Poutsma eca1cad7e1 Fixing build. 2009-05-12 08:26:33 +00:00
Juergen Hoeller e78c6fc317 explicitly declared SmartApplicationListener as ApplicationListener<ApplicationEvent> 2009-05-11 22:49:07 +00:00
Juergen Hoeller 68deb43d8e removed WebLogic 7.0 support code 2009-05-11 22:47:50 +00:00
Juergen Hoeller 0297116542 generified TypeConverter interface 2009-05-11 22:44:33 +00:00
Juergen Hoeller b72af54f53 eagerly load NestedExceptionUtils to avoid potential getMessage deadlock on OSGi (SPR-5607) 2009-05-11 22:22:11 +00:00
Keith Donald 796a457d9f added two way converter 2009-05-11 21:40:55 +00:00
Keith Donald 50985d5aa9 renamed executeConversion to simply convert for readibility 2009-05-11 21:25:33 +00:00
Keith Donald c3f54b4cb4 renamed to ConverterNotFoundException 2009-05-11 21:24:07 +00:00
Keith Donald d7c90cff14 made ConversionExecutor internal; removed other unused operations from public SPI 2009-05-11 21:23:18 +00:00
Arjen Poutsma bf7a947559 SPR-5732 - When no type conversion strategy is found on a @Controller handler method bind target, a 500 error code should be returned not a 400. 2009-05-11 14:52:14 +00:00
Thomas Risberg 800af734d9 added -1218 to the transientDataAccessResourceCodes for DB2 (SPR-5296) 2009-05-11 14:37:42 +00:00
Arjen Poutsma 0a6cac5a84 SPR-4927 - Return 405 instead of 404 when HTTP method is not supported 2009-05-11 13:32:28 +00:00
Arjen Poutsma 752832a8da SPR-5731 - @Controller method order effects @RequestMapping behavior in ways not expected 2009-05-11 10:34:56 +00:00
Keith Donald fbd921f25a embedded db support 2009-05-09 23:52:13 +00:00
Keith Donald be725ca4c6 polish 2009-05-09 22:30:34 +00:00
Keith Donald aca047d5df polish 2009-05-09 22:28:59 +00:00
Keith Donald 96629c7dc5 h2 embedded db support; updated formatting conventions not to auto-format javadoc; added hsqldb and h2 to jdbc maven pom as optional deps 2009-05-09 22:27:05 +00:00
Thomas Risberg 93cf346fb1 updating code examples with generics/varargs; polishing 2009-05-09 02:40:54 +00:00
Juergen Hoeller d34953e933 polishing 2009-05-08 23:16:53 +00:00
Juergen Hoeller d34c4a2cf0 @Transactional supports qualifier value for choosing between multiple transaction managers 2009-05-08 23:13:43 +00:00
Thomas Risberg dc83107d66 replaced *DaoSuport coverage with annotations used for DAOs 2009-05-08 20:33:32 +00:00
Mark Fisher ff36a31874 SPR-4359 Added support for a 'task-scheduler' element. 2009-05-08 20:32:11 +00:00
Keith Donald c6b23a8277 changelog update for spring-jdbc config add 2009-05-08 19:09:20 +00:00
Keith Donald 6cec37ac7f spring-jdbc xsd initial commit; includes embedded-database tag 2009-05-08 19:06:58 +00:00
Mark Fisher 3e9b9a8a2a SPR-4359 Initial commit of scheduling namespace support. 2009-05-08 18:32:07 +00:00
Arjen Poutsma 4025df1ef8 SPR-5726: Unexpected @RequestMapping semantics when class-level and method-level mappings used together 2009-05-08 10:02:17 +00:00
Juergen Hoeller 266a65982d Servlet/Portlet ApplicationContexts use a specific id based on servlet/portlet name; DefaultListableBeanFactory references are serializable now when initialized with an id; scoped proxies are serializable now, for web scopes as well as for singleton beans; injected request/session references are serializable proxies for the current request now 2009-05-07 22:29:55 +00:00
Juergen Hoeller 4ccb352aac ReloadableResourceBundleMessageSource correctly calculates filenames for locales with variant but without country now (SPR-5716) 2009-05-07 09:24:34 +00:00
Sam Brannen 7d4da0085c [SPR-5713] JavaDoc polishing for @ContextConfiguration. 2009-05-06 22:52:27 +00:00
Sam Brannen 7a0f82029a Corrected typos 2009-05-06 22:43:41 +00:00
Juergen Hoeller bc85b54a87 final preparations for M3 release 2009-05-06 10:16:17 +00:00
Keith Donald 843ef7e33d convert addition 2009-05-06 09:57:29 +00:00
Keith Donald 08a4004a51 embedded db support 2009-05-06 09:28:10 +00:00
Keith Donald 4bfcd16130 polish 2009-05-06 09:14:25 +00:00
Juergen Hoeller 0320445316 moved ScheduledTaskRegistrar to new config package (where the scheduling namespace will live as well) 2009-05-06 08:47:18 +00:00
Keith Donald 6771a22988 polish 2009-05-06 08:38:47 +00:00
Keith Donald c25760f5db polish 2009-05-06 08:19:21 +00:00
Keith Donald f64dcd379e polish 2009-05-06 08:17:29 +00:00
Keith Donald 567dd1eefb package 2009-05-06 08:04:29 +00:00
Keith Donald 442e7343d6 polish 2009-05-06 07:56:52 +00:00
Sam Brannen d159195b79 [SPR-5145] Updated package.html files regarding upgrade to JUnit 4.5. 2009-05-06 07:37:25 +00:00
Keith Donald bc9ad5685d eliminated dependency on jdbc core 2009-05-06 07:36:24 +00:00
Sam Brannen c0c9501005 [SPR-5145] Updated reference manual regarding upgrade to JUnit 4.5; additional improvements in the testing chapter as well. 2009-05-06 06:25:03 +00:00
Sam Brannen 94ceacf843 Reinserted blank line for consistent formatting of the change log. 2009-05-06 05:03:20 +00:00
Sam Brannen 1ec455bab3 Added TestContext framework changes to the change log. 2009-05-06 05:01:05 +00:00
Juergen Hoeller b2319fa38b reactivated ThrowsAdviceInterceptorTests 2009-05-05 21:49:23 +00:00
Juergen Hoeller c356d99621 prepared for 3.0 M3 release 2009-05-05 21:42:33 +00:00
Juergen Hoeller 1b5a433f22 added ScheduledTaskRegistrar etc 2009-05-05 18:40:43 +00:00
Juergen Hoeller 47fc8be59f added test for custom controller stereotype 2009-05-05 18:37:43 +00:00
Juergen Hoeller c7f8d1be62 reactivated ignored tests in revised form 2009-05-05 18:34:35 +00:00
Juergen Hoeller 636d1db36d avoid NPE for definitions without bean class specified 2009-05-05 18:33:20 +00:00
Juergen Hoeller b88edd1dfc polishing 2009-05-05 18:28:21 +00:00
Juergen Hoeller e57543a8f3 turned CountingBeforeAdvice into top-level class 2009-05-05 18:27:22 +00:00
Juergen Hoeller 250ef281a4 reverted non-public proxy interface change 2009-05-05 14:53:01 +00:00
Arjen Poutsma 9fe2b5d211 Moved DefaultHandlerExceptionResolver to fix a tangle. 2009-05-05 13:41:03 +00:00
Juergen Hoeller cef7a2b965 exclude non-public interfaces when autodetecting proxy interfaces 2009-05-05 12:37:18 +00:00
Juergen Hoeller 9d8c99fa1b minimized local MockServletContext dependencies 2009-05-05 12:35:33 +00:00
Juergen Hoeller d446afad33 added local Servlet API mocks 2009-05-05 12:26:11 +00:00
Juergen Hoeller b15e77d5d0 renamed "contextProperties" attribute to "contextParameters" (matching web.xml naming); "contextParameters" contains Servlet/PortletConfig parameters as well; added default "servletContext" and "servletConfig" environment beans; added default "portletContext" and "portletConfig" environment beans; added default web scope "application", wrapping a ServletContext/PortletContext; MockPortletSession supports destruction of session attributes on invalidation 2009-05-05 12:12:01 +00:00
Arjen Poutsma 0a0938fdd6 SPR-5426 - Allow for custom processing or result objects returned from handler/controller methods 2009-05-05 11:40:36 +00:00
Juergen Hoeller a6124793fc polishing 2009-05-05 09:36:53 +00:00
Juergen Hoeller 6930859e82 removed StandardScopes pseudo-enum (superseded by meta-annotated scopes) 2009-05-05 09:32:55 +00:00
Juergen Hoeller 9b4f9106c5 polishing 2009-05-05 09:26:04 +00:00
Sam Brannen 9daae23e17 [SPR-5145] Updated reference manual regarding deprecation of the legacy JUnit 3.8 code base.
[SPR-5713] Updated reference manual with an example demonstrating the new 'value' alias for @ContextConfiguration's 'locations' attribute.
2009-05-05 08:02:22 +00:00
Sam Brannen 781da89d92 [SPR-5713] Added 'value' alias for @ContextConfiguration's 'locations' attribute. 2009-05-05 07:37:14 +00:00
Sam Brannen a6a8b29d19 Fixed typo in JavaDoc 2009-05-04 06:02:59 +00:00
Sam Brannen a637912762 [SPR-5710] Subclasses of SpringJUnit4ClassRunner can now override the default ContextLoader class via the new getDefaultContextLoaderClassName(Class) method. 2009-05-02 23:24:48 +00:00
Thomas Risberg 0383f705ae clean-up of the @Bean content 2009-05-01 20:14:23 +00:00
Thomas Risberg 05f1d08028 re-arranged the @Bean content 2009-05-01 19:48:08 +00:00
Thomas Risberg b1577c28e2 removed some JavaConfig references 2009-04-30 04:35:30 +00:00
Thomas Risberg 9aaea34262 fixed DOCTYPE to refer to the root_element used 2009-04-30 04:16:07 +00:00
Sam Brannen 62c991f9d6 [SPR-5145] Updated reference manual regarding upgrade to JUnit 4.5; additional improvements in the testing chapter as well. 2009-04-30 01:04:39 +00:00
Sam Brannen 17858915ab Corrected grammar and spelling mistakes in reference manual. 2009-04-30 01:03:44 +00:00
Sam Brannen db486e147b Added Eclipse project settings to the reference documentation so that the documentation can be more easily edited and built within Eclipse. 2009-04-30 00:59:09 +00:00
Sam Brannen d3af831334 Now parameterizing with <?> where appropriate. 2009-04-30 00:58:08 +00:00
Sam Brannen 6327b3484b [SPR-5145] Improved test suite for SpringJUnit4ClassRunner: added specific unit tests for test timeouts, repeated tests, and expected exceptions. 2009-04-29 21:29:53 +00:00
Thomas Risberg 41423a9ab9 added some JavaConfig content 2009-04-29 21:14:01 +00:00
Thomas Risberg 15b33684a7 fixed JavaDoc 2009-04-29 21:12:45 +00:00
Sam Brannen 0fbafc0274 Removed unused package. 2009-04-29 19:01:39 +00:00
Sam Brannen 751e0f0eb7 [SPR-5145] Completed migration to JUnit 4.5: SpringJUnit4ClassRunner now extends BlockJUnit4ClassRunner and uses custom Statements; removed obsolete SpringMethodRoadie and SpringTestMethod classes. 2009-04-29 08:21:23 +00:00
Sam Brannen b36f95bcee Corrected typos and sorted Eclipse classpath. 2009-04-28 21:45:14 +00:00
Sam Brannen e5d2570c8d [SPR-5145] Adding custom JUnit 4.5 Statements. 2009-04-28 07:29:24 +00:00
Juergen Hoeller 8583026151 revised target class check for non-Spring CGLIB proxy variants (SPR-5694) 2009-04-27 22:54:39 +00:00
Juergen Hoeller a2fdb68a0b fixed potential race condition through additional synchronization (SPR-5658) 2009-04-27 22:53:40 +00:00
Sam Brannen 2796e72de1 Updated JavaDoc for @TestExecutionListeners. 2009-04-27 22:49:34 +00:00
Mark Pollack 30967d3b20 Update docs to use of @Bean inside a @Component 2009-04-27 05:40:11 +00:00
Mark Pollack c2f4f97fa5 Update docs to use of @Bean inside a @Component 2009-04-27 05:37:45 +00:00
Juergen Hoeller cea8f7f69e custom stereotype annotations can be meta-annotated with @Service, @Controller etc as well; @Scope and @Transactional are now supported as meta-annotations on custom annotations 2009-04-26 11:41:06 +00:00
Juergen Hoeller ac16101f98 polishing 2009-04-26 11:39:00 +00:00
Juergen Hoeller 423809543a polishing 2009-04-24 11:25:27 +00:00
Juergen Hoeller 77112ba80e updated AnnotationMetadata tests for change in Class exposure 2009-04-24 11:24:47 +00:00
Juergen Hoeller b5d21108da @Configuration parsing fully relies on Spring's MetadataReader abstraction now 2009-04-24 11:16:46 +00:00
Keith Donald 37e1333a41 polish 2009-04-23 19:01:41 +00:00
Keith Donald 3a457dcec9 embedded database factory bean 2009-04-23 18:56:26 +00:00
Scott Andrews f6e869163f updating Eclipse .classpath settings for Freemarker 2.3.15 upgrade 2009-04-23 14:13:03 +00:00
Keith Donald eb4d1bf20e deleted old test data source factory 2009-04-22 21:29:47 +00:00
Keith Donald d896a53ca8 polish 2009-04-22 21:16:22 +00:00
Keith Donald adcbe27852 added pre destroy 2009-04-22 21:14:06 +00:00
Keith Donald e783211f88 polish 2009-04-22 19:41:27 +00:00
Keith Donald ec463a32ba added DataSourceFactory strategy; promoted EmbeddedDatabaseConfigurer strategy to public API; added ability to add any number of SQL scripts for db population 2009-04-22 19:31:46 +00:00
Andy Clement d34a2c5d02 SPR-5663: test and fix: inconsistency between canRead() and read() on ReflectivePropertyResolver 2009-04-22 17:57:24 +00:00
Keith Donald b1000cd5c6 embedded 2009-04-22 17:47:44 +00:00
Keith Donald 2e45a19be3 embedded database support initial commit; moved from spring-test; ResourceDatabasePopulator duplicate code with test.jdbc package that needs review 2009-04-22 17:07:20 +00:00
Arjen Poutsma 6fbd198420 SPR-4518 - @RequestMapping methods returning null have an implicit ModelAndView created 2009-04-22 12:57:30 +00:00
Arjen Poutsma c1667687d5 SPR-5634 - OXM does not permit targetClass and mapping file for CastorMarshaller 2009-04-22 12:08:57 +00:00
Arjen Poutsma de18d64b5c Upgraded to Rome 1.0 2009-04-22 11:44:59 +00:00
Juergen Hoeller ea9d8925a2 next cut of JavaConfig metadata reading revision: using cached MetadataReaders 2009-04-22 10:46:24 +00:00
Andy Clement 4c42597cbc SPR-5673: fix for problems with expressions that use the same symbols as are used in the template prefix/suffix 2009-04-22 00:10:47 +00:00
Arjen Poutsma dfa4b3e397 Javadoc 2009-04-21 22:16:32 +00:00
Arjen Poutsma afa461892f SPR-5690 - Request header filtering in @RequestMapping 2009-04-21 22:03:51 +00:00
Keith Donald b8b74db01a test datasource factory initial commit; needs review from Juergen on how to best make DataSource available as a Spring bean when desired 2009-04-21 21:31:16 +00:00
Chris Beams 4d509cebdb Temporarily ignoring GroovyScriptFactoryTests#testResourceScriptFromTag in order to allow more important fixes to roll out. 2009-04-21 18:14:08 +00:00
Chris Beams 7ba4c563a6 Fixing build breakage with GroovyScriptFactoryTests.
The problem was that the Messenger object was not being proxed (assertTrue(AopUtils.isAopProxy(messenger)) was returning false).  The cause for this seemed to be that the
pointcut was malformed / out of date, reading execution(* org.springframework.scripting.Messenger.*(..)), when the groovy Messenger class is actually declared in the org.springframework.scripting.groovy package.
I tried updating the fully-qualified package name in the pointcut expression, and this caused AspectJ matching errors saying that there was not such type that matches that FQ name.
So as a final resort, I removed the full-qualification entirely and went with execution(* *..Messenger.*(..)).  All tests pass now, but it raises the question, why was AJ having matching errors?  Is it because
the pointcut matching is being done before the groovy class is loaded?  There could be a potential bug here.
2009-04-21 17:20:39 +00:00
Chris Beams 7d10d05b27 (temporarily) increasing visibility of the ConfigurationClassAnnotation interface in an attempt to resolve the issue encountered at http://is.gd/tCud 2009-04-21 16:24:54 +00:00
Arjen Poutsma dc90319279 MediaType.parseMediaTypes now accepts null and "" 2009-04-21 13:41:15 +00:00
Ben Hale 6be62f30f1 Updated spring-build 2009-04-20 12:16:50 +00:00
Juergen Hoeller 10d8abea3b EntityResolvers and DefaultNamespaceHandlerResolver support concurrent access now (SPR-5679) 2009-04-20 12:07:00 +00:00
Juergen Hoeller e54a44b577 refined sequence of registration calls 2009-04-20 11:20:01 +00:00
Juergen Hoeller 9306d6dbaa serialize full Pattern objects 2009-04-20 11:14:28 +00:00
Juergen Hoeller 14bd475519 revised support for annotated factory methods (merged @FactoryMethod functionality into JavaConfig facility) 2009-04-19 23:45:31 +00:00
Juergen Hoeller 736169aa2a revised WebApplicationContext lookup 2009-04-19 22:28:31 +00:00
Juergen Hoeller 4cf573ba98 updated to FreeMarker 2.3.15 (SPR-4962) 2009-04-19 22:22:56 +00:00
Juergen Hoeller 58a458986f polishing 2009-04-19 20:36:33 +00:00
Juergen Hoeller 64321755b6 moved Scope annotation to local test package 2009-04-19 20:35:32 +00:00
Juergen Hoeller c230c188be exposed public getModel accessor (SPR-5686) 2009-04-19 19:51:25 +00:00
Juergen Hoeller bc9b256179 fixed "org.hibernate.ejb" version range 2009-04-19 19:36:26 +00:00
Juergen Hoeller 1b9b513820 AspectJ matchesMethodExecution call needs to be synchronized (SPR-5687) 2009-04-19 19:33:23 +00:00
Arjen Poutsma 6495bdd8c8 Added AspectJ dependency 2009-04-18 09:06:04 +00:00
Chris Beams c78f9d14fa Fixed whitespace and added private modifiers to @Value-annotated fields in the @Configuration example 2009-04-18 00:22:03 +00:00
Thomas Risberg 8aface8e5d fixed JavaDoc 2009-04-17 19:43:11 +00:00
Juergen Hoeller 3e63951a57 relaxed @AspectJ detection check (for CGLIB subclasses to still be recognized as an aspect) 2009-04-17 17:32:29 +00:00
Juergen Hoeller 56a48272e6 avoiding synchronization as far as possible (SPR-5668) 2009-04-17 17:28:31 +00:00
Juergen Hoeller 7048689269 polishing 2009-04-17 17:23:50 +00:00
Juergen Hoeller 8ee0363776 mergePropertiesIntoMap copies non-String values as well (SPR-5669) 2009-04-17 12:21:57 +00:00
Arjen Poutsma c225b44f34 SPR-5636 - @RequestMapping matching should be insensitive to trailing slashes 2009-04-17 09:41:04 +00:00
Arjen Poutsma acc84925d3 SPR-5631 - Implicit /** mapping on type-level @RequestMapping 2009-04-17 09:28:08 +00:00
Arjen Poutsma 02e96e01af Changed variable names from path to pattern 2009-04-17 08:26:18 +00:00
Andy Clement b98c7e48ef filled in some basic details on the type conversion support. No TODOs left in this section now. Also properly added the selection/projection sections. 2009-04-17 05:14:07 +00:00
Andy Clement 9d6ae6c532 minor fix 2009-04-17 05:02:05 +00:00
Andy Clement d119411098 removed unnecessary class. improvements to map projection/selection 2009-04-16 19:21:50 +00:00
Arjen Poutsma 1c26d027a7 Increased debug level of mapping info 2009-04-16 13:25:46 +00:00
Arjen Poutsma 6121da988b Working on SPR-5631 - Implicit /** mapping on type-level @RequestMapping 2009-04-16 13:23:24 +00:00
Scott Andrews 4fb901c657 adding 'target' to svn:ignore 2009-04-16 13:23:17 +00:00
Arjen Poutsma ead837938a Added Copyright plugin info 2009-04-16 13:20:33 +00:00
Arjen Poutsma 19e5b7d668 Updated combine method on AntPatchMatcher to reflect usage in unit tests. 2009-04-16 12:53:36 +00:00
Andy Clement 2f27bd5da7 changed to [] from {} for projection and selection (including first and last selection). addresses the problem of clashes with template prefix/suffix 2009-04-15 23:54:52 +00:00
Juergen Hoeller d27cbee69c fixed JasperReports exporter parameter initialization for multi-format views 2009-04-15 23:18:57 +00:00
Juergen Hoeller 310a3a2d71 officially deprecated ClassUtils.forName variant without ClassLoader 2009-04-15 22:33:56 +00:00
Juergen Hoeller 2798a8500c always use application ClassLoader 2009-04-15 22:30:24 +00:00
Juergen Hoeller 1b5812da20 storing type information as specified (SPR-5556, SPR-5562); explicit XML array element in spring-beans-3.0.xsd (SPR-5543) 2009-04-15 22:27:32 +00:00
Arjen Poutsma 5a561bcd07 Minor changes to OXM chapter 2009-04-15 10:11:52 +00:00
Thomas Risberg 1facd45c5e switched to use XInclude 2009-04-14 21:37:40 +00:00
Andy Clement 338a7ee2de SPR-5673: more intelligence in TemplateAwareExpressionParser. Supports prefix/suffix escaping and nesting of prefixes/suffixes 2009-04-14 21:26:56 +00:00
Thomas Risberg 298a5c4a8b rearranged content in "New in Spring 3.0" 2009-04-14 17:24:56 +00:00
Thomas Risberg ab52fdf07b added/modified some links 2009-04-14 14:12:28 +00:00
Ben Hale 6fc16d1e33 [SPR-5675] Added spring-expressions to the library file 2009-04-14 13:18:35 +00:00
Ben Hale af2e117244 [DMSSUP-8] Removed import-scope:=application for aspectj 2009-04-14 08:23:48 +00:00
Mark Pollack 823cc6e691 polishing 2009-04-14 07:07:01 +00:00
Mark Pollack aa36118e1c Finish REST docs, add docs for @FactoryMethod, add links in 'new-in-3' 2009-04-14 06:59:22 +00:00
Thomas Risberg 0c5ab54dce added more content to new in Spring 3 2009-04-14 04:43:15 +00:00
Thomas Risberg a4b1adbc60 fixed typo of language 2009-04-14 04:35:40 +00:00
Thomas Risberg 0e77054854 added content to new in Spring 3 2009-04-14 04:02:10 +00:00
Mark Pollack 7f06639be2 Add REST feed view docs, included edits from Thomas R. 2009-04-13 22:11:15 +00:00
Andy Clement 2f5ba83416 more tests - about 82% coverage now. focused on testing reflection helper since it is rather complex. some asserts also added. 2009-04-13 20:51:52 +00:00
Thomas Risberg 19ec3654df added the rest chapter to the build 2009-04-13 17:46:21 +00:00
Thomas Risberg 38e5deefda added language element to programlisting for syntax highlighting 2009-04-13 15:04:07 +00:00
Thomas Risberg 077d7f4bce added language element to programlisting for syntax highlighting 2009-04-13 14:27:47 +00:00
Thomas Risberg f4b4f28fc2 added language element to programlisting for syntax highlighting 2009-04-13 13:12:38 +00:00
Colin Sampaleanu b7ab939d55 forgot to update eclipse project when updating hibernate versions 2009-04-13 05:25:57 +00:00
Colin Sampaleanu dc592837be allow petclinic unit tests to work. slf4j impl was needed 2009-04-13 05:23:44 +00:00
Colin Sampaleanu 31f61628ff updte hibernate dependencies in integration-test project to same as
those in orm project
2009-04-13 05:03:55 +00:00
Juergen Hoeller ee5e76c48c officially deprecated AbstractJpaTests 2009-04-12 21:16:12 +00:00
Juergen Hoeller 9baf9cdc2f reintroduced "removeApplicationListener" method as well 2009-04-12 20:59:52 +00:00
Andy Clement af6457a67d More tests. First pass on messages review. 2009-04-12 16:45:00 +00:00
Costin Leau f6ecffdba7 + osgi manifest updates 2009-04-11 20:57:09 +00:00
Mark Pollack d16d8984a8 REST documentation 2009-04-11 05:59:12 +00:00
Mark Pollack 4fc77944ad More REST documentation 2009-04-11 04:49:11 +00:00
Keith Donald 5a87334168 made conversion service pluggable 2009-04-10 20:52:16 +00:00
Keith Donald 1d22b9fb88 activated DefaultConversionService in EL, linking convert and EL 2009-04-10 20:47:04 +00:00
Keith Donald 8b52b7eeef autobox tests 2009-04-10 19:19:53 +00:00
Keith Donald ebb203a251 removed custom converter for m3 to add back in rc1; also ensure type descriptor get type always returns wrapper types if primitive 2009-04-10 15:57:18 +00:00
Keith Donald b988f1a539 javadoc 2009-04-10 15:21:16 +00:00
Keith Donald 76f63f8b64 map-to-map tests 2009-04-10 15:07:23 +00:00
Juergen Hoeller 5649f2f31d fixed generic registerCustomEditor signature 2009-04-10 13:44:23 +00:00
Juergen Hoeller 20fc42add0 avoid PortletSession.getAttributeMap() since it is immutable (SPR-5649) 2009-04-10 10:51:45 +00:00
Andy Clement 38c7f566e5 Fixed StandardTypeLocator to only know about java.lang.* out of the box. Doc fixes related to that. 2009-04-10 03:20:09 +00:00
Andy Clement f36b9eb088 finally some comparator logic that makes sense :) 2009-04-10 02:21:25 +00:00
Andy Clement 46c5340f57 More tests, corrections in standard comparator, more helper methods in StandardEvaluationContext. 2009-04-10 00:03:53 +00:00
Andy Clement ba613f2e35 allow for null 2009-04-09 22:04:08 +00:00
Andy Clement 00cecd0dd0 more tests, minor fixes. some findbugs issues addressed. 2009-04-09 22:03:38 +00:00
Juergen Hoeller a9f4eeeabf fixed javadoc 2009-04-09 18:24:07 +00:00
Juergen Hoeller 73dd6c28a3 reintroduced "removeAllListeners()" method since Spring DM uses it 2009-04-09 18:18:54 +00:00
Andy Clement 707d2ed72a Changed signature of convertValue() to keep the Sun compiler happy 2009-04-09 16:00:53 +00:00
Mark Pollack 362629d03b Change version from 3.0.0.M3 to 3.0.0.BUILD-SNAPSHOT (again) 2009-04-09 14:38:35 +00:00
Keith Donald 3e4810f670 polish 2009-04-09 14:09:10 +00:00
Keith Donald a0cab10ccc polish 2009-04-09 14:01:40 +00:00
Arjen Poutsma 7e3e79ca22 SPR-5653: RestTemplate handles redirects incorrectly 2009-04-09 11:03:35 +00:00
Juergen Hoeller 859497b171 @Resource names may use ${...} placeholders (SPR-5656) 2009-04-09 09:14:06 +00:00
Andy Clement 3cac9267e9 Commented out the sections on list projection and #this. 2009-04-09 05:44:35 +00:00
Andy Clement f20dcf275f Corrected some typos, code samples and changed a bit of wording. All code samples are now SpEL testcases. 2009-04-09 01:56:34 +00:00
Andy Clement 9a8bb5f709 More tests and some fixes. Also created tests based on the documentation examples. 2009-04-09 01:43:07 +00:00
Keith Donald 9ce71f67ff conversion service helper tests - part 1 2009-04-08 22:10:26 +00:00
Keith Donald d966965a4c default converter tests 2009-04-08 19:58:19 +00:00
Mark Pollack 5e46fab34d Start of REST documentation 2009-04-08 19:29:02 +00:00
Mark Pollack b132e964be add paragraph on SpEL, reorganize section layout. 2009-04-08 14:06:01 +00:00
Thomas Risberg a3cbb05ed5 added language element to programlisting for syntax highlighting 2009-04-08 13:38:36 +00:00
Andy Clement cfc65b0cc7 Removed unnecessary code. Increased test coverage from 70>75% - still some way to go 2009-04-08 04:50:43 +00:00
Andy Clement 30bed7b54a Corrected exception message inserts 2009-04-08 04:49:47 +00:00
Andy Clement 4a7f7bb24a more tests 2009-04-08 04:48:35 +00:00
Andy Clement 76fcc81bc6 New method to return string representation of typeDescriptor 2009-04-08 04:47:54 +00:00
Mark Pollack f917ba89d6 Spring Expression Language docs 2009-04-08 03:37:28 +00:00
Thomas Risberg fc899e5881 added spring leaf for notes 2009-04-07 22:12:31 +00:00
Thomas Risberg 51526d6541 added JMS to overview 2009-04-07 17:30:44 +00:00
Thomas Risberg fb8ec6ed97 added some styling and color coded syntax highlighting to beans chapter 2009-04-07 16:54:36 +00:00
Mark Pollack 5f5bee1022 Spring Expression Language docs 2009-04-07 04:45:05 +00:00
Mark Pollack 1f00e639e0 Spring Expression Language docs 2009-04-07 04:42:51 +00:00
Chris Beams d08d73f274 Renamed ConfigurationPostProcessorTests -> ConfigurationClassPostProcessorTests 2009-04-06 21:29:30 +00:00
Chris Beams 254bf7e403 Fixed SPR-5655 - dm Server issues with ConfigurationClassPostProcessor attempting to read .class files with ASM with incorrect class loader 2009-04-06 21:23:37 +00:00
Thomas Risberg b14d760c9b an outline of the Getting Started chapter 2009-04-06 20:10:04 +00:00
Chris Beams e500348ca7 Fixed mystyped dependency on org.antlr 3.0.1 in context's Eclipse .classpath 2009-04-06 19:43:41 +00:00
Thomas Risberg eb90bbeadc added the OXM chapter from Spring WS 2009-04-06 19:43:18 +00:00
Andy Clement a9f30fe377 Improving test coverage, more language consistency 2009-04-06 19:04:04 +00:00
Thomas Risberg 55bdd07580 revised overview graphics to match new modules 2009-04-06 16:12:50 +00:00
Mark Pollack f64bedb9e1 Polishing. Add description of literal expressions. 2009-04-05 16:25:26 +00:00
Mark Pollack 51f741ccec Initial pass of docs for he Spring expression language. 2009-04-05 09:38:19 +00:00
Andy Clement c695d00dbe More test coverage for the expression AST 2009-04-04 01:04:31 +00:00
Andy Clement c4de2ba006 include missing package component 2009-04-04 00:06:01 +00:00
Andy Clement 4c5854d017 objects flowing around in expression evaluation are now TypedValue's - these carry generics info, used for conversions. 2009-04-03 23:39:14 +00:00
Andy Clement f6c1144e8d tests for TypeDescriptor - just basic so far 2009-04-03 23:38:31 +00:00
Andy Clement bdecf6720e extra factory method and type descriptor for NULL defined 2009-04-03 23:38:18 +00:00
Andy Clement 5a0522e203 fixed support for -1 parameterIndex to access the method return type 2009-04-03 23:37:59 +00:00
Thomas Risberg aced98bf23 added reference docs to the build 2009-04-03 15:59:02 +00:00
Mark Pollack 8fba89c634 Change antlr version to be 3.0.1 so that is consistent across the project 2009-04-03 14:31:25 +00:00
Mark Pollack 8f76197485 Change version from 3.0.0.M3 to 3.0.0.BUILD-SNAPSHOT 2009-04-03 14:03:48 +00:00
Arjen Poutsma 07e6d9d966 More refinements for combine() 2009-04-03 11:35:18 +00:00
Arjen Poutsma 5dbae2c979 More tests for combine() 2009-04-03 11:14:37 +00:00
Arjen Poutsma 56ddc76712 Added combine method to PathMatcher, for combining two patterns. 2009-04-03 10:44:57 +00:00
Thomas Risberg 6e7e107621 mostly changes to Preface and Introduction chapters 2009-04-03 04:08:08 +00:00
Andy Clement 959cc95c3f design change - no longer surfacing typeDescriptor through property accessor. conversion done internally in property write() code 2009-04-01 23:27:49 +00:00
Andy Clement 00018e511d implement new interface method 2009-04-01 21:58:24 +00:00
Andy Clement 1289f1069c new packages added 2009-04-01 21:47:35 +00:00
Andy Clement 54865c0c1f initial typeDescriptor awareness in the EL. some basic testing of using GenericConversionService 2009-04-01 21:38:51 +00:00
Arjen Poutsma 65afc80821 Working on SPR-5631 2009-04-01 21:07:46 +00:00
Andy Clement accf974727 use type descriptor to determine collection element type 2009-04-01 16:52:12 +00:00
Arjen Poutsma cd164a5d9b Polishing 2009-04-01 13:31:51 +00:00
Arjen Poutsma ed5647a270 Fixing the build... 2009-04-01 08:58:23 +00:00
Thomas Risberg 8a6e51922a started "new in Spring 3" chapter; added some overview to introduction chapter 2009-04-01 03:35:39 +00:00
Juergen Hoeller 4ebd08515c polishing 2009-03-31 20:43:28 +00:00
Juergen Hoeller 0f35fe9d3c first cut of changelog for M3 2009-03-31 20:39:39 +00:00
Juergen Hoeller 9dd70ca9fe polishing 2009-03-31 20:34:57 +00:00
Juergen Hoeller 72cc060eaf request handler methods with @ModelAttribute annotation always return a model attribute (SPR-4867) 2009-03-31 20:34:42 +00:00
Juergen Hoeller 50f49ffca4 requires Portlet API 2.0 now 2009-03-31 20:32:50 +00:00
Juergen Hoeller b5ca53eedf request handler methods with @ModelAttribute annotation always return a model attribute (for Portlet MVC as well) 2009-03-31 20:31:45 +00:00
Juergen Hoeller b85d45725d @Value values may use ${...} placeholders (driven by PropertyPlaceholderConfigurer); @Autowired uses field/parameter name as fallback qualifier value (SPR-5152) 2009-03-31 20:27:42 +00:00
Juergen Hoeller 2524ca33d5 FacesRequestAttributes (as used by RequestContextHolder) can access global Portlet session (SPR-5637) 2009-03-31 20:16:35 +00:00
Mark Pollack e93bf49268 Add Michael Isvy's documentation on @CookieValue and @RequestHeader annotations. 2009-03-31 17:57:52 +00:00
Keith Donald 1b1eb82adc added todos left 2009-03-31 17:56:08 +00:00
Keith Donald 10a1d5042a polish 2009-03-31 17:52:58 +00:00
Keith Donald b9caa6c60f polish 2009-03-31 17:52:16 +00:00
Keith Donald ce8718ebf2 polish 2009-03-31 17:50:26 +00:00
Keith Donald 199c9bb9c5 removed typed value 2009-03-31 16:51:09 +00:00
Keith Donald d38c0d301c polish 2009-03-31 15:55:42 +00:00
Keith Donald 7f6fc4e82e polish 2009-03-31 15:44:25 +00:00
Keith Donald ea9df82d2a ignore failing tests 2009-03-31 15:12:33 +00:00
Keith Donald 518f98d4c3 polish 2009-03-31 15:06:22 +00:00
Juergen Hoeller eabad33aa2 Hessian service exporter sets content type "application/x-hessian" (SPR-5621) 2009-03-31 14:36:46 +00:00
Juergen Hoeller aa8bd6313b added "unregisterManagedResource" method to MBeanExporter/MBeanExportOperations (SPR-5517) 2009-03-31 14:28:14 +00:00
Mark Pollack 5885c703f2 Add ability to publish to S3 maven milestone repository for maven central style artifacts by adding slightly modified spring-build targets to publish-maven.xml 2009-03-31 03:05:28 +00:00
Mark Pollack 7ad5dd1bd6 Use maven ant task to install parent pom instead of using maven from the command line as a workaround for http://jira.codehaus.org/browse/MANTTASKS-87 2009-03-31 01:51:01 +00:00
Mark Pollack 6f64ce8147 Adding additional project information to POM. 2009-03-31 00:50:52 +00:00
Arjen Poutsma 3df99a17f5 Ignoring broken tests 2009-03-30 23:25:15 +00:00
Arjen Poutsma 3ebb5ccdaf Fixing build. @Override on interface implementation methods is not allowed in Java 5, Keith! 2009-03-30 22:56:16 +00:00
Keith Donald ae4f80cf60 type descriptor initial commit 2009-03-30 22:39:16 +00:00
Andy Clement c057638bd0 Indexed objects (arrays/maps/lists) now settable 2009-03-30 19:40:20 +00:00
Andy Clement 401b7f66c4 Indexed objects (arrays/maps/lists) now settable 2009-03-30 19:40:09 +00:00
Mark Pollack fa68b4b9a7 maven deployment script development 2009-03-30 17:45:13 +00:00
Mark Pollack a80cb4f6e9 maven deployment script development 2009-03-30 17:41:26 +00:00
Arjen Poutsma f09f4e8dd2 SPR-4677: Allow annotated methods on a Controller to be marked as exception handlers 2009-03-30 17:20:55 +00:00
Chris Beams 1b13d8fadf Added test using custom properties file with util:properties and dereferenced with @Value("#{...}") 2009-03-30 17:17:44 +00:00
Arjen Poutsma ea37cdc006 Javadoc 2009-03-30 16:46:01 +00:00
Chris Beams cebc85067a polishing @Configuration tests 2009-03-30 16:02:04 +00:00
Chris Beams cc713ad524 RESOLVED - issue SPR-5600: Make naming of @Configuration class processing-related artifacts consistent 2009-03-30 15:26:21 +00:00
Mark Pollack 24e8dccd44 updated spring-library to include web.portlet in .libd and ivy files 2009-03-30 14:45:31 +00:00
Mark Pollack 4c7c30985f Change antlr version to be 3.0.1 so that is consistent across the project 2009-03-30 14:42:34 +00:00
Mark Pollack 351fba1a04 POM maintenance
Place parent pom in publicly accessible directory (org.sf.spring-parent).  
Create a component list pom in org.sf.spring-library.
2009-03-29 09:56:38 +00:00
Chris Beams 68051ec72b Updated BeanMethodTests to reflect change from IllegalArgumentException -> IllegalStateException 2009-03-28 22:29:28 +00:00
Chris Beams 69a762e86a resolved:
+ Provide @Primary annotation (SPR-5590)
+ Provide @Lazy annotation (SPR-5591)
+ Test @Bean initMethod/destroyMethod functionality (SPR-5592)
+ Test @Bean dependsOn functionality (SPR-5593)
2009-03-28 22:21:50 +00:00
Arjen Poutsma 5bcdf81656 Javadoc 2009-03-28 21:20:18 +00:00
Arjen Poutsma 04b3edca33 SPR-5625 - Allow for exceptions to be annotated with a @ResponseStatus annotation 2009-03-28 11:19:45 +00:00
Arjen Poutsma 3ade31bb51 Added tests for returned ModelAndView 2009-03-28 11:07:18 +00:00
Mark Pollack a9c8ba407c POM maintenance 2009-03-28 01:41:11 +00:00
Mark Pollack 5f21cbd9da POM maintenance 2009-03-27 21:28:51 +00:00
Arjen Poutsma 161c926054 SPR-5624 - A default HandlerExceptionResolver that resolves standard Spring exceptions 2009-03-27 19:53:42 +00:00
Arjen Poutsma f92b7f1011 Added readInternal template method 2009-03-27 17:57:41 +00:00
Juergen Hoeller bcf6f23225 declarative destroy-method="..." specifications get validated at bean creation time (SPR-5602) 2009-03-27 17:45:53 +00:00
Arjen Poutsma d14cc0d7a2 - Renamed writeToInternal to writeInternal
- Added separate exceptions for reading and writing HttpMessages
2009-03-27 17:43:29 +00:00
Juergen Hoeller 82fd947712 polishing 2009-03-27 17:41:03 +00:00
Juergen Hoeller fbfbb88032 introduced "matchesName" method on BeanDefinitionHolder 2009-03-27 17:40:25 +00:00
Juergen Hoeller 565c1c1320 added Groovy file settings 2009-03-27 17:33:50 +00:00
Juergen Hoeller 2e378a8049 added further generic property resolution test 2009-03-27 17:31:15 +00:00
Juergen Hoeller 225eb6bcd9 refined version ranges in OSGi manifests 2009-03-27 17:29:48 +00:00
Juergen Hoeller 7e4a230793 removed Axis 1.x support 2009-03-27 17:28:25 +00:00
Arjen Poutsma ee0a294fe8 Made looping over handlerExceptionResolvers more explicit. 2009-03-27 16:44:19 +00:00
Arjen Poutsma 61b76b2adc Javadoc 2009-03-27 16:26:31 +00:00
Mark Pollack 74326a93d2 Fix SPEL tests when using maven. With the maven test runner expression.spel.SetValueTests is run before expression.spel.EvaluationTests. The order is reversed in eclipse/spring-build. Static variables are modifed in SetValueTests that cause EvaluationTests to fail if it is run first. Make a simple fix so SetValueTests uses a local evaluation context variable instead of a static variable. 2009-03-27 16:05:38 +00:00
Arjen Poutsma f9541d1e28 DispatcherServlet.processHandlerException checks whether the ModelAndView is empty before rendering it. 2009-03-27 15:41:03 +00:00
Mark Pollack 2a35aee2c9 change javax.el revision to be 1.0 to be consistent across the project. 2009-03-27 15:07:33 +00:00
Scott Andrews c488f3768c updating eclipse classpath settings 2009-03-27 14:21:04 +00:00
Arjen Poutsma 337323a114 SPR-5617 - Optional Ivy dependencies are mandatory in the OXM bundle's manifest 2009-03-27 10:29:18 +00:00
Chris Beams aee7f1ce53 RESOLVED - issue SPR-5596: Test @Autowired @Configuration class constructors 2009-03-27 05:36:29 +00:00
Chris Beams 1697932c57 consolidated context.annotation.support -> context.annotation 2009-03-27 04:57:13 +00:00
Chris Beams 2c0c523d70 don't assert that CGLIB must be present unless there is at least one @Configuration class found 2009-03-27 03:10:41 +00:00
Chris Beams af058e599d fixing tests in .test package that were failing due to missing CGLIB dependency 2009-03-27 02:10:41 +00:00
Juergen Hoeller 160e04c15a AspectJ update 2009-03-27 00:10:31 +00:00
Juergen Hoeller 89d1c99277 AspectJ update 2009-03-27 00:08:38 +00:00
Juergen Hoeller 62785abc72 polishing 2009-03-27 00:07:25 +00:00
Juergen Hoeller 341ec4ed41 updated to JRuby 1.2 and Hessian 3.2.1 2009-03-27 00:02:20 +00:00
Juergen Hoeller ef41a12fea updated to JRuby 1.2 (remaining compatible with JRuby 1.1 and above) 2009-03-27 00:01:41 +00:00
Juergen Hoeller 07fba932ac updated to Hessian 3.2.1 (remaining compatible with Hessian 3.1.3 and above) 2009-03-27 00:00:31 +00:00
Juergen Hoeller 81e683b3ee CachedIntrospectionResults always caches bean classes except in case of custom BeanInfo (SPR-4876) 2009-03-26 23:15:23 +00:00
Chris Beams 6698ed8420 IN PROGRESS - issue SPR-5599: Hook @Configuration class processing into <context:component-scan/> and <context:annotation-config/> through AnnotationConfigUtils#registerAnnotationConfigProcessors 2009-03-26 19:52:50 +00:00
Chris Beams 826c733c9e SPR-5616: updated spring-library to include asm and oxm bundles in .libd and ivy files 2009-03-26 14:07:53 +00:00
Ben Hale ce24868209 [SPR-5618] Added an Ignored-Existing-Headers directive 2009-03-26 13:57:50 +00:00
Chris Beams 77b2c4e199 SPR-5615 - Improved error message: s/is no interface/is not an interface 2009-03-26 13:56:14 +00:00
Juergen Hoeller 88e336cf56 FreeMarkerView and ResourceBundle/XmlViewResolver can be initialized with ServletContext only (e.g. for testing) 2009-03-26 13:52:28 +00:00
Juergen Hoeller 40b06b5f19 fixed broken "setManagedInterfaces" interface assertion (SPR-5615) 2009-03-26 13:49:21 +00:00
Ben Hale fe99003b45 Made WebApplicationContextUtils:registerWebApplicationScopes public. Changed core's org.springframework.asm OSGi import to proper version numbers 2009-03-26 09:53:14 +00:00
Scott Andrews 99fa91d56e SPR-5605 spring:url tag should use htmlEscape instead of escapeXml for entity encoding 2009-03-26 04:37:26 +00:00
Scott Andrews 0dfba993e8 updating eclipse classpath for test dependencies 2009-03-26 04:30:37 +00:00
Arjen Poutsma 035eea01e8 SPR-5409 - Support for PUTting and POSTing non-form data 2009-03-25 16:33:27 +00:00
Thomas Risberg 93c56f19df added a config property to control defaulting of primitive property when receiving null value from result (SPR-5588) 2009-03-25 15:26:39 +00:00
Arjen Poutsma 476a0ed76e polishing 2009-03-25 12:15:11 +00:00
Thomas Risberg 4dc4ce3275 changed MapSqlParameterSource to SqlParameterSource in executeFunction and executeObject methods for SimpleJdbcCall (SPR-5570) 2009-03-25 12:14:55 +00:00
Thomas Risberg 360434d0d1 defaulting primitive property when receiving null value from result in BeanPropertyRowMapper (SPR-5588) 2009-03-25 12:12:42 +00:00
Arjen Poutsma 665b284443 Added some leftover tests 2009-03-25 11:26:39 +00:00
Arjen Poutsma d75291714a SPR-5604: OXM bundle's BSN is incorrect 2009-03-25 09:57:59 +00:00
Mark Pollack 0152d8d21d SPR-5385, SPR-5301 - initial pass completed of POMs for maven central repository upload. N.B. Can not build spring with these POMs.
Cleanup remains to meet maven central metadata requirements
2009-03-25 08:06:34 +00:00
Chris Beams e5f4b4937c Re-adding ConfigurationPostProcessorTests after its brief removal in r814. @Ignore-ing the testCglibClassesAreLoadedJustInTimeForEnhancement() method as it turns out this was one of the culprits in the recent build breakage. The classloader hacking causes subtle downstream effects, breaking unrelated tests. The test method is still useful, but should only be run on a manual basis to ensure CGLIB is not prematurely classloaded, and should not be run as part of the automated build. 2009-03-25 06:01:17 +00:00
Chris Beams 2db0f122c1 fixed two build-breaking issues:
+ reverted ClassMetadataReadingVisitor to revision 794
+ eliminated ConfigurationPostProcessorTests until further investigation determines why it causes downstream tests to fail (such as the seemingly unrelated ClassPathXmlApplicationContextTests)
2009-03-25 03:14:35 +00:00
Keith Donald 8d63a34652 set value tests 2009-03-24 19:55:39 +00:00
Arjen Poutsma c178888efd SPR-5537: ReSTful URLs with content type extension do not work properly 2009-03-24 17:36:18 +00:00
Mark Pollack 0b463c0838 SPR-5385, SPR-5301 - partial work committed. 2009-03-24 05:56:56 +00:00
Juergen Hoeller 6ca253e3e6 RmiServiceExporter and RmiRegistryFactoryBean synchronize registry lookup/creation 2009-03-24 00:05:21 +00:00
Keith Donald be61846331 pruned bean references support as it was not used 2009-03-23 21:33:15 +00:00
Keith Donald c546ca68d8 upgrade to latest spring build 2009-03-23 19:27:00 +00:00
Keith Donald cbcb88399c made asm an eclipse project 2009-03-23 19:26:01 +00:00
Arjen Poutsma dc0a82bb93 Added test for multiple template variables in one path segment. 2009-03-23 16:37:58 +00:00
Juergen Hoeller 423c4113ee ConstructorArgumentValues exposed indexed arguments in the order of definition (SPR-5554) 2009-03-23 16:06:24 +00:00
Arjen Poutsma a004ed1c51 SPR-5571: typo in RestTemplate javadoc 2009-03-23 14:54:48 +00:00
Juergen Hoeller dab23a71f9 polishing 2009-03-23 14:39:25 +00:00
Juergen Hoeller df99929e21 added TaskScheduler interface and Trigger abstraction; added ConcurrentTaskScheduler and ThreadPoolTaskScheduler; added CommonJ TimerManagerTaskScheduler; added CronTrigger implementation for cron expression support 2009-03-23 14:38:55 +00:00
Juergen Hoeller 26f0671250 TimerTaskExecutor creates non-daemon Timer and uses bean name as default Timer name 2009-03-23 14:35:16 +00:00
Juergen Hoeller d42e24a752 polishing 2009-03-23 14:15:47 +00:00
Juergen Hoeller 4344832a47 qualifier annotations and @Value can be used at method level as well (applying to all parameters);
fixed EL evaluation of prepared constructor arguments for repeated prototype creation
2009-03-23 14:13:41 +00:00
Juergen Hoeller 4708446d4a fixed CachingMapDecorator to support garbage-collected weak references (again) 2009-03-23 11:34:51 +00:00
Juergen Hoeller 84cc32525f type variable cache uses weak values 2009-03-23 11:32:03 +00:00
Juergen Hoeller 38182f302a added superfluous cast as a workaround for the Sun Javac compiler 2009-03-23 11:30:00 +00:00
Juergen Hoeller 7fb59f3226 implement ASM ClassVisitor interface directly 2009-03-23 11:29:29 +00:00
Juergen Hoeller f19fdde61b polishing 2009-03-23 11:28:49 +00:00
Juergen Hoeller 6d7bf17394 polishing 2009-03-23 11:20:18 +00:00
Juergen Hoeller c82a66b59c SessionAwareMessageListener supports generic declaration of concrete JMS Message type 2009-03-23 11:19:25 +00:00
Chris Beams 147709fa9e Tweaks to package-info.java files 2009-03-23 07:36:44 +00:00
Chris Beams 22b25e0d7b Consolidated Util and MutableAnnotationUtils classes into existing AsmUtils 2009-03-23 07:01:01 +00:00
Chris Beams 7f96f57375 polishing 2009-03-23 06:23:01 +00:00
Chris Beams 1284bd585f + JavaDoc updates
+ added objectweb.asm back to .classpath to satisfy transitive need from groovy tests
+ package.html -> package-info.java
2009-03-23 05:28:58 +00:00
Chris Beams bafe6b3ff9 + Removed org.springframework.config.java module 2009-03-23 04:52:47 +00:00
Chris Beams cd50e45645 + Moving .config.java module -> .context 2009-03-23 04:48:04 +00:00
Chris Beams 63b5c48461 + Pruned empty directories 2009-03-23 04:25:20 +00:00
Chris Beams e3b93c3b79 + Pruned empty directories 2009-03-23 04:24:35 +00:00
Chris Beams ef02c61e58 + Repackaged src and test from .config.java.* -> .context.annotation.* 2009-03-23 04:23:25 +00:00
Chris Beams 3f196517f9 + Repackaging test codebase from .config.java.* -> .context.annotation.* 2009-03-23 04:14:20 +00:00
Chris Beams b8f712621d + Added isCglibClassName() to AopUtils for checking bean class names before classloading
+ Added tests for @Aspect support in @Configuration classes
+ Added tests for @Inherited @Configuration behavior
2009-03-23 03:59:07 +00:00
Chris Beams c9ab18e7e7 Made ConfigurationModel semantics explicit by having it extend LinkedHashSet<ConfigurationClass> 2009-03-22 22:59:10 +00:00
Chris Beams 8a5c2a6a56 + Added tests for custom @Bean naming and aliasing
+ Eliminated BeanDefinitionRegistrar and BeanRegistrar types
+ Simplified ConfigurationEnhancer logic
+ Updated JavaDoc for ConfigurationModel and related classes
+ Updated JavaDoc for all ASM visitors
2009-03-22 22:39:04 +00:00
Chris Beams 2bbc4e48ad + Added unit test for BeanMethod 2009-03-22 02:38:44 +00:00
Chris Beams 72fae2ea19 + Source attribution is now consistent across all registered Problems
+ Various pruning of dead code and polish
2009-03-22 01:43:31 +00:00
Chris Beams 8b4ad4575c Circular @Imports are now handled by registering a Problem (CircularImportProblem) as an error with the current ProblemReporter. This eliminates the need for CircularImportException and is a more tooling-friendly approach. 2009-03-21 21:43:44 +00:00
Chris Beams 3ae3de19a9 + Updated all projects to use the re-introduced org.springframework.asm instead of org.objectweb.asm (.java, template.mf, ivy.xml, and .classpath files have been updated)
+ Finished support for @Import, including detection of circular imports
2009-03-21 19:00:57 +00:00
Ben Hale 9182cab52f [SPR-5459] Added jarjar'd asm packaging 2009-03-20 12:15:06 +00:00
Thomas Risberg abbdc1144a Added the Spring Framework reference documentation 2009-03-18 20:00:49 +00:00
Colin Sampaleanu d4ba002b00 update hibernate and openjpa dependencies to match the orm module
variants. Note that tests are still broken
2009-03-15 03:07:05 +00:00
Mark Pollack 13dfa11def Add support for @ScopedProxy for factory beans using the @FactoryBean annotation within a @Component
Add missing unit tests
2009-03-13 18:14:40 +00:00
Colin Sampaleanu bf31766ff8 fix ecliipse jar imports to match recent changes (hibernate, openjpa) to
ivy dependenies
2009-03-13 05:39:32 +00:00
Chris Beams 5b4fc2de36 removing unnecessary eclipse 'Project Facets' metadata 2009-03-13 04:16:58 +00:00
Thomas Risberg 9b1edea8a0 added tests for custom SQLException translation, polished (SPR-4899) 2009-03-12 21:32:40 +00:00
Thomas Risberg a3942c5c1b changed exception class thrown for problems configuring GenericSqlQuery class (SPR-3986) 2009-03-12 21:30:42 +00:00
Thomas Risberg 49549d66ae added the option of providing a database specific custom SQLExceptionTranslator to provide customized translation for any SQLException before the error codes translation happens (SPR-4899) 2009-03-12 17:22:02 +00:00
Thomas Risberg 943e359c4a switched tests to use JUnit4 2009-03-12 06:29:33 +00:00
Thomas Risberg 7ccb0b6e66 added a concrete GenericSqlQuery class to make it possible to configure in application context (SPR-3986) 2009-03-12 04:38:56 +00:00
Thomas Risberg 4145c299ef fixed missing tabs in application context file (SPR-3987) 2009-03-12 04:35:45 +00:00
Thomas Risberg 2855e5c086 moved the application context file to correct directory (SPR-3987) 2009-03-12 02:17:49 +00:00
Thomas Risberg 8fdc57ecbd added a concrete GenericStoredProcedure class to make it possible to configure using application context (SPR-3987) 2009-03-11 23:01:22 +00:00
Thomas Risberg a0139abf1e added a DuplicatKeyException catagory for SQLException translation (SPR-5125) 2009-03-09 23:26:54 +00:00
Keith Donald d9f5a7a6c8 custom converters 2009-03-09 02:28:22 +00:00
Keith Donald 0ef0ff60f0 super converter implementation 2009-03-08 08:47:10 +00:00
Chris Beams b04009357a ignoring clover prefs 2009-03-07 21:51:41 +00:00
Chris Beams 4f8b812e29 ignoring clover prefs 2009-03-07 21:50:53 +00:00
Chris Beams 0494320266 Eliminated all compilation warnings 2009-03-07 21:47:48 +00:00
Chris Beams dc191bec2d Whitespace and license polish 2009-03-07 21:41:45 +00:00
Mark Pollack a2c87ae67a Initial cut of feature to create factory beans using the @FactoryBean annotation within a @Component 2009-03-07 07:48:53 +00:00
Mark Pollack fc9c3009fe Initial cut of feature to create factory beans using the @FactoryBean annotation within a @Component 2009-03-07 07:42:25 +00:00
Chris Beams 6281948cf9 Dependency updates 2009-03-07 06:37:19 +00:00
Chris Beams f953fd5b22 + Further documentation and pruning.
+ Added testing-related TODOs where appropriate
2009-03-07 06:36:18 +00:00
Chris Beams 3130351233 Removed empty .internal package 2009-03-07 06:17:12 +00:00
Chris Beams 5de6e2c395 + Eliminated support for @Extension methods for now
+ Consolidated all remaining supporting classes into .support package, eliminating .internal.*
+ 7 public types remain
2009-03-07 06:14:46 +00:00
Chris Beams faffd98621 Javadoc polish & pruning dead code 2009-03-07 05:49:12 +00:00
Chris Beams 3231f458c8 + Added 'proxyMode' attribute to @Scope annotation
+ Eliminated @ScopedProxy in favor of @Scope(proxyMode=NO|INTERFACES|TARGET_CLASS)
2009-03-07 04:54:31 +00:00
Chris Beams 9735c8024c @Scope is now allowed on methods (for use in conjunction with @Bean) 2009-03-07 03:37:10 +00:00
Chris Beams 100ba6599f + Eliminated UsageError/Validatable/MalformedConfigurationException in favor of existing Problem/ProblemReporter types
+ Pruned a number of attributes from the @Bean and @Configuration annotations
2009-03-07 03:22:22 +00:00
Rossen Stoyanchev c41c64389f Add (missing) dependencies on oxm project and xmlunit library 2009-03-07 00:08:49 +00:00
Keith Donald 3a7b4bf1b0 basic conversion service impl; still need super converters, custom converters, and conversion of generic collection elements 2009-03-06 23:48:17 +00:00
Keith Donald c1f3ec0c5b turned on debug logging 2009-03-06 20:33:43 +00:00
Keith Donald b04134cffb removed aopalliance errant dependency; removed unused import 2009-03-06 20:25:34 +00:00
Keith Donald 622357291c assert of length 1 2009-03-06 20:22:05 +00:00
Chris Beams 11657b54e0 Removing accidentally committed clover-related eclipse metadata 2009-03-06 20:20:40 +00:00
Keith Donald 3d318ea387 javadoc polishing 2009-03-06 20:20:34 +00:00
Chris Beams 9216b3e8e1 Removed Validator interface and inlined its implementations 2009-03-06 20:17:17 +00:00
Keith Donald c278e1e943 convert system spi and api 2009-03-06 20:08:33 +00:00
Chris Beams f83019afed Re-enabled support for @ScopedProxy 2009-03-06 19:33:53 +00:00
Chris Beams 048b7f638f + Moved @Bean into base package, next to @Configuration
+ Removed .ext package
+ Further reduced visibility of types wherever possible
+ Eliminated package cycles
2009-03-06 07:18:42 +00:00
Chris Beams 00ecbde244 Simplifying packaging 2009-03-06 07:11:01 +00:00
Chris Beams dfab514568 polish 2009-03-06 07:05:38 +00:00
Chris Beams 2e7e982487 + Renamed Scopes -> StandardScopes
+ Renamed ConfigurationPostProcessor -> ConfigurationClassPostProcessor
+ JavaDoc and polish for AbstractConfigurationClassProcessor
2009-03-06 06:55:53 +00:00
Chris Beams 8610c0bce8 + Added .clover to svn:ignore
+ Updated ivy Spring dependencies from 2.5.6 -> latest.integration
+ Added src/test/resources directory to appease Spring Build
2009-03-06 03:27:12 +00:00
Chris Beams b985011b24 + Fleshed out, documented, tested and polished the ConfigurationPostProcessor implementation
+ Removed @FactoryMethod indirection and extension point in favor of direct processing of @Bean annotations
2009-03-06 03:12:53 +00:00
Chris Beams 43b2a40343 Initial work to ensure CGLIB classes are not eagerly loaded (CGLIB should only be required if Spring users wish to process @Configuration classes) 2009-03-06 00:38:30 +00:00
Chris Beams 93b558b1ce eliminated dead code 2009-03-05 20:22:06 +00:00
Chris Beams 04314a62e6 Updated ivy and template.mf dependency metadata; added src/main/resources to quiet a spurious build error. 2009-03-05 20:18:08 +00:00
Chris Beams eaf3a7cec4 + Adding POC tooling integration points, namely AbstractConfigurationPostProcessor and allowing for tooling-specified ClassLoader for use with ASM parsing
+ Eliminated ModelMethod in favor of BeanMethod throughout
2009-03-05 20:08:15 +00:00
Arjen Poutsma 61a1c4d0c6 Added SourceHttpMessageConverter as a default. 2009-03-03 11:38:38 +00:00
Arjen Poutsma ca01cb4df6 SPR-5539: Add XML HttpMessageConverters 2009-03-03 11:34:41 +00:00
Arjen Poutsma 2a790ad25b Javadoc 2009-03-03 10:42:43 +00:00
Arjen Poutsma cbd5ddbb0d SPR-5536: RestTemplate does not do HTTP GET if it should 2009-03-03 09:32:48 +00:00
Arjen Poutsma b08ad44230 SPR-5536: RestTemplate does not do HTTP GET if it should 2009-03-03 09:32:05 +00:00
Chris Beams 6631092870 Removed JSTL-related errors from petclinic search and show JSPs 2009-03-03 02:31:45 +00:00
Chris Beams e834711bc0 + Removed old testsuite.iml (favor integration-testsuite.iml)
+ Updated integration-tests/.classpath to point to javax.jdo 2.1.0 instead of 2.0.0
2009-03-03 00:02:18 +00:00
Chris Beams 6b6b8e50a3 Removed dm Server as targeted runtime for petclinic 2009-03-03 00:01:15 +00:00
Arjen Poutsma b96b72fbaf Typos 2009-03-02 20:22:55 +00:00
Arjen Poutsma 03f3bf09d6 SPR-5449: XStreamMarshaller.setImplicitCollection(Map) is insufficient 2009-03-02 11:19:26 +00:00
Chris Beams ff83255ace Adding eclipse metadata 2009-03-01 21:04:30 +00:00
Chris Beams e3153f705f + Renamed @Factory -> @FactoryMethod
+ callbackType -> interceptor
+ registrarType -> registrar
+ validatorTypes -> validators
2009-02-28 06:57:52 +00:00
Chris Beams f9918f9b2e Formatting pass, primarily to align with Spring's convention of hard tab indentation. 2009-02-28 06:18:46 +00:00
Chris Beams f8270428df + Removed requirement for enhanced subclasses to implement InitializingBean. This was in support of injecting @ExternalValue fields, but is no longer necessary in light of @Value
+ Added formatting rules
2009-02-28 06:10:17 +00:00
Chris Beams 3dac5d82b1 Pruned empty .model package 2009-02-28 04:56:26 +00:00
Chris Beams c0c8117d51 + Eliminated .util package
+ Renamed DefaultScopes -> Scopes
+ Renamed MalformedJavaConfigurationException -> MalformedConfigurationException
2009-02-28 04:55:04 +00:00
Chris Beams f43e1110e9 Pruned empty .factory package 2009-02-28 03:44:48 +00:00
Chris Beams c593f06397 Consolidating types and reducing visibility wherever possible. Non-internal public API is now at 18 types (21 including internal packages). 2009-02-28 03:43:35 +00:00
Chris Beams 6deb1acab4 Refactoring and repackaging 2009-02-28 03:08:06 +00:00
Chris Beams d4fdad2202 + Further repackaging and consolidation
+ Tested compatibility with @Value (works, but noticed and filed an unrelated-to-javaconfig improvement. See SPR-5530)
2009-02-28 01:35:04 +00:00
Chris Beams 2689751c2b Repackaging to remove remaining cycles and increase cohesion 2009-02-27 22:54:35 +00:00
Chris Beams 191b829a6c added 'target' directory to svn:ignore 2009-02-27 03:35:09 +00:00
Chris Beams e48fe0d892 Initial cut at migrating JavaConfig essentials into Core. test.basic.BasicTests successfully excercises the simplest possible @Configuration class (contains a single @Bean method). 39 classes were pulled in from from JavaConfig to support this use case. 2009-02-27 01:35:44 +00:00
Arjen Poutsma e8b353e703 Fixing Spring Build 2009-02-25 19:12:12 +00:00
Chris Beams 719a25a006 Updating Eclipse classpath to reflect new dependencies on mortbay resources. 2009-02-25 15:44:38 +00:00
Arjen Poutsma c1ea5a3ab8 Fixing Petclinic 2009-02-25 14:32:51 +00:00
Juergen Hoeller a1ea7f1820 polishing 2009-02-25 13:57:58 +00:00
Juergen Hoeller e10c843809 finalized changelog for M2 release 2009-02-25 13:55:30 +00:00
Juergen Hoeller e989292e2a updated compile and test dependencies 2009-02-25 13:42:45 +00:00
Juergen Hoeller 96e00d6594 clarified applicability of @Order 2009-02-25 13:41:57 +00:00
Arjen Poutsma 5367ec0ff7 Javadoc 2009-02-25 12:12:14 +00:00
Arjen Poutsma d83b601de0 Javadoc 2009-02-25 11:18:20 +00:00
Juergen Hoeller 516cc02d23 added Commons DBCP as test dependency 2009-02-25 10:08:50 +00:00
Juergen Hoeller 6d66e43402 updated code style settings 2009-02-25 10:08:23 +00:00
Juergen Hoeller 092de0107c improved NoClassDefFoundError handling during constructor resolution (SPR-5522) 2009-02-25 10:07:57 +00:00
Ben Hale b80362f8d1 project-build upgrade 2009-02-25 09:39:00 +00:00
Juergen Hoeller 160249c012 generified FactoryBeans and further Java 5 code style updates 2009-02-25 00:34:22 +00:00
Juergen Hoeller 555fa3b4c8 revised OXM package: no provider-specific exceptions anymore, etc 2009-02-25 00:28:15 +00:00
Arjen Poutsma 866ee1150e Added Form converter as a default 2009-02-24 16:21:07 +00:00
Arjen Poutsma 778a00a595 javadoc 2009-02-24 16:20:26 +00:00
Arjen Poutsma 2fde8ef4d9 Fixed URI encoding in URIEditor to be RFC 2396 compliant 2009-02-24 15:12:54 +00:00
Arjen Poutsma eb47a4b5be SPR-5516: RestTemplate should encode the url variables 2009-02-24 15:01:01 +00:00
Arjen Poutsma 4c0edc2b9d SPR-5515: NPE when passing null as a request to RestTemplate.postForLocation 2009-02-24 14:01:07 +00:00
Arjen Poutsma 2d0705467a Added Form converter 2009-02-24 12:59:59 +00:00
Arjen Poutsma e35201fc78 Javadoc 2009-02-24 12:36:22 +00:00
Juergen Hoeller c46b0ae271 polishing 2009-02-24 12:20:41 +00:00
Juergen Hoeller 760cab8fea refactored HTTP support into top-level package "org.springframework.http"; revised RestTemplate facility in package "org.springframework.web.client" 2009-02-24 11:46:00 +00:00
Juergen Hoeller 882c195221 polishing 2009-02-24 00:27:36 +00:00
Juergen Hoeller 0b4e7cc5ed deprecated support for JMS 1.0.2 providers 2009-02-24 00:26:37 +00:00
Arjen Poutsma 11e7ad21b0 Added tests 2009-02-23 23:44:49 +00:00
Arjen Poutsma 332607ad6c Fixed issue in parsing of invalid MediaTypes from java.net.HttpUrlConnection (*; q=.2) 2009-02-23 22:02:10 +00:00
Arjen Poutsma bc8941084a Added MultiValueMap 2009-02-23 17:15:00 +00:00
Arjen Poutsma e22f267dba Added ServerHttpRequest/Response to web.http, and Servlet-based implementations. 2009-02-23 11:49:09 +00:00
Arjen Poutsma b2fdd7f1fe Added UriTemplate class 2009-02-22 14:54:09 +00:00
Arjen Poutsma ca535bb1d0 SPR-5260: RestTemplate 2009-02-22 14:51:00 +00:00
Arjen Poutsma cdd37d7e8b Character encoding tests 2009-02-22 14:46:12 +00:00
Arjen Poutsma e9d548e62f Fixed problem when headers were written after ClientHttpRequest.execute() 2009-02-22 14:35:28 +00:00
Arjen Poutsma 0db40dd676 Fixing tests 2009-02-22 10:15:32 +00:00
Arjen Poutsma 1bc5188953 Fixing tests 2009-02-22 10:03:40 +00:00
Juergen Hoeller dc1edccc56 prototype beans receive independent collection/array even when based on single value (SPR-5512) 2009-02-21 18:04:08 +00:00
Arjen Poutsma 2de9e2a38d Added HTTP conversion abstraction for RestTemplate 2009-02-21 13:34:55 +00:00
Arjen Poutsma 4a02cd96ea Added HTTP abstraction for RestTemplate 2009-02-21 11:52:38 +00:00
Juergen Hoeller 5fed34bdb4 testing the exception message when conversion of a generic collection element fails 2009-02-20 17:12:29 +00:00
Arjen Poutsma 171b855d10 Added JUnit 4.5 2009-02-20 14:58:19 +00:00
Juergen Hoeller 84ea67669a ModelAndView's "cleared" state gets preserved in case of plain model Map access 2009-02-20 11:48:26 +00:00
Juergen Hoeller eb1631f458 SimpleAliasRegistry detects resolved aliases that loop back to the original name (SPR-5419); PropertyPlaceholderConfigurer does not modify Map in case of equal String keys (SPR-5318); inner class names in Java source style ("java.lang.Thread.State") supported as well (SPR-5210) 2009-02-19 16:17:35 +00:00
Juergen Hoeller ff8e7a1289 further M2 revisions 2009-02-19 00:29:21 +00:00
Juergen Hoeller 4cc42bf16f added "flush()" method to TransactionStatus and TransactionSynchronization interfaces; test context manager automatically flushes transactions before rolling back; general polishing of transaction management code 2009-02-19 00:24:05 +00:00
Juergen Hoeller dd7d299aa4 updated for execution of integration tests 2009-02-19 00:16:20 +00:00
Juergen Hoeller 56bd995d9c "url" macro in "spring.ftl" performs standard Servlet URL encoding automatically 2009-02-18 23:55:32 +00:00
Juergen Hoeller d3d0111439 polishing 2009-02-18 23:51:03 +00:00
Juergen Hoeller 85bc98ea4b MethodInvocations and ProceedingJoinPoints always expose original method (not bridge); ProceedingJoinPoint resolves parameter names using ASM-based parameter name discovery 2009-02-18 23:45:14 +00:00
Juergen Hoeller 02164ab6a7 always use static imports with '*' 2009-02-17 19:10:35 +00:00
Juergen Hoeller 43caa57296 optimized OrderComparator usage 2009-02-17 18:19:57 +00:00
Juergen Hoeller 9871e94cad SimpleAliasRegistry's "getAliases" method returns transitive aliases now; @Qualifier value matching takes chained aliases of target beans into account as well 2009-02-17 18:18:33 +00:00
Juergen Hoeller 35c36dda4b fixed HTTP invoker to support resolution of multi-level primitive array classes again 2009-02-17 17:50:14 +00:00
Juergen Hoeller 57874a6050 SmartApplicationListener interface supports source type checking; SimpleApplicationEventMulticaster caches information about event/source matches 2009-02-17 17:46:14 +00:00
Arjen Poutsma aff17ca9e5 Uncommented test case 2009-02-16 13:42:05 +00:00
Juergen Hoeller 35040a6572 prepared for 3.0 M2 release 2009-02-16 01:51:18 +00:00
Juergen Hoeller 5a09a2d642 polishing 2009-02-16 01:43:49 +00:00
Juergen Hoeller d56419dad9 default post-processors use their default component order now 2009-02-16 01:43:24 +00:00
Juergen Hoeller 46cbaa9729 pre-converted property values are preserved more eagerly for re-created beans (SPR-5293) 2009-02-16 01:36:13 +00:00
Juergen Hoeller 15bbd575a9 bridge method resolution works with Hibernate-generated CGLIB proxies as well (SPR-5414) 2009-02-16 01:35:35 +00:00
Juergen Hoeller 213b528ffe ASM-based AnnotationMetadata fully resolves class arguments and enums into Java types (SPR-5477, SPR-5479) 2009-02-15 21:50:01 +00:00
Juergen Hoeller 90b5c3a8dd @RequestMapping type-level param constraints taken into account consistently 2009-02-15 21:31:20 +00:00
Juergen Hoeller a25e24f37e generified TransactionCallback; WebSphereUowTransactionManager preserves original exception in case of rollback (SPR-5270) 2009-02-15 19:48:18 +00:00
Chris Beams d0b03604c8 Remapped static resources as /petclinic/static/images/...
Renamed tutorial from petclinic.html -> tutorial.html
2009-02-14 21:50:51 +00:00
Chris Beams 3ddd08942c Polishing the new RESTful interface to the petclinic webapp (SPR-5487):
* Eliminated redundant 'clinic' servlet mapping (was: http://localhost:8080/petclinic/clinic/owners; now: http://localhost:8080/petclinic/owners)
* A parameterless GET for /owners now returns the list of all owners, rather than an error.
* /owners/form is now /owners/search (distinguishes the 'search form' resource from the 'edit owner form' resource)
* Eliminated any need for redirects, <welcome-file-list/>, and index.jsp. Deleted all of them.
* Updated /owners/{oid}/edit to submit using PUT instead of POST
* Updated URI for edit pet form from /owners/{oid}/pets/{pid} to /owners/{oid}/pets/{pid}/edit (the edit form is a distinct resource)
* Updated /owners/{oid}/pets/{pid}/edit to submit using PUT instead of POST

Changes unrelated to the web interface:

* Partitioned up JSPs into new owners, pets, and vets folders.
* Renamed those JSPs, e.g. ownerForm.jsp -> owners/form.jsp; findOwners.jsp -> owners/search.jsp; owners.jsp -> owners/list.jsp
* Updated various controllers to respect the changes to the URI templates, etc.
* Updated .classpath to include all necessary projects and libs to run the webapp successfully in WTP
* Updated JSP error checking rules to relax validation of fragments like header.jsp and footer.jsp
2009-02-14 09:11:14 +00:00
Chris Beams da2175c0b7 * Updated Eclipse classpath metadata
* Fixed (or suppressed as necessary) JSP errors in petclinic
2009-02-14 03:09:59 +00:00
Juergen Hoeller fe462916b1 TypeUtils detects variations of ParameterizedType/GenericArrayType assignability as well 2009-02-13 12:17:48 +00:00
Juergen Hoeller d8651a88ec UrlResource eagerly closes HTTP connections in case of "getInputStream()" failure (SPR-5338) 2009-02-13 12:16:11 +00:00
Juergen Hoeller c8080be4e5 completed documentation on session destruction callbacks 2009-02-13 11:51:53 +00:00
Juergen Hoeller 6b2d4a81a0 optional boolean parameters in MVC handler methods resolve to "false" if not present 2009-02-13 11:46:55 +00:00
Arjen Poutsma 721f2ca63e Test for SPR-5362 2009-02-13 10:32:22 +00:00
Ben Hale 4252d40708 Upgrade to spring-build 2009-02-13 10:30:33 +00:00
Juergen Hoeller 2674b13b06 fixed MessageListenerAdapter's "getSubscriptionName()" to work without delegate as well (SPR-5309) 2009-02-13 09:15:43 +00:00
Juergen Hoeller 796392db1a ReflectionUtils findMethod detects methods on "java.lang.Object" as well 2009-02-13 09:14:08 +00:00
Juergen Hoeller ffb9625abf polishing 2009-02-13 09:11:03 +00:00
Juergen Hoeller e58d036c73 generic collection type resolution respects upper bound as well 2009-02-13 09:09:56 +00:00
Ben Hale 483104f0fa Updated to new version of spring-build 2009-02-13 08:56:49 +00:00
Juergen Hoeller 647495edd3 avoid NPE in PathMatchingResourcePatternResolver when initialized with null ClassLoader 2009-02-12 23:46:17 +00:00
Juergen Hoeller d6ed6fcd3f refined OSGi version constraints for "javax.annotation" and "junit.framework" 2009-02-12 23:36:56 +00:00
Juergen Hoeller ad266a347e DefaultLobHandler uses explicit Blob/Clob access for reading when "wrapAsLob"=true 2009-02-12 23:30:28 +00:00
Juergen Hoeller 08dd18df58 revised expression parser API design 2009-02-12 23:03:58 +00:00
Juergen Hoeller 2bdb62f4c2 added IntelliJ settings for integration-tests module 2009-02-12 22:12:27 +00:00
Juergen Hoeller f4b466dfdd made SpringBeanAutowiringInterceptor callback signature compatible with WebSphere 2009-02-12 18:05:37 +00:00
Juergen Hoeller ac104d4da0 polishing 2009-02-12 17:41:46 +00:00
Juergen Hoeller fb057bb5f6 generified NumberUtils signature 2009-02-12 17:40:51 +00:00
Juergen Hoeller 8669b3293c fixed JmsException/JmsUtils to fully avoid NPEs in case of cause messages being null 2009-02-12 17:33:57 +00:00
Juergen Hoeller 777a104d48 added @Async annotation, AsyncExecutionInterceptor, AsyncAnnotationAdvisor 2009-02-10 11:24:05 +00:00
Arjen Poutsma 21a442b253 Solved concurrency issue 2009-02-09 22:10:47 +00:00
Juergen Hoeller 5a04ed502b registered plain singletons will be fully matched according to their qualifiers; "systemProperties" bean is not considered a default match for type Properties anymore (SPR-5355) 2009-02-09 22:06:07 +00:00
Juergen Hoeller 6086bb37e7 updated to Hibernate 3.3 + Hibernate EntityManager 3.4 (requires SFL4J <= 1.5.3!) as well as OpenJPA 1.1 2009-02-09 21:40:53 +00:00
Juergen Hoeller 0794756fba revised advice ordering (for async execution interceptor) 2009-02-09 18:32:21 +00:00
Juergen Hoeller fc6d7358ef polishing 2009-02-09 18:28:04 +00:00
Juergen Hoeller 60392d6e74 ApplicationListener beans get obtained on demand, supporting non-singletons as well; ApplicationListeners will be called in the order according to the Ordered contract; generified ApplicationListener interface 2009-02-09 18:26:30 +00:00
Juergen Hoeller 6609386e41 polishing 2009-02-09 15:38:17 +00:00
Juergen Hoeller 205df56ee4 support for WebSphere's ResourceAdapter-managed transactions 2009-02-09 15:36:20 +00:00
Arjen Poutsma f5e5fc1662 Added content negotiation and MarshallingView to petclinic 2009-02-06 16:12:13 +00:00
Arjen Poutsma fae0110536 Added content negotiation and MarshallingView to petclinic 2009-02-06 15:54:57 +00:00
Arjen Poutsma df563dfcd6 SPR-5452: Content negotiation 2009-02-06 14:38:30 +00:00
Arjen Poutsma b96a7a7a8c SPR-5460: Add AtomView sample to PetClinic 2009-02-06 09:12:08 +00:00
Arjen Poutsma ce83ebf0de Added link to Atom spec in javadoc 2009-02-06 08:18:37 +00:00
Juergen Hoeller 7e4fb09369 added "Future submit(Runnable)" and "Future submit(Callable)" to AsyncTaskExecutor; SchedulingTaskExecutor interface extends AsyncTaskExecutor; added ExecutorServiceAdapter class as a standard wrapper for a Spring TaskExecutor; added ThreadPoolExecutorFactoryBean; reduced backport-concurrent support to TaskExecutor adapters 2009-02-05 22:45:35 +00:00
Juergen Hoeller 6cdc25d66a all "taskExecutor" bean properties now accept any "java.util.concurrent.Executor" 2009-02-05 21:18:10 +00:00
Juergen Hoeller ea54c6391e deprecated ConcurrentMap 2009-02-05 21:07:53 +00:00
Juergen Hoeller 92588cddc6 Java 5 code style 2009-02-05 21:04:13 +00:00
Arjen Poutsma 460977263d Added extractFullFilenameFromUrlPath to WebUtils 2009-02-05 15:45:25 +00:00
Arjen Poutsma b0180fdf32 Added MediaType 2009-02-05 15:44:16 +00:00
Arjen Poutsma 747ee86079 Made CollectionsFactory generic 2009-02-05 15:33:44 +00:00
Arjen Poutsma 5786f6c359 Made threadlocals generic 2009-02-03 11:24:10 +00:00
Ramnivas Laddad c8d6c15a05 Fixed toString(), toShortString(), and toLongString() methods for signature and join point (SPR-5437) 2009-01-27 22:58:28 +00:00
Scott Andrews 27460e323a creating eclipse project settings for org.springframework.spring-library 2009-01-26 16:03:05 +00:00
Scott Andrews dd2f1b467b adding servlet api to the eclipse classpath to clear up tooling errors from JSP files 2009-01-26 15:49:55 +00:00
Scott Andrews 178e1161d7 updating eclipse classpath for JDO 2.1 2009-01-26 15:42:13 +00:00
Scott Andrews 0a48996f14 adding missing test time dependencies 2009-01-26 15:35:17 +00:00
Juergen Hoeller e7c5a28586 polishing 2009-01-25 23:29:45 +00:00
Juergen Hoeller eef6086325 polishing 2009-01-25 23:28:01 +00:00
Juergen Hoeller e7465dcb99 generified operations interfaces; update to JDO 2.1; preparation for JPA 2.0 2009-01-25 23:20:41 +00:00
Ramnivas Laddad 612ed8c660 Added sourcepath for aspectjweaver jar 2009-01-24 17:04:29 +00:00
Arjen Poutsma 6c96c48bf5 Resurrected requestScopeTests.xml from revision 573 2009-01-24 12:16:45 +00:00
Scott Andrews 7dcb3b5841 fixing broken unit test related to SPR-5429 2009-01-23 22:32:26 +00:00
Scott Andrews 300e4d7284 SPR-5429 Update Pet Clinic to use HSQL as an embedded database
Removing support for running HSQL in stand-alone mode.  Out of the box embedded HSQL and MySQL are supported.
2009-01-23 20:52:20 +00:00
Scott Andrews 16c9391069 SPR-5429 Update Pet Clinic to use HSQL as an embedded database
Created DbcpDataSourceFactory factory bean to create and populate a dbcp based connection pool.  The factory bean is based on EmbeddedDataSourceFactory from the JavaConfig version of Pet Clinic.  The new DbcpDataSourceFactory has been tested with HSQL in embedded and stand-alone modes.
2009-01-23 20:33:17 +00:00
Scott Andrews 9335233618 javadoc polish 2009-01-23 15:18:25 +00:00
Arjen Poutsma 16843b3a07 Fixed usage of wrong TestBean package. 2009-01-23 11:57:58 +00:00
Scott Andrews 61b5428211 SPR-2733 Improvement for handling checkboxes in web forms (patch included)
Introduced default field prefix of '!', which can be overridden with WebDataBinder#setFieldDefaultPrefix.  If a field is otherwise not present, the default value is used for the field.  Field markers for the same field are ignored.
2009-01-23 00:03:33 +00:00
Scott Andrews 8e261e5833 SPR-3389 Nicer handling of Java 5 enums by the Spring MVC form taglib.
The form:options and form:radiobuttons tags will now render a set of options automatically if the bind target is an Enum and items are not otherwise specified.  The values of the enum are converted into form inputs where by default the form value is the enum's name() and the form label is the enum's toString().
2009-01-22 20:36:36 +00:00
Arjen Poutsma ad2cc34b79 SPR-2581: Provide out of the box implementation of the thread scope 2009-01-22 15:41:29 +00:00
Arjen Poutsma bf9ffe2d67 javadoc 2009-01-22 12:02:30 +00:00
Arjen Poutsma becea6115e SPR-3360: util:property-path like functionality for the p-namespace 2009-01-22 12:01:25 +00:00
Arjen Poutsma 1b6c4929ad Renamed ShortcutTests to SimplePropertyNamespaceHandlerTests 2009-01-22 11:41:14 +00:00
Scott Andrews 52d3440266 removing org.springframework.testsuite, subversive desided to commit the directory without prompting me... 2009-01-21 23:13:00 +00:00
Scott Andrews 1f770574b0 updating eclipse settings and classpaths 2009-01-21 23:02:43 +00:00
Scott Andrews 3bef38e8f8 2009-01-21 22:48:19 +00:00
Arjen Poutsma 7f7ff4ea9b Moved petclinic test configs to resource directory. 2009-01-21 22:26:48 +00:00
Arjen Poutsma fe31de529b SPR-5326: HibernateClinic in PetClinic sample should use constructor-injection instead of field injection 2009-01-21 22:13:00 +00:00
Arjen Poutsma f09db3a106 SPR-5335: manager.sh classpath for petclinic should be updated 2009-01-21 21:31:05 +00:00
Arjen Poutsma 60ce3eb12f SPR-5335: manager.sh classpath for petclinic should be updated 2009-01-21 21:04:15 +00:00
Arjen Poutsma c7d1d3ccb8 SPR-5367: PathVariable mappings are greedy over hard coded mappings 2009-01-21 17:45:42 +00:00
Arjen Poutsma 5d5e41269b Added Pattern comparitor 2009-01-21 17:06:37 +00:00
Juergen Hoeller 61c9397c01 added M2 section to changelog 2009-01-20 18:49:13 +00:00
Juergen Hoeller 49ba677b64 introduced @CookieValue annotation 2009-01-20 18:32:24 +00:00
Juergen Hoeller 9dec670be4 consistent copies of mocks 2009-01-20 18:08:14 +00:00
Juergen Hoeller 8dbbb533f3 consistent copies of mocks 2009-01-20 18:01:51 +00:00
Juergen Hoeller f0415306d5 consistent copies of mocks 2009-01-20 18:01:40 +00:00
Juergen Hoeller 76a6527c4c consistent copies of mocks 2009-01-20 18:01:26 +00:00
Ben Hale 5585526ad1 Upgraded spring-build 2009-01-20 11:06:48 +00:00
Juergen Hoeller 8af66c83ad consistent mock behavior 2009-01-19 23:35:42 +00:00
Juergen Hoeller d950b56999 revised common handler method processing for Portlet 2.0 update 2009-01-19 23:34:41 +00:00
Juergen Hoeller 464c7eedf2 updated Spring Portlet MVC to Portlet API 2.0 2009-01-19 23:32:32 +00:00
Juergen Hoeller 76888e243f polishing 2009-01-19 22:07:25 +00:00
Arjen Poutsma 5948d05ee0 Removed generated classes from repo. 2009-01-16 09:28:54 +00:00
Ben Hale 6479966ac7 Added castor and jaxb2 to the oxm build 2009-01-15 14:45:15 +00:00
Arjen Poutsma 00734954bd Added test-classes to classpath, necessary for generated xmlbeans code 2009-01-15 11:26:21 +00:00
Arjen Poutsma 6d5e07f46a Added jaxb2 and castor tasks for Ben to play with. 2009-01-15 11:12:55 +00:00
Arjen Poutsma 7ec86ebd9e Enabled XMLBeans tests 2009-01-15 10:26:00 +00:00
Ben Hale 4206b69b60 Moved to the trunk spring-build version 2009-01-15 10:18:31 +00:00
Arjen Poutsma c3fcab05f0 Enabled Jibx tests 2009-01-15 09:48:29 +00:00
Ben Hale 17fe9c9712 Updated spring-build 2009-01-14 16:45:03 +00:00
Ben Hale b1d474193d Split the compile and test-compile macros. Added a pre-compile macro. 2009-01-14 16:29:33 +00:00
Arjen Poutsma 7b73830987 Added simple test for SPR-5365 2009-01-14 11:04:28 +00:00
Arjen Poutsma 1dec645383 Polish 2009-01-14 10:03:28 +00:00
Juergen Hoeller 7cdc195331 Portlet mocks support Portlet API 2.0 2009-01-14 09:34:07 +00:00
Juergen Hoeller 46f99640ee javadoc updates for 3.0 2009-01-14 09:29:30 +00:00
Juergen Hoeller ce2c59ec84 Java 5 code style 2009-01-14 09:27:51 +00:00
Juergen Hoeller b05d800205 added "processInjectionBasedOnServletContext" variant 2009-01-14 09:23:52 +00:00
Arjen Poutsma e863f9a371 SPR-5380: MarshallingView should override AbstractView instead of AbstractUrlBasedView 2009-01-13 10:41:26 +00:00
Arjen Poutsma e966fd9605 - Removed GenericMarshaller & GenericUnmarshaller
- Made Marshaller and Unmarshaller generic
2009-01-12 16:43:52 +00:00
Arjen Poutsma 56bdfae39a Added oxm module 2009-01-09 13:34:00 +00:00
Ben Hale c04dec1b15 Updated spring-build 2009-01-09 13:33:41 +00:00
Arjen Poutsma fc06f9ba72 OXM is nearing completion 2009-01-09 12:48:19 +00:00
Arjen Poutsma f2329cf426 Aded createStaxResult 2009-01-09 12:37:41 +00:00
Arjen Poutsma 8ce1f203ff Added generated classes for Castor. 2009-01-08 11:12:28 +00:00
Arjen Poutsma ccd59ca088 Added StaxUtils, hidden StaxSource, StaxResult, and various other Stax-specific classes behind this utility class. 2009-01-07 16:20:40 +00:00
Arjen Poutsma 74f3ed3f19 Added DomContentHandler 2009-01-07 12:20:58 +00:00
Arjen Poutsma 76de5b0e10 Added DomContentHandler 2009-01-07 12:20:42 +00:00
Arjen Poutsma e03a27ef46 Added Stax Source methods to TransformerUtils 2009-01-07 12:00:39 +00:00
Arjen Poutsma 688593074a Fixed version numbers 2009-01-07 11:38:18 +00:00
Arjen Poutsma 22e78c90e0 Added StaxResult 2009-01-07 11:37:09 +00:00
Arjen Poutsma 6be49ad8c5 Added StaxEventContentHandler 2009-01-07 11:36:33 +00:00
Arjen Poutsma e0fe3f35aa Test -> Tests 2009-01-07 11:24:50 +00:00
Arjen Poutsma 7bf6d90f20 Added StaxStreamContentHandler 2009-01-07 11:24:01 +00:00
Arjen Poutsma 0637dbad5e Test -> Tests 2009-01-07 11:20:08 +00:00
Arjen Poutsma 2945253d20 Added SimpleNamespaceContext 2009-01-06 17:07:59 +00:00
Arjen Poutsma 8152b266b1 Renamed XmlReader classes to XMLReader classes 2009-01-06 16:43:49 +00:00
Arjen Poutsma 5f8d442708 Renamed XmlReader tests to XMLReader tests 2009-01-06 16:40:37 +00:00
Arjen Poutsma 86cf17e5e9 Renamed XmlReaders to XMLReaders 2009-01-06 16:32:59 +00:00
Arjen Poutsma 5dfe6775d4 Added various XML helper classes, for use with OXM 2009-01-06 16:24:42 +00:00
Arjen Poutsma 2eca3aee06 Added JaxpVersion 2009-01-06 12:33:41 +00:00
Arjen Poutsma 6ba9ad8116 Added @Override 2009-01-06 11:19:19 +00:00
Arjen Poutsma 03582973d7 Initial import of OXM module 2009-01-06 11:18:27 +00:00
Chris Beams d116c8733a polishing .beans tests 2008-12-24 22:02:08 +00:00
Chris Beams 46722fa946 removing unintentionally added file 2008-12-24 21:52:44 +00:00
Chris Beams 62db6af879 polishing .beans tests 2008-12-24 21:52:19 +00:00
Chris Beams a0bf1b4ade polishing .beans tests 2008-12-24 20:29:14 +00:00
Chris Beams 915ad0a8d9 polishing .beans tests 2008-12-24 20:17:43 +00:00
Chris Beams 751daf95a1 polishing .beans tests 2008-12-24 19:34:04 +00:00
Chris Beams 670bfd5ee2 + polishing .beans tests
+ removed unnecessary dependency on hibernate
2008-12-24 19:14:15 +00:00
Chris Beams 3d634f1eb7 polishing .beans tests 2008-12-24 18:16:53 +00:00
Chris Beams 6966099d85 polishing .aop tests 2008-12-21 00:12:12 +00:00
Chris Beams 4671fd7141 polishing .aop tests 2008-12-20 23:34:49 +00:00
Chris Beams 9211357e94 polishing .aop tests 2008-12-20 23:28:22 +00:00
Chris Beams 5dd4e5220a polishing .aop tests 2008-12-20 23:01:02 +00:00
Chris Beams 0f4ab0a987 polishing .aop tests 2008-12-20 22:30:29 +00:00
Chris Beams beea69d83b polishing .aop tests 2008-12-20 21:06:19 +00:00
Chris Beams 56e868b2d7 polishing .aop tests 2008-12-20 20:06:11 +00:00
Chris Beams 7abde41d5b polishing .aop tests 2008-12-20 19:29:15 +00:00
Chris Beams ac9f9c1348 updated eclipse team project definition from .testsuite -> .integration-tests 2008-12-20 09:40:21 +00:00
Chris Beams 07c15ce746 renamed .testsuite -> .integration-tests 2008-12-20 09:36:46 +00:00
Chris Beams a73e4fc266 removing empty dirs from .testsuite 2008-12-20 09:14:08 +00:00
Chris Beams c3a68dfdda removing empty dirs from .testsuite 2008-12-20 09:12:11 +00:00
Chris Beams 6a31155c62 eliminating all unnecessary artifacts from .testsuite 2008-12-20 09:09:31 +00:00
Chris Beams 3da373eeaf moved XmlBeanFactoryTests and attendant XML from .testsuite -> .context 2008-12-20 08:19:32 +00:00
Chris Beams d083432478 refactored .context module's .beans.factory and .context.access tests in preparation for moving .beans.factory.xml tests from .testsuite -> .context 2008-12-20 07:22:07 +00:00
Chris Beams 78c692b0cb refactored XmlBeanFactoryTests in preparation for move from .testsuite -> .context 2008-12-20 00:18:15 +00:00
Chris Beams 7a0d9c7533 moved ApplicationContext-dependent .beans.factory.xml.* tests from .testsuite -> .context 2008-12-19 22:33:26 +00:00
Chris Beams be53a80657 moved ApplicationContext-dependent .aop.* unit tests from .testsuite -> .context
in the process, identified and refactored two genuine integration tests (AopNamespaceHandlerScopeIntegrationTests, AdvisorAutoProxyCreatorIntegrationTests), which will remain in .testsuite due to broad-ranging dependencies
2008-12-19 21:58:42 +00:00
Chris Beams 2d37eb722b + moving .aop.aspectj.* unit tests from .testsuite -> .context
+ @SuppressWarnings and generic parameters to production .aop sources
2008-12-19 15:45:06 +00:00
Chris Beams 4a77699d38 refactoring .testsuite .aop.aspectj tests in preparation for migration to .context 2008-12-19 14:57:35 +00:00
Chris Beams d7a9d7c8e6 + refactoring .testsuite .aop.aspectj tests in preparation for migration to .context
+ updated all ivy.xml files to depend on AspectJ 1.6.2
2008-12-19 14:56:09 +00:00
Chris Beams 5b9da399c6 moving .aop.aspectj.* unit tests from .testsuite -> .context 2008-12-19 03:45:30 +00:00
Chris Beams b6906ecfb7 final polish on .testsuite .aop.aspectj tests prior to migration to .context 2008-12-19 03:10:43 +00:00
Chris Beams 81efa4d23c refactoring .testsuite .aop.aspectj tests in preparation for migration to .context 2008-12-19 02:59:46 +00:00
Chris Beams 6f91ffac62 refactoring .testsuite .aop.aspectj tests in preparation for migration to .context 2008-12-19 02:57:21 +00:00
Chris Beams eabec18151 refactoring .testsuite .aop.aspectj tests in preparation for migration to .context 2008-12-19 02:29:04 +00:00
Chris Beams aee972c5b1 re-adding mock.jndi.* artifacts to .orm test codebase eliminated after moving away from svn:externals 2008-12-18 22:30:35 +00:00
Chris Beams 9845f56ba0 reverting accidentally deleted (in r469) mock/web/* classes 2008-12-18 22:16:16 +00:00
Chris Beams ea68d343fa eliminated svn:externals in favor of localized copies of shared artifacts 2008-12-18 21:27:18 +00:00
Juergen Hoeller c442a5818d updated dependencies 2008-12-18 19:16:54 +00:00
Juergen Hoeller 1cc845af6d got rid of Commons Collections dependency 2008-12-18 19:14:49 +00:00
Juergen Hoeller bbe4da4f19 removed dependency on Servlet API mocks 2008-12-18 19:13:35 +00:00
Juergen Hoeller f0dbfeb791 removed dependency on Servlet API mocks 2008-12-18 18:58:26 +00:00
Chris Beams ac8f37439b removing svn:externals usage approach to common test artifacts 2008-12-18 18:44:45 +00:00
Chris Beams 685f2fbc1c + updated petclinic dependency metadata from junit 4.4->4.5; servlet 2.4->2.5
+ deprecated AssertThrows (slated for complete removal by 3.0 GA)
2008-12-18 18:32:05 +00:00
Chris Beams 986bb1995d Whitespace polishing: leading spaces->tabs; updated eclipse configuration to default to leading tabs for all bundles 2008-12-18 14:52:45 +00:00
Chris Beams 579280d7bf Whitespace polishing: leading spaces->tabs; updated eclipse configuration to default to leading tabs for all bundles 2008-12-18 14:50:25 +00:00
Chris Beams 0f521c3bfb consolidated svn:externals definitions into single, project-root location 2008-12-18 00:07:30 +00:00
Chris Beams 75738f345d updated .aop externals to pull in common.beans.core 2008-12-17 23:55:40 +00:00
Chris Beams de7ec2288e removed unused SideEffectBean imlpmentations 2008-12-17 23:52:20 +00:00
Chris Beams 08eeb52e57 introducing common.beans.* packaging and externals; experimenting with sharing SideEffectBean 2008-12-17 23:36:40 +00:00
Chris Beams 2be8114c63 cleaning up .testsuite 2008-12-17 23:20:57 +00:00
Chris Beams 92b1b73f32 moving unit tests from .testsuite -> .transaction 2008-12-17 20:16:27 +00:00
Chris Beams c5f8b4f7c6 moving unit tests from .testsuite -> .transaction 2008-12-17 20:10:34 +00:00
Chris Beams cac2c52e60 moving unit tests from .testsuite -> .transaction
fixed externals issue with .portlet that caused build failure
2008-12-17 19:46:35 +00:00
Chris Beams efcc9b6448 removing empty dirs from .testsuite 2008-12-17 18:47:48 +00:00
Chris Beams 93e30a4fc5 moving unit tests from .testsuite -> .core, .beans, .web, .web.portlet, .web.servlet 2008-12-17 18:45:41 +00:00
Chris Beams 285be534df removing empty dirs from .testsuite 2008-12-17 16:30:56 +00:00
Chris Beams 750bcf36a6 moving unit tests from .testsuite -> .test, .web.servlet 2008-12-17 16:28:56 +00:00
Chris Beams 78e1ebe1a8 adding properties file to simplify ant use in Bamboo CI build 2008-12-17 15:47:14 +00:00
Chris Beams 68444367b7 moving .test.* unit tests from .testsuite -> .test 2008-12-17 07:32:58 +00:00
Chris Beams 3e8c013df3 moving .scripting.* unit tests from .testsuite -> .context 2008-12-17 06:48:52 +00:00
Chris Beams 31f5961dce moving remoting.*, scheduling.* unit tests from .testsuite -> .context, .web 2008-12-17 06:13:28 +00:00
Chris Beams f5b1cae78c removing empty .orm packages from .testsuite 2008-12-17 05:46:13 +00:00
Chris Beams f4d8b69126 moving unit tests from .testsuite -> .orm 2008-12-17 05:33:45 +00:00
Chris Beams 10be5f08a5 moving .jndi, .mail and .mock.web unit tests from .testsuite to .context, .context.support, and .test bundles respectively 2008-12-17 02:20:01 +00:00
Chris Beams b326565ce5 removing empty jmx dirs from .testsuite; ignoring jmx.log output from .context bundle 2008-12-17 00:42:33 +00:00
Chris Beams 72854849d9 moving jmx.* unit tests from .testsuite -> .context 2008-12-17 00:39:28 +00:00
Chris Beams b4b8303375 removing empty .jms dirs from .testsuite 2008-12-17 00:20:21 +00:00
Chris Beams 5e0c5a42ad moving unit tests from .testsuite -> .jms 2008-12-17 00:19:07 +00:00
Chris Beams 15860b1607 removing empty .jdbc dirs from .testsuite 2008-12-16 23:31:35 +00:00
Chris Beams ed27e04a0d moving unit tests from .testsuite -> .jdbc 2008-12-16 23:29:28 +00:00
Chris Beams f2e9abf699 moved jca.* unit tests from .testsuite -> .transaction 2008-12-16 22:55:07 +00:00
Chris Beams 6285e61435 refactored jca.cci tests, prepped for move to .context 2008-12-16 22:28:09 +00:00
Chris Beams f11bc4712c moving instrument.classloading.* unit tests from .testsuite -> .context 2008-12-16 20:07:32 +00:00
Chris Beams 9ed180a80d prepping .intstrument.classloading unit tests for move from .testsuite -> .context 2008-12-16 20:01:48 +00:00
Chris Beams 2952609672 finished moving .ejb.* unit tests from .testsuite -> .context 2008-12-16 19:19:41 +00:00
Chris Beams 0b0c8f1506 moving .ejb.access unit tests from .testsuite -> .context 2008-12-16 18:28:19 +00:00
Chris Beams d3a46efeb2 moving unit tests from .testsuite -> .core 2008-12-16 17:04:43 +00:00
Chris Beams d72897b6fa moving unit tests from .testsuite -> .context 2008-12-16 05:35:23 +00:00
Chris Beams 74ef4cb0f3 moving unit tests from .testsuite -> .beans 2008-12-16 01:46:25 +00:00
Chris Beams 4526501559 moving unit tests from .testsuite -> .beans and .context 2008-12-16 01:08:43 +00:00
Chris Beams 4a149d00f6 adding resources to portlet/context/WEB-INF 2008-12-15 22:52:02 +00:00
Chris Beams 489427c3be moving unit tests from .testsuite -> .web.servlet 2008-12-15 22:49:08 +00:00
Chris Beams b8a8ceae91 moving unit tests from .testsuite -> .context
moved ContextSingletonBeanFactoryLocatorTests -> .context
pulled SingletonBeanFactoryLocatorTests and friends into .context via externals for use by the above
2008-12-15 18:49:11 +00:00
Chris Beams f7813b48e1 moving unit tests from .testsuite -> .beans
moving and prepping to move SingletonBeanFactoryLocatorTests and ContextSingletonBeanFactoryLocatorTests to their respective .beans and .context packages
2008-12-15 18:37:33 +00:00
Chris Beams a4c23509e3 moving unit tests from .testsuite -> .beans
refactoring/prepping several classes for upcoming move to .beans
2008-12-15 18:18:50 +00:00
Chris Beams 97e400efd6 moving unit tests from .testsuite -> .beans
RequiredAnnotationBeanPostProcessor tests
2008-12-15 17:48:31 +00:00
Chris Beams ef414420c8 moving unit tests from .testsuite -> .beans
fixed broken unit tests getting ClassNotFoundExceptions
2008-12-15 17:13:48 +00:00
Chris Beams 2ec861351c moving unit tests from .testsuite -> .beans 2008-12-15 09:25:01 +00:00
Chris Beams 52ac3cea8c moving unit tests from .testsuite -> .beans 2008-12-15 08:41:35 +00:00
Chris Beams 248a7de73f moving unit tests from .testsuite -> .beans 2008-12-15 05:20:25 +00:00
Chris Beams b44d647dad moving unit tests from .testsuite -> .beans 2008-12-15 04:10:27 +00:00
Chris Beams afa4231751 moving unit tests from .testsuite -> .beans
added <?> wildcard to Scope methods that accept ObjectFactory
2008-12-15 03:39:13 +00:00
Chris Beams 6cb71bbb71 moving unit tests from .testsuite -> .beans 2008-12-15 02:27:35 +00:00
Chris Beams 8977ad4032 moving unit tests from .testsuite -> .core 2008-12-15 01:14:57 +00:00
Chris Beams 2359942dd7 moving unit tests from .testsuite -> .context 2008-12-14 21:46:55 +00:00
Chris Beams 931728ba2f reverting CauchoRemotingTests back to 'localhosta' host name 2008-12-14 20:43:40 +00:00
Chris Beams 8b2cf634a3 moving unit tests from .testsuite -> .context 2008-12-14 20:13:56 +00:00
Chris Beams 87de85ef19 moving unit tests from .testsuite -> .context 2008-12-14 19:47:56 +00:00
Chris Beams 69d80518f3 moving unit tests from .testsuite -> .context 2008-12-14 18:40:53 +00:00
Chris Beams 95950d28de moving unit tests from .testsuite -> .context.support 2008-12-14 18:01:20 +00:00
Chris Beams 0a47beb647 moving unit tests from .testsuite -> .context.support 2008-12-14 17:35:21 +00:00
Chris Beams 7432202b6a moving unit tests from .testsuite -> .context 2008-12-14 17:03:18 +00:00
Chris Beams b4e61dd9df moving unit tests from .testsuite -> .context 2008-12-14 08:00:16 +00:00
Chris Beams 0572d9d1a4 pulling in example.scannable as external from .context -> .testsuite
eliminated duplicate artifacts in .context.annotation
2008-12-14 07:06:43 +00:00
Chris Beams 5e5d8b0196 moving example.scannable from .testsuite -> .context 2008-12-14 06:46:37 +00:00
Chris Beams e944e2fcc5 moving unit tests from .testsuite -> .context
+ created example.scannable package to house scannable components away from .context.annotation package
+ example.scannable will also lend itself to sharing via externals
2008-12-14 06:32:25 +00:00
Chris Beams 57eaf42424 moving unit tests from .testsuite -> .context 2008-12-14 03:59:10 +00:00
Chris Beams 72b306fe0a moved commonsPoolTests.xml back from .aop -> .testsuite 2008-12-14 03:41:39 +00:00
Chris Beams 64aa2620bc added missing base classes, eliminated unused *Bean classes 2008-12-14 02:50:58 +00:00
Chris Beams 83870f3fca fixed broken path to xml in CommonsPoolTargetSourceTests
eliminated duplicate tests existing in both .beans and .testsuite
2008-12-13 22:07:22 +00:00
Chris Beams 7f5e60e76a moving unit tests from .testsuite -> .aop 2008-12-13 01:46:56 +00:00
Andy Clement 84a4fe6d39 remove files 2008-12-13 01:38:21 +00:00
Andy Clement 6d03f881e9 new files 2008-12-13 01:36:48 +00:00
Chris Beams 32bea88eb7 moving unit tests from .testsuite -> .aop 2008-12-13 01:27:27 +00:00
Chris Beams e3ec177aab moving unit tests from .testsuite -> .aop 2008-12-13 01:07:30 +00:00
Chris Beams 40016fc902 moving unit tests from .testsuite -> .aop 2008-12-13 00:35:22 +00:00
Chris Beams be3ecf5fe7 moving unit tests from .testsuite -> .aop 2008-12-13 00:11:12 +00:00
Andy Clement 5ff4008423 Refactored package structure and made some getValue() methods generic 2008-12-12 23:07:08 +00:00
Chris Beams 4c88488c5a moving unit tests from .testsuite -> .aop
@Ignore'd a portion of PersistenceXmlParsingTests#testExampleComplex: it is failing, but only under clover coverage runs
2008-12-12 20:09:17 +00:00
Chris Beams 04d3f984b1 polish: leading spaces -> tabs across .aop and .testsuite bundles 2008-12-12 19:39:14 +00:00
Chris Beams b7cc5d2402 Java 5 code style 2008-12-12 19:03:33 +00:00
Chris Beams 5cb1b1d17c moving unit tests from .testsuite -> .aop 2008-12-12 18:57:46 +00:00
Chris Beams 56908e32cd polish 2008-12-12 18:22:29 +00:00
Chris Beams 3c0015c1ec moving unit tests from .testsuite -> .aop 2008-12-12 18:08:15 +00:00
Chris Beams c563f97b90 moving unit tests from .testsuite -> .aop 2008-12-12 17:30:02 +00:00
Chris Beams 1546c15187 moving unit tests from .testsuite -> .aop 2008-12-12 17:17:32 +00:00
Chris Beams 003866835e fixed breaking test that was pointing to wrong PerThisAspect 2008-12-12 04:34:47 +00:00
Chris Beams f4a7700216 moving unit tests from .testsuite -> .aop 2008-12-12 03:36:10 +00:00
Chris Beams c69bbfe058 moving unit tests from .testsuite -> .aop 2008-12-12 01:32:27 +00:00
Chris Beams 1dade36c5d added svn:externals dependency on example.aspects from org.springframework.aop 2008-12-12 01:08:48 +00:00
Chris Beams 2b7bc1ea58 moving unit tests from .testsuite -> .aop 2008-12-12 01:02:05 +00:00
Chris Beams bd33eb7715 moving unit tests from .testsuite -> .aop 2008-12-12 00:57:14 +00:00
Chris Beams 1de06a619c moving unit tests from .testsuite -> .aop 2008-12-11 23:48:24 +00:00
Chris Beams 7bba0b7a69 moving unit tests from .testsuite -> .aop 2008-12-11 23:35:15 +00:00
Chris Beams c373688c00 moving unit tests from .testsuite -> .aop 2008-12-11 23:28:31 +00:00
Chris Beams e8cacade02 moving unit tests from .testsuite -> .aop 2008-12-11 23:24:12 +00:00
Chris Beams 78f8494bec moving unit tests from .testsuite -> .aop 2008-12-11 23:17:06 +00:00
Chris Beams 2ae8ce6fe8 upgraded integration test to JUnit 4 2008-12-11 22:41:00 +00:00
Chris Beams 08f1be7f85 moving unit tests from .testsuite -> .aop 2008-12-11 22:37:31 +00:00
Chris Beams 4b2a5a2383 moving unit tests from .testsuite -> .aop 2008-12-11 22:33:33 +00:00
Chris Beams 0ae3bbb0fc moving unit tests from .testsuite -> .aop 2008-12-11 22:18:50 +00:00
Chris Beams 57b5bdea20 moving unit tests from .testsuite -> .aop 2008-12-11 22:08:06 +00:00
Chris Beams 3412f9b6f9 moving unit tests from .testsuite -> .aop 2008-12-11 21:55:53 +00:00
Chris Beams 3ca36b39e0 added an eclipse team project set, added several files to svn:ignore for .testsuite 2008-12-11 01:05:29 +00:00
Chris Beams 0e3124179b added dependency on org.eclipse.persistence 1.0.1 2008-12-10 23:48:42 +00:00
Chris Beams f389a9a7b2 added org.springframework.testsuite back into the top-level build 2008-12-09 03:13:21 +00:00
Chris Beams 1e628e6af1 fixed additional breaking tests in .testsuite
+ both .testuite and .context.support require .jasper files to test against; pulling these files into .testsuite as an svn:external from .context.support to keep it DRY
2008-12-09 01:57:13 +00:00
Chris Beams 4093a53e6a fixed or @Ignore'd broken tests 2008-12-08 21:43:29 +00:00
Chris Beams 5c1b4347e7 further updates to .classpath / ivy files for javax.el
+ made everything consistent with the .iml files
2008-12-07 02:22:45 +00:00
Chris Beams b87ab27140 fixed broken tests
+ added dependency on antlr 2.7.6, eliminating ClassNotFoundExceptions
2008-12-07 02:03:17 +00:00
Chris Beams c04c06f27e fixed broken tests
+ ACATest was changed to ACATester during the move to Spring Build, but test-servlet.xml was not updated to reflect.  This was resulting in NoSuchBeanDefinitionExceptions.
2008-12-07 01:10:58 +00:00
Chris Beams f7dcf26193 fixed incorrect version for javax.el in .classpath files (was 2.1.0, now set to 1.0.0) 2008-12-07 01:08:37 +00:00
Juergen Hoeller b449f9fe10 added build module for changelog access 2008-12-05 07:46:51 +00:00
Juergen Hoeller df029b7f19 completed changelog 2008-12-05 07:45:18 +00:00
Juergen Hoeller c4401c4058 updated changelog 2008-12-05 07:25:33 +00:00
Juergen Hoeller 0ed916495c added @RequestHeader support 2008-12-05 07:17:31 +00:00
Juergen Hoeller b3866a974a fixed header value type 2008-12-05 07:07:06 +00:00
Juergen Hoeller 70b9dd6108 closed Java 5 code style gaps 2008-12-05 07:04:19 +00:00
Christian Dupuis 62a7457599 updated .classpath files to reflect recent changes in ivy files; aspectj.weaver 1.6.2 -> 1.6.2.RELEASE 2008-11-29 04:46:36 +00:00
Juergen Hoeller 71df72d634 properly scan subpackages as well (SPR-5324) 2008-11-28 14:05:15 +00:00
Juergen Hoeller 4f40a6c313 fixed javadoc errors 2008-11-28 13:56:30 +00:00
Juergen Hoeller f8c690c542 Java 5 code style 2008-11-28 11:39:36 +00:00
Juergen Hoeller fda7100866 consistent compilation against Servlet 2.5, JSP 2.1 and JUnit 4.5 2008-11-27 21:49:10 +00:00
Juergen Hoeller c8e23290ca consistent use of model name Strings 2008-11-27 21:24:42 +00:00
Juergen Hoeller e3cc9237c4 updated mocks to Servlet 2.5 and JSP 2.1 API level 2008-11-27 21:23:23 +00:00
Juergen Hoeller 85661c6882 Java 5 code style 2008-11-27 17:35:44 +00:00
Juergen Hoeller b0790bf5e7 Java 5 code style 2008-11-27 00:27:52 +00:00
Juergen Hoeller 6bbc966a21 fixed test source configuration 2008-11-27 00:26:21 +00:00
Juergen Hoeller c38bc4aa7b updated to AspectJ 1.6.2 2008-11-27 00:25:38 +00:00
Juergen Hoeller a449472e06 2008-11-27 00:22:10 +00:00
Juergen Hoeller f744808b49 removed JOTM and XAPool support 2008-11-27 00:21:29 +00:00
Costin Leau cf1f6606f4 + marked expression package as optional for spring-context 2008-11-26 10:26:46 +00:00
Costin Leau 8ba93ae12c + fix import for org.antlr package versions 2008-11-26 09:56:50 +00:00
Costin Leau dca286d065 + migrated some manifest template changed from 2.5.x to 3.0.x 2008-11-25 22:20:53 +00:00
Ben Hale 20bdc3c2d5 Polishing 2008-11-25 14:56:07 +00:00
Ben Hale 1a2135ec17 Publication is now automatic 2008-11-25 14:11:54 +00:00
Juergen Hoeller 29657105da Java 5 code style 2008-11-25 01:29:54 +00:00
Chris Beams 1f9e63af49 + Added necessary JPA dependencies to make Petclinic JUnit tests pass
+ Removed unused imports for @RequestParam
Note: While unit tests pass in eclipse, NoClassDefFound errors are still being thrown when tests are run from the command line.
2008-11-24 22:16:21 +00:00
Scott Andrews 96ba0d8ed6 added missing compile time deps to eclipse .classpath 2008-11-24 19:58:04 +00:00
Ben Hale b70fe3f0a1 Remove the -with-dependencies build 2008-11-24 10:57:32 +00:00
Scott Andrews 14d4630570 eclipse classpath updates 2008-11-21 15:42:47 +00:00
Scott Andrews 05815d6840 applying spring:url best practices 2008-11-21 14:51:57 +00:00
Scott Andrews eb89752f2b adding eclipse/wtp project settings 2008-11-21 14:51:16 +00:00
Juergen Hoeller 597e92a1a6 Java 5 code style 2008-11-21 00:04:10 +00:00
Juergen Hoeller 9e419dacfc added script resources 2008-11-20 23:54:00 +00:00
Arjen Poutsma f56ee389e7 Petclinic is RESTful. 2008-11-20 23:43:59 +00:00
Arjen Poutsma 1929f67f02 Petclinic is RESTful. 2008-11-20 23:42:20 +00:00
Juergen Hoeller e9649b3a34 added JUnit 4.5 compatibility note 2008-11-20 22:28:00 +00:00
Juergen Hoeller 582c564fa3 removed deprecated methods 2008-11-20 22:19:24 +00:00
Juergen Hoeller 3d1a709a5e fixed buildExceptionMessage to avoid potential NPE (SPR-5275) 2008-11-20 22:18:21 +00:00
Juergen Hoeller 0038aaa697 ContextLoaderListener extends ContextLoader 2008-11-20 22:12:56 +00:00
Arjen Poutsma 693ae0c2b0 Removing my own name from the pets database. 2008-11-20 22:02:48 +00:00
Juergen Hoeller ae34a8cb1b basic JUnit 4.5 compatibility (accepting use of deprecated SPI) 2008-11-20 21:33:08 +00:00
Juergen Hoeller 22d3272117 updated for JRuby 1.1 2008-11-20 19:47:57 +00:00
Juergen Hoeller 51577b2a07 actually delegate from resolveContextualObject to resolveReference 2008-11-20 19:46:28 +00:00
Juergen Hoeller 05bebb0c05 completed value annotation support; Java 5 code style updates 2008-11-20 17:33:46 +00:00
Arjen Poutsma 998511a375 Petclinic seems to work 2008-11-20 16:28:38 +00:00
Arjen Poutsma 29c8f37ccc Petclinic seems to work 2008-11-20 15:08:30 +00:00
Arjen Poutsma a51268a31c Added petclinic db 2008-11-20 15:05:37 +00:00
Arjen Poutsma 9d3cb3a47e Added petclinic sample 2008-11-20 13:50:01 +00:00
Juergen Hoeller 68dfd9efe8 fixed javax.el version range (following 2.5.6.A) 2008-11-20 12:52:24 +00:00
Juergen Hoeller 97b1fd0fc4 fixed javax.el version range (following 2.5.6.A) 2008-11-20 12:36:59 +00:00
Juergen Hoeller 347f34c68a EL container integration; support for contextual objects; removal of deprecated Spring 2.0 functionality; Java 5 code style 2008-11-20 02:10:53 +00:00
Ben Hale 369821dd66 spring-build update 2008-11-19 17:19:15 +00:00
Arjen Poutsma efb0ab79f9 SPR-5251: URI Templates support relative @RequestMappings (on class level, with more specific mapping on method level) 2008-11-19 17:12:44 +00:00
Arjen Poutsma 27ed13f44d SPR-5251: URI Templates support relative @RequestMappings (on class level, with more specific mapping on method level) 2008-11-19 17:08:34 +00:00
Arjen Poutsma 2b2805058b Javadoc 2008-11-19 15:44:21 +00:00
Arjen Poutsma cc5d3ec389 Increased timings of performance test, because the 100 ms does not work on our CI server. 2008-11-19 15:42:16 +00:00
Ben Hale 6379c69c38 Forgot a file 2008-11-19 15:19:40 +00:00
Ben Hale 4271f6d9e1 Upgrade to spring-build. Added dm Server library file 2008-11-19 15:13:53 +00:00
Arjen Poutsma 4e65f48f72 Added test and testsuite intellij projects. 2008-11-19 14:41:38 +00:00
Arjen Poutsma bb5150361b SPR-5251: URI Templates support infix variables: A-{B}-C 2008-11-19 11:48:13 +00:00
Arjen Poutsma 90ef7649c2 SPR-5251: URI Templates support /**-style paths 2008-11-18 15:12:28 +00:00
Arjen Poutsma b33db73c93 SPR-5251: URI Templates for @InitBinder 2008-11-18 12:37:12 +00:00
Arjen Poutsma fe72e8a5f7 SPR-5251: URI Templates in @RequestMapping 2008-11-17 16:00:03 +00:00
Scott Andrews a1faaad9fa SPR-5299 TLDs must be located under META-INF
Moving spring.tld and spring-form.tld under /src/main/resources/META-INF so they can be automatically discovered by the servlet container.
2008-11-17 15:10:26 +00:00
Arjen Poutsma fe29a711f3 Updated projects and ivy.xmls 2008-11-17 15:09:17 +00:00
Arjen Poutsma b313de0d1e Added test for ServletAnnotationMappingUtils 2008-11-17 13:39:10 +00:00
Scott Andrews 7d1f2bd1da SPR-5267 Support for PUT and DELETE in spring:form tag
Any HTTP method passed to the spring-form:form tag other then GET or POST will automatically be defaulted to POST on the form tag and a hidden input field is created with the requested HTTP method.  By default, the hidden field is named '_method', the name can be overridden using the methodParam attribute on the spring-form:form tag.
2008-11-16 22:03:16 +00:00
Scott Andrews 912c1234cd SPR-5298 JSP tag for building URLs with URI templates
Created spring:url and spring:param tags that enhance the functionality of the JSTL c:url tag.  URI templates are supported in the url value attribute.  They are resolved against the params defined inside the url tag body.  Params that are unable to be applied as URI template are added to the query string.
2008-11-16 21:04:46 +00:00
Scott Andrews ecb86b46a4 syncing eclipse classpath settings 2008-11-14 01:51:48 +00:00
Arjen Poutsma 24e34c894b Fixed test 2008-11-08 10:24:07 +00:00
Arjen Poutsma c62d4cb438 Generified StringUtils, and replaced StringBuffer usage with StringBuilder 2008-11-08 10:06:48 +00:00
Arjen Poutsma ba42594112 SPR-4927: Return 405 instead of 404 when HTTP method is not supported 2008-11-08 09:37:55 +00:00
Arjen Poutsma f7a45460cc SPR-5267: Support for PUT and DELETE in spring:form tag 2008-11-08 09:31:51 +00:00
Thomas Risberg e9877fa93a SPR-5272: added sort to the categories that didn't have it 2008-11-07 20:21:08 +00:00
Arjen Poutsma 477543241f SPR-5066 2008-11-07 10:22:43 +00:00
Arjen Poutsma aeced8b1a9 Made ThreadLocals generic. 2008-11-06 12:43:00 +00:00
Arjen Poutsma 0012c1e2da SPR-5237: Default value for @RequestParam 2008-11-04 14:39:53 +00:00
Scott Andrews a647f1629d syncing eclipse settings for unit tests 2008-11-03 18:41:02 +00:00
Arjen Poutsma 0bcc8fcead Moved tests from testsuite to web.servlet 2008-11-03 12:25:46 +00:00
Arjen Poutsma 91576da3b0 2008-11-03 12:03:40 +00:00
Arjen Poutsma 3d06246195 Moved tests from testsuite to web.servlet 2008-11-03 12:03:31 +00:00
Arjen Poutsma 74733d0d1d Moved tests from testsuite to web.servlet 2008-11-03 11:51:55 +00:00
Arjen Poutsma e31ab5a09b 2008-11-03 11:51:50 +00:00
Arjen Poutsma 12f295b6f5 Moved tests from testsuite to web.servlet 2008-11-03 11:47:12 +00:00
Arjen Poutsma 4ed458d909 Moved tests from testsuite to web.servlet 2008-11-03 11:45:48 +00:00
Arjen Poutsma 427f0d64b9 Moved tests from testsuite to web.servlet 2008-11-03 11:44:37 +00:00
Arjen Poutsma 764a2441cc Moved tests from testsuite to web.servlet 2008-11-03 11:34:38 +00:00
Arjen Poutsma b08d97e2ed Moved tests from testsuite to web.servlet 2008-11-03 11:29:38 +00:00
Arjen Poutsma 85d82f2244 Moved tests from testsuite to web.servlet 2008-11-03 11:27:39 +00:00
Arjen Poutsma 327c54839b 2008-11-03 11:27:18 +00:00
Arjen Poutsma f0e0d9b494 Moved tests from testsuite to web 2008-11-03 11:14:16 +00:00
Arjen Poutsma e7f5ebf992 2008-11-03 11:14:10 +00:00
Arjen Poutsma cc057d76eb 2008-11-03 11:09:23 +00:00
Arjen Poutsma a0adee719f Moved tests from testsuite to web 2008-11-03 11:09:18 +00:00
Arjen Poutsma 827f5687e8 2008-11-03 10:53:41 +00:00
Arjen Poutsma 24b7165031 Moved tests from testsuite to web.servlet 2008-11-03 10:53:34 +00:00
Arjen Poutsma 8a4a00bd87 Moved tests from testsuite to web 2008-11-03 10:50:10 +00:00
Arjen Poutsma 6c48de5ad5 Moved tests from testsuite to web.servlet 2008-11-03 10:49:21 +00:00
Arjen Poutsma 25dab06804 Moved tests from testsuite to web 2008-11-03 10:42:27 +00:00
Arjen Poutsma 88efc06a23 Moved tests from testsuite to core 2008-11-03 10:34:10 +00:00
Arjen Poutsma 7ecdf96db5 Added Tiger tests 2008-11-03 09:56:23 +00:00
Arjen Poutsma 0a89948f53 Added Tiger tests 2008-11-03 09:46:34 +00:00
Arjen Poutsma baac76e2b1 SPR-5249: Atom and RSS View 2008-10-31 17:48:50 +00:00
Arjen Poutsma c920c938a1 made test suit compile again 2008-10-31 17:44:13 +00:00
Arjen Poutsma 89095e625c Intellij projects 2008-10-31 17:43:22 +00:00
Arjen Poutsma 6f0342388c Moved tests over from testsuite to beans 2008-10-31 17:30:55 +00:00
Arjen Poutsma 97e1cdd5fc Moved tests from testsuite to jdbc 2008-10-31 10:02:48 +00:00
Arjen Poutsma d66956b117 Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 10:00:38 +00:00
Arjen Poutsma 113366fc0c Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 09:57:49 +00:00
Arjen Poutsma 2fd2a0d4d2 Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 09:56:27 +00:00
Ben Hale c15b580a31 Update of spring-build 2008-10-31 09:51:37 +00:00
Arjen Poutsma 39d5e191a6 Moved tests from testsuite to tx 2008-10-31 09:50:03 +00:00
Arjen Poutsma 753c7351f5 Moved tests from testsuite to context 2008-10-31 09:47:46 +00:00
Arjen Poutsma 23a7015cbd Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 09:46:08 +00:00
Ben Hale f1bd19f2f3 Added max memory for javadoc vm 2008-10-31 09:39:17 +00:00
Arjen Poutsma 92b0f55028 Moved tests from testsuite to core 2008-10-31 09:35:45 +00:00
Arjen Poutsma 0392b80ad3 Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 09:34:55 +00:00
Arjen Poutsma e1536fcabb Moved tests from testsuite to core 2008-10-31 09:11:09 +00:00
Arjen Poutsma 87a2905c6e Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 09:09:05 +00:00
Arjen Poutsma b100e21175 Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 09:05:50 +00:00
Arjen Poutsma 2cf6dc4480 Changed use of AssertThrows to @Test(expected = ...) 2008-10-31 08:57:10 +00:00
Ben Hale 19debfb080 Fixed up version 2008-10-31 08:37:11 +00:00
Arjen Poutsma 616739a2bc Added test deps 2008-10-30 23:37:52 +00:00
Scott Andrews 7e19514658 eclipse settings to support unit test 2008-10-30 22:44:02 +00:00
Arjen Poutsma e48323aa56 Moved tests from testsuite to context 2008-10-30 22:19:18 +00:00
Arjen Poutsma 9ab100ae2e Moved tests from testsuite to context 2008-10-30 22:12:41 +00:00
Arjen Poutsma 4c7245d5de Moved tests from testsuite to context support 2008-10-30 22:10:08 +00:00
Arjen Poutsma a058729c2a Moved tests from testsuite to context 2008-10-30 21:57:15 +00:00
Arjen Poutsma 5bb0e15ce9 Moved tests from testsuite to context 2008-10-30 21:56:08 +00:00
Arjen Poutsma cd17ea06af Moved tests from testsuite to context 2008-10-30 21:55:44 +00:00
Arjen Poutsma 4ad4aad271 Moved tests from testsuite to context.support 2008-10-30 21:49:52 +00:00
Ben Hale dc2ca51f4e Reorder the publishing 2008-10-30 19:36:10 +00:00
Scott Andrews 8ff43f17a9 eclipse settings to support unit test 2008-10-30 19:27:01 +00:00
Arjen Poutsma 6c4941bbc5 Moved tests from testsuite to jdbc 2008-10-30 17:35:13 +00:00
Arjen Poutsma a02ee196b5 Moved tests from testsuite to jdbc 2008-10-30 17:24:23 +00:00
Arjen Poutsma faa74a395e Added test-time dep on commons collections 2008-10-30 17:17:32 +00:00
Arjen Poutsma b090bb9bda Moved tests from testsuite to jdbc 2008-10-30 17:17:12 +00:00
Arjen Poutsma 7a58c0e76f Moved tests from testsuite to orm 2008-10-30 16:55:52 +00:00
Arjen Poutsma fdd12e9a2f Moved tests from testsuite to orm 2008-10-30 16:55:08 +00:00
Arjen Poutsma 5aae231707 Removed raw TopLink support 2008-10-30 16:52:47 +00:00
Arjen Poutsma 59d3ebebc1 Removed raw TopLink support 2008-10-30 16:51:33 +00:00
Arjen Poutsma 11a2e40d41 Removed raw TopLink support 2008-10-30 16:51:09 +00:00
Arjen Poutsma 434c744842 Moved tests from testsuite to orm 2008-10-30 16:48:56 +00:00
Arjen Poutsma 3620181a10 Moved tests from testsuite to orm 2008-10-30 16:46:52 +00:00
Arjen Poutsma b7584189f5 Moved tests from testsuite to orm 2008-10-30 16:42:34 +00:00
Ben Hale ff92c1942b Missed namespace declaration 2008-10-30 16:34:21 +00:00
Ben Hale 68db46605e Publishing changes 2008-10-30 16:31:54 +00:00
Arjen Poutsma 100a80e112 Moved tests from testsuite to context and context support 2008-10-30 16:24:14 +00:00
Arjen Poutsma a1545e3f06 SPR-4419: Shallow ETag support 2008-10-30 15:29:19 +00:00
Arjen Poutsma 4f9fc753ca Added MD5 hashing utils. 2008-10-30 15:07:49 +00:00
Arjen Poutsma 988c66c1c3 Added MD5 hashing utils. 2008-10-30 15:07:00 +00:00
Arjen Poutsma 2a4f985753 IntelliJ projects 2008-10-29 18:29:36 +00:00
Scott Andrews a01aea4189 eclipse settings to support unit test 2008-10-29 18:22:25 +00:00
Arjen Poutsma eae7267929 Moved tests from testsuite to beans 2008-10-29 18:20:29 +00:00
Arjen Poutsma e31ad80a0b Moved tests from testsuite to beans 2008-10-29 18:14:22 +00:00
Arjen Poutsma e788cef856 Moved tests from testsuite to beans 2008-10-29 18:08:07 +00:00
Arjen Poutsma dcaf024e76 Moved tests from testsuite to beans 2008-10-29 18:03:15 +00:00
Arjen Poutsma 7f90f08705 Moved tests from testsuite to beans 2008-10-29 17:59:31 +00:00
Arjen Poutsma a1b810fbdf Moved tests from testsuite to beans 2008-10-29 17:55:46 +00:00
Arjen Poutsma 49447e9bc9 Moved tests over from testsuite to beans 2008-10-29 17:51:42 +00:00
Arjen Poutsma 4efc95c825 Moved tests over from testsuite to beans 2008-10-29 17:45:51 +00:00
Arjen Poutsma 25031ce86b Moved tests to context.support 2008-10-29 17:40:43 +00:00
Arjen Poutsma bd1e259b4a Moved tests over from testsuite to beans 2008-10-29 17:32:01 +00:00
Arjen Poutsma 6b80dbb4a9 Moved tests over from testsuite to core 2008-10-29 17:10:09 +00:00
Arjen Poutsma 6849cbd5ba Moved tests over from testsuite to core 2008-10-29 17:08:09 +00:00
Arjen Poutsma 474e70db87 Moved tests over from testsuite to context.support 2008-10-29 16:41:03 +00:00
Scott Andrews f91ac5a519 eclipse settings to support unit test 2008-10-29 15:00:00 +00:00
Arjen Poutsma 58dbd04cec Moved tests over from testsuite to test 2008-10-29 13:58:15 +00:00
Arjen Poutsma 10f09e6298 Moved tests over from testsuite to core 2008-10-29 13:52:06 +00:00
Arjen Poutsma 8a5971c85d Moved tests over from testsuite to core 2008-10-29 13:16:12 +00:00
Arjen Poutsma 75e8a09462 Moved tests over from testsuite to core 2008-10-29 12:58:14 +00:00
Arjen Poutsma 9151b9caae Moved tests over from testsuite to core 2008-10-29 12:56:06 +00:00
Arjen Poutsma 77be96aed6 Moved tests over from testsuite to beans 2008-10-29 12:49:51 +00:00
Arjen Poutsma 7a49f023d1 Moved tests over from testsuite to beans 2008-10-29 12:43:13 +00:00
Arjen Poutsma c9940742fd Removed Commons Attributes from web.servlet module 2008-10-29 12:23:19 +00:00
Arjen Poutsma f8b1e44734 Removed Commons Attributes from web.servlet module 2008-10-29 12:21:47 +00:00
Arjen Poutsma 4ddebb083e Moved tests over from testsuite to core 2008-10-29 12:17:13 +00:00
Arjen Poutsma da8b1c73ab Moved tests over from testsuite to core 2008-10-29 11:54:19 +00:00
Ben Hale e2a17f5458 Classpath updates 2008-10-29 11:32:38 +00:00
Arjen Poutsma 2ec60699ee Downgraded to JSP 2.0.0 2008-10-29 11:12:12 +00:00
Arjen Poutsma 742abde947 added target ignore 2008-10-29 10:25:31 +00:00
Arjen Poutsma 8aed1512fb Added test module 2008-10-29 01:18:26 +00:00
Arjen Poutsma 2c7d3673a8 Added testsuite, as one project for now. Will move individual tests to respective modules later 2008-10-29 01:17:37 +00:00
Arjen Poutsma 6b62bd0876 Added XSDs and namespace handler files. 2008-10-29 00:44:36 +00:00
Scott Andrews b0c9435b94 adding eclipse project settings for org.springframework.instrument.classloading 2008-10-28 14:50:18 +00:00
Arjen Poutsma f39be46cb1 Added IntelliJ project 2008-10-28 14:15:25 +00:00
Arjen Poutsma 6fe74a3e5a Added IntelliJ project 2008-10-28 14:13:25 +00:00
Arjen Poutsma bc53873707 Initial import of instrument.classloading module 2008-10-28 14:06:51 +00:00
Scott Andrews 123a40f166 adding eclipse project settings for org.springframework.jms 2008-10-28 14:02:58 +00:00
Arjen Poutsma e6b7d6222a Initial import of the JMS module 2008-10-28 13:47:36 +00:00
Arjen Poutsma dc20a9478f Upgraded to commons pooling 1.4.0 2008-10-28 13:29:20 +00:00
Scott Andrews a6984e2cdc adding eclipse settings for org.springframework.aspects 2008-10-28 13:09:57 +00:00
Arjen Poutsma 268cb4a1df Added IntelliJ projects 2008-10-28 12:28:35 +00:00
Arjen Poutsma 7d62aab6cc Initial import of the aspects module 2008-10-28 11:42:01 +00:00
Arjen Poutsma 827916b8e9 Bundlor templates now refer to Spring 3.0 2008-10-28 11:20:47 +00:00
Arjen Poutsma b0f24da5ca Added @Override annotations to web-portlet module 2008-10-28 10:55:11 +00:00
Arjen Poutsma 6a2daf7bf5 Added @Override and @Deprecated annotations to web-servlet module 2008-10-28 00:39:17 +00:00
Arjen Poutsma 3a26f0d896 Added @Override and @Deprecated annotations to context-support module 2008-10-28 00:34:38 +00:00
Arjen Poutsma 631e480f7a Added @Override and @Deprecated annotations to orm module 2008-10-28 00:18:02 +00:00
Arjen Poutsma 2ebff15fa3 Added @Override and @Deprecated annotations to web module 2008-10-28 00:15:39 +00:00
Arjen Poutsma cdb36efb0d Added @Override and @Deprecated annotations to jdbc module 2008-10-28 00:01:49 +00:00
Arjen Poutsma aa60746155 Added @Override annotations to transaction module 2008-10-27 23:52:03 +00:00
Arjen Poutsma 77ad22e338 Added @Override and @Deprecated annotations to context module 2008-10-27 23:45:57 +00:00
Arjen Poutsma b4b169c937 Removed unused import 2008-10-27 23:43:25 +00:00
Arjen Poutsma 7e39725685 Changed project from agent to instrument 2008-10-27 23:39:42 +00:00
Arjen Poutsma c0db207948 Added @Override annotations to aop module 2008-10-27 23:31:39 +00:00
Arjen Poutsma c8e5aa07a5 Added @Override annotations to beans module 2008-10-27 23:30:07 +00:00
Arjen Poutsma c07477da9c Added @Override annotations to core module 2008-10-27 23:25:04 +00:00
Arjen Poutsma 34ab7832c8 Reverted to r143, before IntelliJ screwed up the imports... 2008-10-27 23:23:13 +00:00
Scott Andrews 9178e97fb4 synchronized .classpath files with ivy.xml 2008-10-27 23:13:58 +00:00
Arjen Poutsma ac0c289149 Changed order of modules 2008-10-27 22:29:01 +00:00
Arjen Poutsma 564d4feba4 Added @Override annotations to core module 2008-10-27 22:26:10 +00:00
Arjen Poutsma d549941f5e Upgraded to Quartz 1.6.2 2008-10-27 22:07:01 +00:00
Arjen Poutsma 9770262910 Added hibernate.transform version 2008-10-27 21:54:00 +00:00
Arjen Poutsma 79a5eefe04 Added other modules to build 2008-10-27 21:44:09 +00:00
Scott Andrews 87f698cd24 fixing typos 2008-10-27 16:10:52 +00:00
Arjen Poutsma 07a5693b23 Moved portlet files to web package 2008-10-27 15:51:29 +00:00
Scott Andrews 51820d82f9 adding eclipse project settings 2008-10-27 15:48:40 +00:00
Arjen Poutsma 43505a6ce7 Upgraded ivy files to correspond to those in 2.5.5 2008-10-27 13:41:44 +00:00
Arjen Poutsma 577da8f891 Moved agent to instrument 2008-10-27 13:41:19 +00:00
Arjen Poutsma 4ea298a7b0 Initial import of portlet module 2008-10-27 12:01:57 +00:00
Arjen Poutsma 995a323a6f Initial import of test module 2008-10-27 11:59:27 +00:00
Arjen Poutsma af47a8b79b Initial import of web servlet module 2008-10-27 09:13:23 +00:00
Arjen Poutsma 4df7d71c1e Initial import of context support module 2008-10-26 17:08:38 +00:00
Ben Hale da208c282a spring-build updates 2008-10-25 18:30:33 +00:00
Scott Andrews 731c33f640 adding eclipse project meta-data, .classpath file is based on dependencies listed in ivy.xml 2008-10-24 21:05:25 +00:00
Arjen Poutsma 8e85702ff4 Changed module name, using correct bundlor template 2008-10-24 10:35:54 +00:00
Arjen Poutsma f87fc289fa Changed use of getRequestParameterMap() to getRequestParameterValuesMap() 2008-10-24 10:34:02 +00:00
Juergen Hoeller af62da8c45 updated module list 2008-10-24 10:03:04 +00:00
Arjen Poutsma d2bcdc655d Removed deprecated classes 2008-10-24 09:44:06 +00:00
Arjen Poutsma 04eaa47ec1 Initial import of web module 2008-10-24 09:42:55 +00:00
Arjen Poutsma d1061e7e9f Initial import of ORM 2008-10-24 09:06:30 +00:00
Arjen Poutsma c236f9fac7 Initial import of JDBC module 2008-10-23 14:23:13 +00:00
Arjen Poutsma 8c87d84728 Removed Commons Attributes support for Transactional 2008-10-23 14:10:34 +00:00
Arjen Poutsma 846b848fd3 Initial import of tx bundle 2008-10-23 14:09:34 +00:00
Arjen Poutsma 3b6f092219 Disabled JRuby for now, needs to be made 1.1 compliant 2008-10-23 13:48:19 +00:00
Arjen Poutsma 1b26e8f9c6 Removed commons atts support for JMX, made ModelMap generic 2008-10-23 10:35:03 +00:00
Arjen Poutsma edf0d8ebbe Initial version of context module 2008-10-23 10:19:23 +00:00
Arjen Poutsma d151c40333 Initial version of context module 2008-10-23 10:17:52 +00:00
Arjen Poutsma 20bc4f0817 Added agent module 2008-10-23 10:17:23 +00:00
Arjen Poutsma c26b9cbb75 Removed deprecated classes 2008-10-23 09:22:13 +00:00
Arjen Poutsma c48f8215e6 Moved over initial version of aop bundle 2008-10-23 09:17:09 +00:00
Arjen Poutsma 5cd2b80da7 Fixed manifest templates and pomx 2008-10-23 08:38:18 +00:00
Arjen Poutsma 4973f9387a Removed deprecated code 2008-10-23 08:36:52 +00:00
Arjen Poutsma f11d3436ed Moved over initial version of beans bundle 2008-10-22 16:13:37 +00:00
Arjen Poutsma 684a4f28c2 Added tiger classes of core bundle 2008-10-22 15:48:39 +00:00
Arjen Poutsma 4bc407fef8 - Removed deprecated code
- Removed backport-util-concurrent
- Removed commons attributes support
2008-10-22 15:37:12 +00:00
Arjen Poutsma 678e5b7cdf Moved over initial version of core bundle 2008-10-22 13:55:20 +00:00
Ben Hale 378e3a70fb Upgraded spring-build 2008-10-22 09:50:29 +00:00
Arjen Poutsma 99a441fe31 Added more modules 2008-10-21 08:04:24 +00:00
Andy Clement 470e086183 map access tests added 2008-09-17 16:20:40 +00:00
Andy Clement 769e706be7 removing: initializers/processors/in operator 2008-09-17 15:23:15 +00:00
Andy Clement afdf54eff8 renamed operator IS to INSTANCEOF, may yet delete.. 2008-09-16 17:20:03 +00:00
Andy Clement 39c966f419 bean references removed, no more @(context:beanname) 2008-09-16 17:13:31 +00:00
Andy Clement 95892dc993 removed lambda functions, local function and local variable references 2008-09-16 17:00:16 +00:00
Andy Clement efee3b3434 date literal removed 2008-09-16 16:50:00 +00:00
Andy Clement 8740b702f9 Changed so that existing getters/setters are used before direct field access is attempted 2008-09-16 00:00:06 +00:00
Andy Clement 17c88107d3 Removing functionality. Removed expression list support, cannot say (foo();bar()) any more 2008-09-15 21:55:11 +00:00
Andy Clement 4d43768889 Removing functionality. Removed soundslike/distanceto/like operators 2008-09-15 21:43:38 +00:00
Andy Clement 59a4427525 Final commit before the great 'stripdown'. Used clover to determine coverage and added tests as necessary. 2008-09-15 20:14:36 +00:00
Andy Clement 23db8b58da added test and behaviour for calling a java method with incorrect number of arguments 2008-08-18 22:43:17 +00:00
Andy Clement f79e2643a3 fixed up FunctionReference a bit - so it can call varargs methods 2008-08-18 22:36:25 +00:00
Andy Clement 2f05d70067 new function invocation tests for normal and error behaviour 2008-08-18 22:36:00 +00:00
Andy Clement 2fbb7ad327 changed vis of arg conversion code so function calls can use it 2008-08-18 22:35:21 +00:00
Andy Clement ec9cb8565b fixed damage caused by code formatter 2008-08-18 22:34:33 +00:00
Andy Clement 48055c6e20 added support for Integer > Float conversion.
Moved some tests from EvaluationTests into OperatorTests.
Fleshed out OperatorTests to verify type promotions for mixed type operands.
2008-08-18 17:54:01 +00:00
Andy Clement 776553cfbb more tests relating to reals 2008-08-18 17:06:24 +00:00
Andy Clement daf922456e more discussion points 2008-08-18 00:23:52 +00:00
Andy Clement 6e2682c78e code formatter chewed on it 2008-08-18 00:23:39 +00:00
Andy Clement 844b5236de corrected TODO 2008-08-18 00:23:13 +00:00
Andy Clement e443c836fe corrected use of AccessException (no longer used in ReflectionUtils) 2008-08-18 00:22:36 +00:00
Andy Clement 7fa4d9e928 moved TODOs to readme 2008-08-18 00:22:09 +00:00
Andy Clement 7d677b23d3 moved test into ParserErrorMessageTests 2008-08-18 00:21:45 +00:00
Andy Clement bea94c2371 modified Date tests 2008-08-18 00:21:21 +00:00
Andy Clement 90309a57d9 Made GMT the default Locale... 2008-08-18 00:21:00 +00:00
Andy Clement b9aa8552e0 added new TODO that the impl isn't as complete as it could be 2008-08-18 00:20:38 +00:00
Andy Clement bb2ef1fefa started fixing the formatting 2008-08-18 00:20:16 +00:00
Andy Clement 077fc1613d starting to sort out like/matches. Matches is the java regex related one. Like is the SQL related one. But the spring .net 'like' doesn't seem to be the same as the SQL doc I found for like... 2008-08-17 01:42:06 +00:00
Andy Clement c24df36689 moved some TODOs into readme 2008-08-17 01:28:37 +00:00
Andy Clement c6db7c41a4 improved javadoc, error handling and testing of matches 2008-08-17 01:28:26 +00:00
Andy Clement bb2ade5fdd javadoc 2008-08-17 01:27:59 +00:00
Andy Clement 29fe8da1ad fixing error handling in 'is' operator 2008-08-17 01:27:45 +00:00
Andy Clement 5c0d80ece7 fixing TODOs 2008-08-17 01:27:18 +00:00
Andy Clement 5d3e568326 fixing TODOs 2008-08-17 01:26:59 +00:00
Andy Clement 88c370ad5d fixing TODOs 2008-08-17 01:26:45 +00:00
Andy Clement 80075f18ce fixing TODOs 2008-08-17 01:26:11 +00:00
Andy Clement 9e7cb0e1cf fixing TODOs 2008-08-17 01:25:57 +00:00
Andy Clement 5a68d0ee4e fixing TODOs 2008-08-17 01:25:43 +00:00
Andy Clement a23311c4ba fixing TODOs 2008-08-17 01:25:19 +00:00
Andy Clement f82561ba53 javadoc for StandardTypeLocator and moved some TODOs to the readme 2008-08-16 18:31:31 +00:00
Andy Clement 1917a50f6f remove java.awt as a default import in the StandardTypeLocator 2008-08-16 18:21:03 +00:00
Andy Clement a54e442657 fixing TODOs 2008-08-16 01:57:46 +00:00
Andy Clement d69e9ef038 moved some TODOs out into here 2008-08-16 01:57:31 +00:00
Andy Clement b26c6df1a1 fixing TODOs 2008-08-16 01:57:13 +00:00
Andy Clement 2e7b0e3767 fixing TODOs 2008-08-16 01:56:58 +00:00
Andy Clement 3d54bd5aa3 fixing TODOs 2008-08-16 01:56:43 +00:00
Andy Clement 3ebf290534 fixing TODOs 2008-08-16 01:56:29 +00:00
Andy Clement e9ddd7151e added support for long[] in stringValueOf() - plus an error reported if the type passed in is not supported 2008-08-16 01:56:16 +00:00
Andy Clement e2ffac9a7c fixed to not throw classcastexception if condition doesnt evaluate to boolean 2008-08-16 01:45:18 +00:00
Andy Clement 144325eb06 removed some unused code, improved doc 2008-08-16 01:44:42 +00:00
Andy Clement 5bb6f9c75d correcting TODO 2008-08-16 01:44:12 +00:00
Andy Clement d2ab889b00 fixed some tests that will now break because int/long can be treated as boolean. May need to change again if real numbers get the same treatment. 2008-08-16 01:43:51 +00:00
Andy Clement 8d8a82b278 new tests for ternary - checking conversion of numbers to boolean and correct error when condition result not convertable to boolean 2008-08-16 01:43:15 +00:00
Andy Clement 8730cde270 removed redundant test - there is no non-optimal reflection accessor to test now 2008-08-16 01:42:39 +00:00
Andy Clement 3987316e4c Added SuppressWarning to hide all the warnings from the poor Antlr generated code. Code formatter also chewed on the file when saved. 2008-08-16 01:41:51 +00:00
Andy Clement 2d732ba398 javadoc 2008-08-16 01:41:13 +00:00
Andy Clement 3d4158ea51 implements new interface methods. sorting out javadoc 2008-08-16 01:40:53 +00:00
Andy Clement 98c82fe995 implement new Expression methods 2008-08-16 01:40:30 +00:00
Andy Clement ef8f882036 sorting out javadoc, promoted isWritable() to this interface (for now) 2008-08-16 01:40:11 +00:00
Andy Clement 1d2e89d79c added reset() method 2008-08-16 01:39:35 +00:00
Andy Clement 9750dfc3c4 hard coded support for boxing conversions. Added support for numbers (int/long) to boolean 2008-08-16 01:39:10 +00:00
Andy Clement ef16bff7ef TODO moved out to readme.txt which contains latest interesting issues - they should become JIRAs when the dust has settled 2008-08-16 00:13:38 +00:00
Andy Clement ead98462da added support for getValue(state,desiredType) so other nodes can ask for a transform to be done on the result if necessary, rather than duplicating conversion logic all over 2008-08-16 00:12:36 +00:00
Andy Clement a5a2331d41 corrected TODO task 2008-08-16 00:11:33 +00:00
Andy Clement 0adda58016 removed fixed TODO task 2008-08-16 00:10:59 +00:00
Andy Clement 36334ec21f allow for undefined target type 2008-08-16 00:10:27 +00:00
Andy Clement 1a31d25973 Parser error message improvements: enhanced harness and used it in new parser error message tests 2008-08-15 00:26:38 +00:00
Andy Clement cf35116af7 Parser error message improvements: better explanations and removed unused code 2008-08-15 00:26:11 +00:00
Andy Clement e78b9273f8 Code formatter has chewed on it a bit 2008-08-15 00:25:46 +00:00
Andy Clement 84990ad608 Parser error message improvements: grammar tweak to disallow 0xF00G (was treated as number then property reference - even without a dot) 2008-08-15 00:25:23 +00:00
Andy Clement 7d114a1a5e Parser error message improvements: new messages 2008-08-15 00:24:22 +00:00
Andy Clement 8c85e4a9a2 will now throw exception if trying to cram a long into an int that will not fit 2008-08-14 20:28:01 +00:00
Andy Clement d83205227e tweaked grammar to handle 0X as a hex prefix and removed 'u'/'U' from int suffixes for now 2008-08-14 20:27:35 +00:00
Andy Clement 4e33a2d6e4 tweaked grammar to handle 0X as a hex prefix and removed 'u'/'U' from int suffixes for now 2008-08-14 20:26:33 +00:00
Andy Clement 2173a49855 reworked int/hex/long handling - more consistent and reliable now 2008-08-14 20:25:20 +00:00
Andy Clement a06b5aaa8d reorganizing tests - extracting EvaluationTests out into other test classes. Started work on parser error message tests. 2008-08-14 20:24:31 +00:00
Andy Clement 73d6d0095f removed unused code 2008-08-12 22:19:46 +00:00
Andy Clement e20cbef134 Avoid calling deprecated Date ctor 2008-08-12 22:18:05 +00:00
Andy Clement dfc6928957 Suppress unchecked warning in generated code 2008-08-12 22:15:01 +00:00
Andy Clement 1707667489 changed to not use deprecated toURL() 2008-08-12 22:14:10 +00:00
Andy Clement f9285d54ab temporarily commnted out code (to remove the warnings) - this code may get used for error recovery 2008-08-12 22:13:50 +00:00
Andy Clement a9f2c90f10 remove currently unnecessary dependencies 2008-08-12 22:05:06 +00:00
Andy Clement 246cfa7945 Changed project name from spring-binding to org.springframework.expression 2008-08-12 21:50:59 +00:00
Andy Clement fe11c664d2 Changed test so expected results match actual on both windows and Mac 2008-08-12 21:21:35 +00:00
Andy Clement ef59904f00 Fixed generics warnings 2008-08-12 18:31:51 +00:00
Andy Clement 40eb38917e Fixed generics warning 2008-08-12 18:31:41 +00:00
Andy Clement c15760bcd1 Fixed generics warnings 2008-08-12 18:31:31 +00:00
Andy Clement 106131ab8f Marked unused values appropriately 2008-08-12 18:28:18 +00:00
Andy Clement b12dc5ba42 Removed unused code 2008-08-12 18:27:40 +00:00
Andy Clement c09d3971a1 Corrected javadoc 2008-08-12 18:26:54 +00:00
Andy Clement 9ad3863886 Commented out currently unused code 2008-08-12 18:25:19 +00:00
Andy Clement cfdb8e01eb Fixed unnecessary casts 2008-08-12 18:23:39 +00:00
Andy Clement 49bef5a39f Fixed unnecessary casts 2008-08-12 18:23:29 +00:00
Andy Clement 2e0006f8ac Added suppression for warnings since these types are generated 2008-08-12 18:20:45 +00:00
Andy Clement 1636f3cd32 Fixed rogue import 2008-08-12 18:17:25 +00:00
Andy Clement c2f7b65751 First drop of SPEL 2008-08-12 16:36:40 +00:00
Andy Clement 6a52183414 First drop of SPEL 2008-08-12 16:27:53 +00:00
Andy Clement 65049ac8b4 First drop of SPEL 2008-08-12 16:27:20 +00:00
Andy Clement a2401ea10f First drop of SPEL 2008-08-12 16:25:32 +00:00
Andy Clement d8743000a0 First drop of SPEL 2008-08-12 16:23:50 +00:00
Andy Clement c2624ea05e First drop of SPEL 2008-08-12 16:14:43 +00:00
Andy Clement ca93824d2b Modified public interface to expression parsing 2008-08-11 18:37:11 +00:00
Ben Hale ca010140fb Initial code checkin 2008-07-11 06:34:50 +00:00
Ben Hale 549e526ab0 Added spring-build 2008-07-10 22:01:27 +00:00
Ben Hale 8119659fb1 Initial structure 2008-07-10 22:00:24 +00:00
6452 changed files with 942803 additions and 545 deletions
-57
View File
@@ -1,57 +0,0 @@
name: Build and Deploy Documentation
run-name: ${{ format('{0} ({1})', github.workflow, github.event.inputs.build-refname || 'all') }}
on:
workflow_dispatch:
inputs:
build-refname:
description: Enter git refname to build (e.g., 5.7.x).
required: false
push:
branches: docs-build
env:
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
permissions: read-all
jobs:
build-and-deploy-docs:
name: Build and Deploy Documentation
if: github.repository_owner == 'spring-projects'
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Set Up Java
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: |
25
17
- name: Set Up Gradle
uses: gradle/actions/setup-gradle@ac638b010cf58a27ee6c972d7336334ccaf61c96 # v4.4.1
with:
cache-read-only: false
- name: Set up refname build
if: github.event.inputs.build-refname
run: |
git fetch --depth 1 https://github.com/$GITHUB_REPOSITORY ${{ github.event.inputs.build-refname }}
echo BUILD_REFNAME=${{ github.event.inputs.build-refname }} >> $GITHUB_ENV
echo BUILD_VERSION=$(git cat-file --textconv FETCH_HEAD:gradle.properties | sed -n '/^version=/ { s/^version=//;p }') >> $GITHUB_ENV
- name: Run Antora
run: ./gradlew antora
- name: Copy the cache to be included in the site
run: cp -rf build/antora/inject-collector-cache-config-extension/.cache build/site/
- name: Publish Docs
uses: spring-io/spring-doc-actions/rsync-antora-reference@v0.0.22
with:
docs-username: ${{ secrets.DOCS_USERNAME }}
docs-host: ${{ secrets.DOCS_HOST }}
docs-ssh-key: ${{ secrets.DOCS_SSH_KEY }}
docs-ssh-host-key: ${{ secrets.DOCS_SSH_HOST_KEY }}
- name: Bust Cloudflare Cache
uses: spring-io/spring-doc-actions/bust-cloudflare-antora-cache@v0.0.22
with:
context-root: spring-framework
cloudflare-zone-id: ${{ secrets.CLOUDFLARE_ZONE_ID }}
cloudflare-cache-token: ${{ secrets.CLOUDFLARE_CACHE_TOKEN }}
+10 -27
View File
@@ -1,42 +1,31 @@
# Miscellaneous
*.java.hsp
*.sonarj
*.sw*
.DS_Store
.settings
.springBeans
bin
build.sh
integration-repo
ivy-cache
argfile*
activemq-data/
classes/
# Log files
jxl.log
jmx.log
derby.log
# Gradle artifacts
spring-test/test-output/
.gradle
.gradletasknamecache
argfile*
pom.xml
activemq-data/
/build
buildSrc/build
/spring-*/build
/framework-bom/build
/framework-docs/build
/integration-tests/build
/src/asciidoc/build
spring-test/test-output/
# Maven artifacts
pom.xml
/target/
target/
# Eclipse artifacts, including WTP generated manifests
bin
.classpath
.project
.settings
.springBeans
spring-*/src/main/java/META-INF/MANIFEST.MF
# IDEA artifacts and output dirs
@@ -47,10 +36,4 @@ spring-*/src/main/java/META-INF/MANIFEST.MF
out
test-output
atlassian-ide-plugin.xml
# VS Code
.vscode/
cached-antora-playbook.yml
node_modules
.gradletasknamecache
-3
View File
@@ -1,3 +0,0 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.12-librca
@@ -0,0 +1,9 @@
#com.springsource.sts.gradle.core.preferences.GradleImportPreferences
#Thu Aug 9 11:34:43 CEST 2012
enableAfterTasks=true
afterTasks=afterEclipseImport;
enableDependendencyManagement=false
enableBeforeTasks=true
projects=;spring-aop;spring-aspects;spring-beans;spring-context;spring-context-support;spring-core;spring-expression;spring-instrument;spring-instrument-tomcat;spring-jdbc;spring-jms;spring-orm;spring-oxm;spring-struts;spring-test;spring-tx;spring-web;spring-webmvc;spring-webmvc-portlet;
enableDSLD=false
beforeTasks=cleanEclipse;eclipse;\:spring-oxm\:compileTestJava;
@@ -0,0 +1,5 @@
#com.springsource.sts.gradle.core.preferences.GradleProjectPreferences
#Tue Feb 21 14:38:31 CET 2012
com.springsource.sts.gradle.classpath.enableSorting=false
com.springsource.sts.gradle.rootprojectloc=
com.springsource.sts.gradle.linkedresources=
@@ -0,0 +1,9 @@
#com.springsource.sts.gradle.core.actions.GradleRefreshPreferences
#Thu Aug 9 11:34:43 CEST 2012
enableAfterTasks=true
afterTasks=afterEclipseImport;
useHierarchicalNames=false
enableBeforeTasks=true
addResourceFilters=false
enableDSLD=false
beforeTasks=cleanEclipse;eclipse;\:spring-oxm\:compileTestJava;
+28
View File
@@ -0,0 +1,28 @@
= How to contribute to the reference
The Spring Framework reference now uses http://asciidoctor.org/[asciidoctor]. This document describes how to contribute documentation updates.
== Building with Gradle
You can build the documentation using gradle using the `asciidoc` task. For example, from the project root execute the following command:
gradlew asciidoc
the output will be available at `spring-framework/build/asciidoc/index.html`
== Live editing
One of the nice features about using asciidoctor is the support for live editing.
You will find a Guardfile already present at `spring-framework/src/asciidoc/Guardfile`. Then ensure to follow the setup instructions within the http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/[Editing AsciiDoc with Live Preview] document.
When running `guard start` within the `src/asciidoc/` folder, any changes to the `src/asciidoc/index.adoc` file will automatically be written at `src/asciidoc/build/index.html`.
== Documentation notes
Some notes on documentation
* It is important to keep whitespaces to a minimum to make it simple to edit files. This means use an editor with line wrapping rather than manually inserting hard returns.
* http://asciidoctor.org/docs/asciidoc-syntax-quick-reference/[Asciidoctor Quick Reference]
* http://asciidoctor.org/docs/user-manual/[Asciidoctor Manual]
* http://asciidoctor.org/docs/asciidoc-writers-guide/[Asciidoctor Writers Guide]
+301
View File
@@ -0,0 +1,301 @@
_Have something you'd like to contribute to the framework? We welcome pull
requests, but ask that you carefully read this document first to understand how
best to submit them; what kind of changes are likely to be accepted; and what
to expect from the Spring team when evaluating your submission._
_Please refer back to this document as a checklist before issuing any pull
request; this will save time for everyone!_
## Understand the basics
Not sure what a pull request is, or how to submit one? Take a look at GitHub's
excellent [help documentation][] first.
## Search JIRA first; create an issue if necessary
Is there already an issue that addresses your concern? Do a bit of searching
in our [JIRA issue tracker][] to see if you can find something similar. If not,
please create a new issue before submitting a pull request unless the change is
truly trivial, e.g. typo fixes, removing compiler warnings, etc.
## Discuss non-trivial contribution ideas with committers
If you're considering anything more than correcting a typo or fixing a minor
bug, please discuss it on the [spring-framework-contrib][] mailing list before
submitting a pull request. We're happy to provide guidance, but please spend an
hour or two researching the subject on your own including searching the mailing
list for prior discussions.
## Sign the Contributor License Agreement
If you have not previously done so, please fill out and submit the
[SpringSource CLA form][]. You'll receive a token when this process is complete.
Keep track of this; you may be asked for it later!
Note that emailing/postal mailing a signed copy is _not_ necessary. Submission
of the web form is all that is required.
Once you've completed the web form, simply add the following in a comment on
your pull request:
I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.
You do not need to include your token/id. Please add the statement above to all
future pull requests as well, simply so that the Spring Framework team knows
immediately that this process is complete.
## Create your branch from `master`
Master currently represents work toward Spring Framework 4.0. Please submit
all pull requests there, even bug fixes and minor improvements. Backports to
`3.2.x` will be considered on a case-by-case basis.
## Use short branch names
Branches used when submitting pull requests should preferably be named
according to JIRA issues, e.g. 'SPR-1234'. Otherwise, use succinct, lower-case,
dash (-) delimited names, such as 'fix-warnings', 'fix-typo', etc. In
[fork-and-edit][] cases, the GitHub default 'patch-1' is fine as well. This is
important, because branch names show up in the merge commits that result from
accepting pull requests, and should be as expressive and concise as possible.
## Mind the whitespace
Please carefully follow the whitespace and formatting conventions already
present in the framework.
1. Tabs, not spaces
1. Unix (LF), not DOS (CRLF) line endings
1. Eliminate all trailing whitespace
1. Wrap Javadoc at 90 characters
1. Aim to wrap code at 90 characters, but favor readability over wrapping
1. Preserve existing formatting; i.e. do not reformat code for its own sake
1. Search the codebase using `git grep` and other tools to discover common
naming conventions, etc.
1. Latin-1 (ISO-8859-1) encoding for Java sources; use `native2ascii` to convert
if necessary
## Add Apache license header to all new classes
```java
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ...;
```
## Update Apache license header to modified files as necessary
Always check the date range in the license header. For example, if you've
modified a file in 2013 whose header still reads
```java
* Copyright 2002-2011 the original author or authors.
```
then be sure to update it to 2013 appropriately
```java
* Copyright 2002-2013 the original author or authors.
```
## Use @since tags for newly-added public API types and methods
e.g.
```java
/**
* ...
*
* @author First Last
* @since 4.0
* @see ...
*/
```
## Submit JUnit test cases for all behavior changes
Search the codebase to find related unit tests and add additional @Test methods
within. It is also acceptable to submit test cases on a per JIRA issue basis,
e.g.
```java
package org.springframework.beans.factory.support;
/**
* Unit tests for SPR-8954, in which a custom {@link InstantiationAwareBeanPostProcessor}
* forces the predicted type of a FactoryBean, effectively preventing retrieval of the
* bean from calls to #getBeansOfType(FactoryBean.class). The implementation of
* {@link AbstractBeanFactory#isFactoryBean(String, RootBeanDefinition)} now ensures
* that not only the predicted bean type is considered, but also the original bean
* definition's beanClass.
*
* @author Chris Beams
*/
public class Spr8954Tests {
@Test
public void cornerSpr8954() {
// ...
}
}
```
## Squash commits
Use `git rebase --interactive`, `git add --patch` and other tools to "squash"
multiple commits into atomic changes. In addition to the man pages for git,
there are many resources online to help you understand how these tools work.
Here is one: http://book.git-scm.com/4_interactive_rebasing.html.
## Use real name in git commits
Please configure git to use your real first and last name for any commits you
intend to submit as pull requests. For example, this is not acceptable:
Author: Nickname <user@mail.com>
Rather, please include your first and last name, properly capitalized, as
submitted against the SpringSource contributor license agreement:
Author: First Last <user@mail.com>
This helps ensure traceability against the CLA, and also goes a long way to
ensuring useful output from tools like `git shortlog` and others.
You can configure this globally via the account admin area GitHub (useful for
fork-and-edit cases); globally with
git config --global user.name "First Last"
git config --global user.email user@mail.com
or locally for the spring-framework repository only by omitting the '--global'
flag:
cd spring-framework
git config user.name "First Last"
git config user.email user@mail.com
## Format commit messages
Please read and follow the [commit guidelines section of Pro Git][].
Most importantly, please format your commit messages in the following way
(adapted from the commit template in the link above):
Short (50 chars or less) summary of changes
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded by a
single space, with blank lines in between, but conventions vary here
Issue: SPR-1234, SPR-1235
1. Use imperative statements in the subject line, e.g. "Fix broken Javadoc link"
1. Begin the subject line sentence with a capitalized verb, e.g. "Add, Prune,
Fix, Introduce, Avoid, etc."
1. Do not end the subject line with a period
1. Keep the subject line to 50 characters or less if possible
1. Wrap lines in the body at 72 characters or less
1. Mention associated JIRA issue(s) at the end of the commit comment, prefixed
with "Issue: " as above
1. In the body of the commit message, explain how things worked before this
commit, what has changed, and how things work now
For examples of this style, issue a `git log --author=cbeams` in the
spring-framework git repository. For convenience, here are several such commits:
https://github.com/SpringSource/spring-framework/commit/08e2669b84ec0faa2f7904441fe39ac70b65b078
https://github.com/SpringSource/spring-framework/commit/1d9d3e6ff79ce9f0eca03b02cd1df705925575da
https://github.com/SpringSource/spring-framework/commit/8e0b1c3a5f957af3049cfa0438317177e16d6de6
https://github.com/SpringSource/spring-framework/commit/b787a68f2050df179f7036b209aa741230a02477
## Run all tests prior to submission
See the [building from source][] section of the README for instructions. Make
sure that all tests pass prior to submitting your pull request.
## Submit your pull request
Subject line:
Follow the same conventions for pull request subject lines as mentioned above
for commit message subject lines.
In the body:
1. Explain your use case. What led you to submit this change? Why were existing
mechanisms in the framework insufficient? Make a case that this is a
general-purpose problem and that yours is a general-purpose solution, etc.
1. Add any additional information and ask questions; start a conversation, or
continue one from JIRA
1. Mention the JIRA issue ID
1. Also mention that you have submitted the CLA as described above
Note that for pull requests containing a single commit, GitHub will default the
subject line and body of the pull request to match the subject line and body of
the commit message. This is fine, but please also include the items above in the
body of the request.
## Mention your pull request on the associated JIRA issue
Add a comment to the associated JIRA issue(s) linking to your new pull request.
## Expect discussion and rework
The Spring team takes a very conservative approach to accepting contributions to
the framework. This is to keep code quality and stability as high as possible,
and to keep complexity at a minimum. Your changes, if accepted, may be heavily
modified prior to merging. You will retain "Author:" attribution for your Git
commits granted that the bulk of your changes remain intact. You may be asked to
rework the submission for style (as explained above) and/or substance. Again, we
strongly recommend discussing any serious submissions with the Spring Framework
team _prior_ to engaging in serious development work.
Note that you can always force push (`git push -f`) reworked / rebased commits
against the branch used to submit your pull request. i.e. you do not need to
issue a new pull request when asked to make changes.
[help documentation]: http://help.github.com/send-pull-requests
[JIRA issue tracker]: https://jira.springsource.org/browse/SPR
[spring-framework-contrib]: https://groups.google.com/forum/#!forum/spring-framework-contrib
[SpringSource CLA form]: https://support.springsource.com/spring_committer_signup
[fork-and-edit]: https://github.com/blog/844-forking-with-the-edit-button
[commit guidelines section of Pro Git]: http://progit.org/book/ch5-2.html#commit_guidelines
[building from source]: https://github.com/SpringSource/spring-framework#building-from-source
-140
View File
@@ -1,140 +0,0 @@
= Spring Framework Docs Build
You're currently viewing the Antora playbook branch.
The playbook branch hosts the docs build that is used to build and publish the production docs site.
The Spring Framework reference docs are built using https://antora.org[Antora].
This README covers how to build the docs in a software branch as well as how to build the production docs site locally.
== Overview
To prepare your system for building the documentation, <<prerequisites,install the prerequisites>> and then <<build-main,create your workspace and build the main branch documentation>>.
Once you've completed those steps, follow the instructions in <<build-branch,Build the 6.0.x branch documentation>> to learn how to build the documentation for a version branch you haven't previously checked out.
To build the production site documentation on your computer, follow the instructions in <<prerequisites,Prerequisites>>, <<build-main,Build the main branch documentation>>, and then <<build-production,Build the production documentation site>>.
.Branch checkout instead of worktrees
[NOTE]
====
If you prefer to set up your workspace without worktrees, complete the steps in <<prerequisites,Prerequisites>> and clone the project repository onto your computer.
Then follow the instructions in each section starting from the `sdk env || sdk env install` step once you've checked out the desired branch.
====
[#prerequisites]
== Prerequisites (everyone)
These instructions assume you already have basic tools on your system, including bash, zip, unzip, git, and curl.
In addition to these basic tools, you need https://sdkman.io/install[SDKMAN!] installed so that the correct JDK is set for each branch.
. Open your terminal and enter the following command:
+
--
$ curl -s "https://get.sdkman.io" | bash
This command downloads and installs SDKMAN!
Once installation is complete, you should see a command displayed in your terminal that will initiate SDKMAN.
--
. Copy the command displayed in your terminal and run it.
`$HOME` is the path unique to your computer (e.g., _home/my-jam/.sdkman/bin/sdkman-init.sh_).
$ source "$HOME/.sdkman/bin/sdkman-init.sh"
You'll use SDKMAN in the next sections to install and switch to the JDK required for each branch.
Now you're ready to <<build-main,create your workspace>>.
[#build-main]
== Build the main branch documentation (writers)
Your workspace will be the folder that contains the git worktrees of the project.
. In your terminal, create a directory for the project and then change into that directory.
$ mkdir spring-framework
$ cd spring-framework
. Clone the project repository and create the primary worktree for the main branch.
Then change into the new _main_ folder.
$ git clone https://github.com/spring-projects/spring-framework main
$ cd main
. Switch to the required JDK using SDKMAN by running the following command:
+
--
$ sdk env || sdk env install
SDKMAN will switch to the required JDK or install it if it isn't present.
--
. Generate the documentation with Antora using the following command:
+
--
$ ./gradlew -PbuildSrc.skipTests=true :framework-docs:antora
This command will build the documentation, including any generated attributes, for the main branch.
--
. Navigate to _$HOME/spring-framework/main/framework-docs/build/site/index.html_ to view the generated documentation.
[#build-branch]
== Build the 6.0.x branch documentation (writers)
NOTE: The instructions in this section assume you've completed the steps in the <<build-main,previous section>>.
After creating the worktree for the main branch, you can set up a worktree for any other branches you'll work on in the future.
In this section, you'll create a worktree for the 6.0.x branch in your project workspace.
. To add a worktree, you have to be in a worktree.
In your terminal, change to the _main_ folder if you aren't already in it, e.g., _$HOME/spring-framework/main_.
Set up a worktree for the 6.0.x branch and then change into the new directory by running the following commands:
$ git worktree add ../6.0.x 6.0.x --track
$ cd ../6.0.x
. Switch to the required JDK or install it.
$ sdk env || sdk env install
. Generate the documentation with the following command:
+
--
$ ./gradlew -PbuildSrc.skipTests=true :framework-docs:antora
This command will build the documentation, including any generated attributes, for the 6.0.x branch.
--
. Navigate to _$HOME/spring-framework/6.0.x/docs/build/site/index.html_ to view the generated documentation.
[#build-production]
== Build the production documentation site (docs manager)
NOTE: The instructions in this section assume you've <<build-main,prepared your workspace and created the worktree for the main branch>>.
To build the project's production site, you'll set up a worktree for the docs-build branch of the repository.
. To add a worktree, you have to be in a worktree.
In your terminal, change to the _main_ folder if you aren't already in it, e.g., _$HOME/spring-framework/main_.
Run the following command to set up the worktree for the _docs-build_ branch.
Then change into the new _docs-build_ directory.
$ git worktree add ../docs-build docs-build --track
$ cd ../docs-build
. Switch to the required JDK or install it.
$ sdk env || sdk env install
. Generate the documentation for the project's production site using the following command:
+
--
$ ./gradlew antora
This command will build all of the documentation included in the project's production site from the repository on GitHub.
To build the documentation from the current clone, using any worktrees that are available, use the following command instead:
$ ./gradlew antora --playbook local-antora-playbook.yml
--
. Navigate to _$HOME/spring-framework/docs-site/build/site/index.html_ to view the generated documentation.
+101
View File
@@ -0,0 +1,101 @@
## 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.
## 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][spring tag] and
[spring-mvc][spring-mvc tag] 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.
### prerequisites
[Git][] and [OpenJDK 8 early access build 100 or later][JDK8 build]
Be sure that your `JAVA_HOME` environment variable points to the `jdk1.8.0` folder
extracted from the JDK download.
### check out sources
`git clone git://github.com/SpringSource/spring-framework.git`
### import sources into your IDE
Run `./import-into-eclipse.sh` or read `import-into-idea.md` as appropriate.
> **Note:** Per the prerequisites above, ensure that you have JDK 8 configured
properly in your IDE.
### install all spring-\* jars into your local Maven cache
`./gradlew install`
### compile and test, build all jars, distribution zips and docs
`./gradlew build`
... 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][].
[Spring Integration]: https://github.com/SpringSource/spring-integration
[Spring Batch]: https://github.com/SpringSource/spring-batch
[family of projects]: http://springsource.org/projects
[SpringSource organization]: https://github.com/SpringSource
[downloading Spring artifacts]: https://github.com/SpringSource/spring-framework/wiki/Downloading-Spring-artifacts
[building a distribution with dependencies]: https://github.com/SpringSource/spring-framework/wiki/Building-a-distribution-with-dependencies
[Javadoc]: http://static.springsource.org/spring-framework/docs/current/javadoc-api
[reference docs]: http://static.springsource.org/spring-framework/docs/current/spring-framework-reference
[Spring forums]: http://forum.springsource.org
[spring tag]: http://stackoverflow.com/questions/tagged/spring
[spring-mvc tag]: http://stackoverflow.com/questions/tagged/spring-mvc
[Stack Overflow]: http://stackoverflow.com/faq
[Commercial support]: http://springsource.com/support/springsupport
[Spring Framework JIRA]: http://jira.springsource.org/browse/SPR
[the lifecycle of an issue]: https://github.com/cbeams/spring-framework/wiki/The-Lifecycle-of-an-Issue
[spring-framework-issues]: https://github.com/SpringSource/spring-framework-issues#readme
[readme]: https://github.com/SpringSource/spring-framework-issues#readme
[Gradle]: http://gradle.org
[`./gradlew`]: http://vimeo.com/34436402
[Git]: http://help.github.com/set-up-git-redirect
[JDK8 build]: http://jdk8.java.net/download.html
[Gradle build and release FAQ]: https://github.com/SpringSource/spring-framework/wiki/Gradle-build-and-release-FAQ
[Pull requests]: http://help.github.com/send-pull-requests
[contributor guidelines]: https://github.com/SpringSource/spring-framework/blob/master/CONTRIBUTING.md
[@springframework]: http://twitter.com/springframework
[team members]: http://twitter.com/springframework/team/members
[team blog]: http://blog.springsource.org
[news feed]: http://www.springsource.org/news-events
[Apache License]: http://www.apache.org/licenses/LICENSE-2.0
-41
View File
@@ -1,41 +0,0 @@
antora:
extensions:
- require: '@springio/antora-extensions'
root_component_name: 'framework'
site:
title: Spring Framework
url: https://docs.spring.io/spring-framework/reference
robots: allow
git:
ensure_git_suffix: false
content:
sources:
- url: https://github.com/spring-projects/spring-framework
# Refname matching:
# https://docs.antora.org/antora/latest/playbook/content-refname-matching/
# branches: We include snapshots for main, 6.2.x, and 7.0.x to 9.*.x.
branches: ['main', '6.2.x', '{7..9}.+({0..9}).x']
# tags: include all releases from 6.2.0 to 9.*.*.
tags: ['v6.2.+({0..9})', 'v{7..9}.+({0..9}).+({0..9})?(-{RC,M}*)']
start_path: framework-docs
asciidoc:
extensions:
- '@asciidoctor/tabs'
- '@springio/asciidoctor-extensions'
- '@springio/asciidoctor-extensions/include-code-extension'
attributes:
page-stackoverflow-url: https://stackoverflow.com/questions/tagged/spring
page-pagination: ''
hide-uri-scheme: '@'
tabs-sync-option: '@'
include-java: 'example$docs-src/main/java/org/springframework/docs'
urls:
latest_version_segment_strategy: redirect:to
latest_version_segment: ''
redirect_facility: httpd
runtime:
log:
failure_level: warn
ui:
bundle:
url: https://github.com/spring-io/antora-ui-spring/releases/download/v0.4.26/ui-bundle.zip
+1147 -7
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,158 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.gradle
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.TaskAction
/**
* Gradle plugin that detects identically named, non-empty packages split across multiple
* subprojects, e.g. "org.springframework.context.annotation" existing in both spring-core
* and spring-aspects. Adds a 'detectSplitPackages' task to the current project's task
* collection. If the project already contains a 'check' task (i.e. is a typical Gradle
* project with the "java" plugin applied), the 'check' task will be updated to depend on
* the execution of 'detectSplitPackages'.
*
* By default, all subprojects will be scanned. Use the 'projectsToScan' task property to
* modify this value. Example usage:
*
* apply plugin: 'detect-split-packages // typically applied to root project
*
* detectSplitPackages {
* packagesToScan -= project(":spring-xyz") // scan every project but spring-xyz
* }
*
* @author Rob Winch
* @author Glyn Normington
* @author Chris Beams
*/
public class DetectSplitPackagesPlugin implements Plugin<Project> {
public void apply(Project project) {
def tasks = project.tasks
Task detectSplitPackages = tasks.create("detectSplitPackages", DetectSplitPackagesTask.class)
if (tasks.asMap.containsKey("check")) {
tasks.getByName("check").dependsOn detectSplitPackages
}
}
}
public class DetectSplitPackagesTask extends DefaultTask {
private static final String JAVA_FILE_SUFFIX = ".java"
private static final String PACKAGE_SEPARATOR = "."
private static final String HIDDEN_DIRECTORY_PREFIX = "."
@Input
Set<Project> projectsToScan = project.subprojects
public DetectSplitPackagesTask() {
this.group = "Verification"
this.description = "Detects packages split across two or more subprojects."
}
@TaskAction
public void detectSplitPackages() {
def splitPackages = doDetectSplitPackages()
if (!splitPackages.isEmpty()) {
def message = "The following split package(s) have been detected:\n"
splitPackages.each { pkg, mod ->
message += " - ${pkg} (split across ${mod[0].name} and ${mod[1].name})\n"
}
throw new GradleException(message)
}
}
private Map<String, List<Project>> doDetectSplitPackages() {
def splitPackages = [:]
def mergedProjects = findMergedProjects()
def packagesByProject = mapPackagesByProject()
def projects = packagesByProject.keySet().toArray()
def nProjects = projects.length
for (int i = 0; i < nProjects - 1; i++) {
for (int j = i + 1; j < nProjects - 1; j++) {
def prj_i = projects[i]
def prj_j = projects[j]
def pkgs_i = new HashSet(packagesByProject.get(prj_i))
def pkgs_j = packagesByProject.get(prj_j)
pkgs_i.retainAll(pkgs_j)
if (!pkgs_i.isEmpty()
&& mergedProjects.get(prj_i) != prj_j
&& mergedProjects.get(prj_j) != prj_i) {
pkgs_i.each { pkg ->
def readablePkg = pkg.substring(1).replaceAll(File.separator, PACKAGE_SEPARATOR)
splitPackages[readablePkg] = [prj_i, prj_j]
}
}
}
}
return splitPackages;
}
private Map<Project, Set<String>> mapPackagesByProject() {
def packagesByProject = [:]
this.projectsToScan.each { Project p ->
def packages = new HashSet<String>()
p.sourceSets.main.java.srcDirs.each { File dir ->
findPackages(packages, dir, "")
}
if (!packages.isEmpty()) {
packagesByProject.put(p, packages)
}
}
return packagesByProject;
}
private Map<Project, Project> findMergedProjects() {
def mergedProjects = [:]
this.projectsToScan.findAll { p ->
p.plugins.findPlugin(MergePlugin)
}.findAll { p ->
p.merge.into
}.each { p ->
mergedProjects.put(p, p.merge.into)
}
return mergedProjects
}
private static void findPackages(Set<String> packages, File dir, String packagePath) {
def scanDir = new File(dir, packagePath)
def File[] javaFiles = scanDir.listFiles({ file ->
!file.isDirectory() && file.name.endsWith(JAVA_FILE_SUFFIX)
} as FileFilter)
if (javaFiles != null && javaFiles.length != 0) {
packages.add(packagePath)
}
scanDir.listFiles({ File file ->
file.isDirectory() && !file.name.startsWith(HIDDEN_DIRECTORY_PREFIX)
} as FileFilter).each { File subDir ->
findPackages(packages, dir, packagePath + File.separator + subDir.name)
}
}
}
@@ -0,0 +1,160 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.gradle
import org.gradle.api.*
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.ProjectDependency;
import org.gradle.api.artifacts.maven.Conf2ScopeMapping
import org.gradle.api.plugins.MavenPlugin
import org.gradle.api.tasks.*
import org.gradle.plugins.ide.eclipse.EclipsePlugin
import org.gradle.plugins.ide.eclipse.model.EclipseClasspath;
import org.gradle.plugins.ide.idea.IdeaPlugin
import org.gradle.api.invocation.*
/**
* Gradle plugin that allows projects to merged together. Primarily developed to
* allow Spring to support multiple multiple incompatible versions of third-party
* dependencies (for example Hibernate v3 and v4).
* <p>
* The 'merge' extension should be used to define how projects are merged, for example:
* <pre class="code">
* configure(subprojects) {
* apply plugin: MergePlugin
* }
*
* project("myproject") {
* }
*
* project("myproject-extra") {
* merge.into = project("myproject")
* }
* </pre>
* <p>
* This plugin adds two new configurations:
* <ul>
* <li>merging - Contains the projects being merged into this project<li>
* <li>runtimeMerge - Contains all dependencies that are merge projects. These are used
* to allow an IDE to reference merge projects.</li>
* <ul>
*
* @author Rob Winch
* @author Phillip Webb
*/
class MergePlugin implements Plugin<Project> {
private static boolean attachedProjectsEvaluated;
public void apply(Project project) {
project.plugins.apply(MavenPlugin)
project.plugins.apply(EclipsePlugin)
project.plugins.apply(IdeaPlugin)
MergeModel model = project.extensions.create("merge", MergeModel)
project.configurations.create("merging")
Configuration runtimeMerge = project.configurations.create("runtimeMerge")
// Ensure the IDE can reference merged projects
project.eclipse.classpath.plusConfigurations += [runtimeMerge]
project.idea.module.scopes.PROVIDED.plus += runtimeMerge
// Hook to perform the actual merge logic
project.afterEvaluate{
if(it.merge.into != null) {
setup(it)
}
}
// Hook to build runtimeMerge dependencies
if(!attachedProjectsEvaluated) {
project.gradle.projectsEvaluated{
postProcessProjects(it)
}
attachedProjectsEvaluated = true;
}
}
private void setup(Project project) {
project.merge.into.dependencies.add("merging", project)
project.dependencies.add("provided", project.merge.into.sourceSets.main.output)
project.dependencies.add("runtimeMerge", project.merge.into)
setupTaskDependencies(project)
setupMaven(project)
}
private void setupTaskDependencies(Project project) {
// invoking a task will invoke the task with the same name on 'into' project
["sourcesJar", "jar", "javadocJar", "javadoc", "install", "artifactoryPublish"].each {
def task = project.tasks.findByPath(it)
if(task) {
task.enabled = false
task.dependsOn(project.merge.into.tasks.findByPath(it))
}
}
// update 'into' project artifacts to contain the source artifact contents
project.merge.into.sourcesJar.from(project.sourcesJar.source)
project.merge.into.jar.from(project.sourceSets.main.output)
project.merge.into.javadoc {
source += project.javadoc.source
classpath += project.javadoc.classpath
}
}
private void setupMaven(Project project) {
project.configurations.each { configuration ->
Conf2ScopeMapping mapping = project.conf2ScopeMappings.getMapping([configuration])
if(mapping.scope) {
Configuration intoConfiguration = project.merge.into.configurations.create(
project.name + "-" + configuration.name)
configuration.excludeRules.each {
configuration.exclude([
(ExcludeRule.GROUP_KEY) : it.group,
(ExcludeRule.MODULE_KEY) : it.module])
}
configuration.dependencies.each {
def intoCompile = project.merge.into.configurations.getByName("compile")
// Protect against changing a compile scope dependency (SPR-10218)
if(!intoCompile.dependencies.contains(it)) {
intoConfiguration.dependencies.add(it)
}
}
project.merge.into.install.repositories.mavenInstaller.pom.scopeMappings.addMapping(
mapping.priority + 100, intoConfiguration, mapping.scope)
}
}
}
private postProcessProjects(Gradle gradle) {
gradle.allprojects(new Action<Project>() {
public void execute(Project project) {
project.configurations.getByName("runtime").allDependencies.withType(ProjectDependency).each{
Configuration dependsOnMergedFrom = it.dependencyProject.configurations.getByName("merging");
dependsOnMergedFrom.dependencies.each{ dep ->
project.dependencies.add("runtimeMerge", dep.dependencyProject)
}
}
}
});
}
}
class MergeModel {
Project into;
}
@@ -0,0 +1,57 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.build.gradle
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration;
import org.gradle.api.artifacts.ProjectDependency;
/**
* Gradle plugin that automatically updates testCompile dependencies to include
* the test source sets of project dependencies.
*
* @author Phillip Webb
*/
class TestSourceSetDependenciesPlugin implements Plugin<Project> {
@Override
public void apply(Project project) {
project.afterEvaluate {
Set<ProjectDependency> projectDependencies = new LinkedHashSet<ProjectDependency>()
collectProjectDependencies(projectDependencies, project)
projectDependencies.each {
project.dependencies.add("testCompile", it.dependencyProject.sourceSets.test.output)
}
}
}
private void collectProjectDependencies(Set<ProjectDependency> projectDependencies,
Project project) {
for(def configurationName in ["compile", "optional", "provided", "testCompile"]) {
Configuration configuration = project.getConfigurations().findByName(configurationName)
if(configuration) {
configuration.dependencies.findAll { it instanceof ProjectDependency }.each {
projectDependencies.add(it)
collectProjectDependencies(projectDependencies, it.dependencyProject)
}
}
}
}
}
@@ -0,0 +1 @@
implementation-class=org.springframework.build.gradle.DetectSplitPackagesPlugin
@@ -0,0 +1 @@
implementation-class=org.springframework.build.gradle.MergePlugin
@@ -0,0 +1 @@
implementation-class=org.springframework.build.gradle.TestSourceSetDependenciesPlugin
+1 -2
View File
@@ -1,2 +1 @@
group=org.springframework
description=Spring Framework Docs Site
version=4.0.0.RELEASE
+105
View File
@@ -0,0 +1,105 @@
import org.gradle.plugins.ide.eclipse.model.ProjectDependency
import org.gradle.plugins.ide.eclipse.model.SourceFolder
apply plugin: "propdeps-eclipse"
apply plugin: "propdeps-idea"
// Until eclipse fully supports Java 8 use 1.7 source level
eclipse.jdt {
sourceCompatibility = 1.7
targetCompatibility = 1.7
}
// Replace classpath entries with project dependencies (GRADLE-1116)
eclipse.classpath.file.whenMerged { classpath ->
def regexp = /.*?\/([^\/]+)\/build\/[^\/]+\/(?:main|test)/ // only match those that end in main or test (avoids removing necessary entries like build/classes/jaxb)
def projectOutputDependencies = classpath.entries.findAll { entry -> entry.path =~ regexp }
projectOutputDependencies.each { entry ->
def matcher = (entry.path =~ regexp)
if(matcher) {
def projectName = matcher[0][1]
def path = "/${projectName}"
if(!classpath.entries.find { e -> e instanceof ProjectDependency && e.path == path }) {
def dependency = new ProjectDependency(path, project(":${projectName}").path)
dependency.exported = true
classpath.entries.add(dependency)
}
classpath.entries.remove(entry)
}
}
classpath.entries.removeAll { entry -> (entry.path =~ /(?!.*?repack.*\.jar).*?\/([^\/]+)\/build\/libs\/[^\/]+\.jar/) }
}
// Use separate main/test outputs (prevents WTP from packaging test classes)
eclipse.classpath.defaultOutputDir = file(project.name+"/bin/eclipse")
eclipse.classpath.file.beforeMerged { classpath ->
classpath.entries.findAll{ it instanceof SourceFolder }.each {
if(it.output.startsWith("bin/")) {
it.output = null
}
}
}
eclipse.classpath.file.whenMerged { classpath ->
classpath.entries.findAll{ it instanceof SourceFolder }.each {
it.output = "bin/" + it.path.split("/")[1]
}
}
// Allow projects to be used as WPT modules
eclipse.project.natures "org.eclipse.wst.common.project.facet.core.nature"
// Include project specific settings
task eclipseSettings(type: Copy) {
from rootProject.files(
"src/eclipse/org.eclipse.jdt.ui.prefs",
"src/eclipse/org.eclipse.wst.common.project.facet.core.xml")
into project.file('.settings/')
outputs.upToDateWhen { false }
}
task eclipseWstComponent(type: Copy) {
from rootProject.files(
"src/eclipse/org.eclipse.wst.common.component")
into project.file('.settings/')
expand(deployname: project.name)
outputs.upToDateWhen { false }
}
task eclipseJdtPrepare(type: Copy) {
from rootProject.file("src/eclipse/org.eclipse.jdt.core.prefs")
into project.file(".settings/")
outputs.upToDateWhen { false }
}
task cleanEclipseJdtUi(type: Delete) {
delete project.file(".settings/org.eclipse.jdt.ui.prefs")
delete project.file("org.eclipse.jdt.core.prefs")
delete project.file(".settings/org.eclipse.wst.common.component")
delete project.file(".settings/org.eclipse.wst.common.project.facet.core.xml")
}
tasks["eclipseJdt"].dependsOn(eclipseJdtPrepare)
tasks["cleanEclipse"].dependsOn(cleanEclipseJdtUi)
tasks["eclipse"].dependsOn(eclipseSettings, eclipseWstComponent)
// Filter 'build' folder
eclipse.project.file.withXml {
def node = it.asNode()
def filteredResources = node.get("filteredResources")
if(filteredResources) {
node.remove(filteredResources)
}
def filterNode = node.appendNode("filteredResources").appendNode("filter")
filterNode.appendNode("id", "1359048889071")
filterNode.appendNode("name", "")
filterNode.appendNode("type", "30")
def matcherNode = filterNode.appendNode("matcher")
matcherNode.appendNode("id", "org.eclipse.ui.ide.multiFilter")
matcherNode.appendNode("arguments", "1.0-projectRelativePath-matches-false-false-build")
}
+75
View File
@@ -0,0 +1,75 @@
/**
* Generate a JDiff report between the current version and an older version.
*
* Usage:
* gradle jdiff -D OLD_VERSION=3.1.3.RELEASE -D OLD_VERSION_ROOT=/path/to/3.1.3.RELEASE
*
* View generated report at:
* build/reports/jdiff/changes.html
*
* @param OLD_VERSION required
* @param OLD_VERSION_ROOT required, typically pointing to a separate git clone dir
*/
task jdiff {
description = "Generates a JDiff report"
group = "Documentation"
def jdiffHome = "${rootProject.rootDir}/gradle/jdiff"
ant.taskdef(
name: "jdiff",
classname: "jdiff.JDiffAntTask",
classpath: "${jdiffHome}/antjdiff.jar")
def currentVersion = rootProject.version
def currentVersionRoot = rootProject.rootDir
def oldVersion = System.getProperty("OLD_VERSION")
def oldVersionRoot = System.getProperty("OLD_VERSION_ROOT")
def outputDir = "${rootProject.buildDir}/reports/jdiff/${oldVersion}_to_${currentVersion}"
doLast {
if (oldVersion == null)
throw new IllegalArgumentException(
"Set OLD_VERSION property to indicate older of the two versions being compared")
if (oldVersionRoot == null)
throw new IllegalArgumentException(
"Set OLD_VERSION_ROOT property to indicate the root directory for ${oldVersion}")
oldVersionRoot = new File(oldVersionRoot)
ant.property(name: "JDIFF_HOME", value: jdiffHome)
ant.mkdir(dir: outputDir)
ant.jdiff(
destdir: outputDir,
verbose: "off",
stats: "on",
docchanges: "off") {
old(name: "Spring Framework ${oldVersion}") {
oldVersionRoot.eachDirMatch( {
def candidate = new File(it)
candidate.name.matches("org.springframework.*") ||
candidate.name.matches("spring-.*") }) { match ->
match.eachDirRecurse { subdir ->
if (subdir.path ==~ '.*/src/main/java$') {
dirset(dir: subdir.path, includes: "org/**")
}
}
}
}
"new"(name: "Spring Framework ${currentVersion}") {
currentVersionRoot.eachDirMatch( {
def candidate = new File(it)
candidate.name.matches("org.springframework.*") ||
candidate.name.matches("spring-.*") }) { match ->
match.eachDirRecurse { subdir ->
if (subdir.path ==~ '.*/src/main/java$') {
dirset(dir: subdir.path, includes: "org/**")
}
}
}
}
}
}
}
+506
View File
@@ -0,0 +1,506 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
not price. Our General Public Licenses are designed to make sure that
you have the freedom to distribute copies of free software (and charge
for this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
+9
View File
@@ -0,0 +1,9 @@
/**
* This class is used only as a "null" argument for Javadoc when comparing
* two API files. Javadoc has to have a package, .java or .class file as an
* argument, even though JDiff doesn't use it.
*/
public class Null {
public Null() {
}
}
+6
View File
@@ -0,0 +1,6 @@
This distribution of JDiff 1.1.1 is included in the Spring Framework build
because JDiff has a hard requirement on a JDIFF_HOME directory containing
jdiff.jar and xerces.jar as well as other presentation resources.
The actual generation of JDiff reports is driven by the `jdiff` task declared
in build.gradle in the project root.
+59
View File
@@ -0,0 +1,59 @@
JDiff Doclet
------------
Matthew Doar
mdoar@pobox.com
The JDiff doclet is used to generate a report describing the
difference between two public Java APIs.
The file jdiff.html contains the reference page for JDiff. The latest
version of JDiff can be downloaded at:
http://sourceforge.net/projects/javadiff
To use the Ant task on your own project, see example.xml. More examples
of using JDiff to compare the public APIs of J2SE1.3 and J2SE1.4 can
be seen at http://www.jdiff.org
For an example with the source distribution, run "ant" and
look at the HTML output in ./build/reports/example/changes.html
The page at ./build/reports/example/changes/com.acme.sp.SPImpl.html
shows what a typical page of changes looks like.
System Requirements
-------------------
JDiff has been tested with all releases of Java since J2SE1.2 but
releases of JDiff after 1.10.0 focus on JDK1.5.
License
-------
JDiff is licensed under the Lesser GNU General Public License (LGPL).
See the file LICENSE.txt.
Acknowledgements
----------------
JDiff uses Stuart D. Gathman's Java translation of Gene Myers' O(ND)
difference algorithm.
JDiff uses Xerces 1.4.2 from http://www.apache.org.
JDiff also includes a script to use the classdoc application from
http://classdoc.sourceforge.net or http://www.jensgulden.de, by Jens
Gulden, (mail@jensgulden.de), to call a doclet such as jdiff on a .jar
file rather than on source.
Many thanks to the reviewers at Sun and Vitria who gave feedback on early
versions of JDiff output, and also to the distillers of Laphroaig, and to
Arturo Fuente for his consistently fine cigars which helped inspire
much of this work.
Footnote:
If you are looking for a generalized diff tool for XML, try diffmk from
http://wwws.sun.com/software/xml/developers/diffmk/
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 799 B

File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.
+55
View File
@@ -0,0 +1,55 @@
apply plugin: "propdeps-maven"
install {
repositories.mavenInstaller {
customizePom(pom, project)
}
}
def customizePom(pom, gradleProject) {
pom.whenConfigured { generatedPom ->
// eliminate test-scoped dependencies (no need in maven central poms)
generatedPom.dependencies.removeAll { dep ->
dep.scope == "test"
}
// sort to make pom dependencies order consistent to ease comparison of older poms
generatedPom.dependencies = generatedPom.dependencies.sort { dep ->
"$dep.scope:$dep.groupId:$dep.artifactId"
}
// add all items necessary for maven central publication
generatedPom.project {
name = gradleProject.description
description = gradleProject.description
url = "https://github.com/SpringSource/spring-framework"
organization {
name = "SpringSource"
url = "http://springsource.org/spring-framework"
}
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
scm {
url = "https://github.com/SpringSource/spring-framework"
connection = "scm:git:git://github.com/SpringSource/spring-framework"
developerConnection = "scm:git:git://github.com/SpringSource/spring-framework"
}
developers {
developer {
id = "jhoeller"
name = "Juergen Hoeller"
email = "jhoeller@gopivotal.com"
}
}
issueManagement {
system = "Jira"
url = "https://jira.springsource.org/browse/SPR"
}
}
}
}
Binary file not shown.
+2 -3
View File
@@ -1,7 +1,6 @@
#Wed Nov 20 13:14:38 PST 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-bin.zip
Vendored
+118 -204
View File
@@ -1,129 +1,80 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
#!/usr/bin/env bash
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
GRADLE_OPTS="-XX:MaxMetaspaceSize=1024m -Xmx1024m $GRADLE_OPTS"
DEFAULT_JVM_OPTS=""
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
MAX_FD="maximum"
warn () {
warn ( ) {
echo "$*"
} >&2
}
die () {
die ( ) {
echo
echo "$*"
echo
exit 1
} >&2
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
CLASSPATH="\\\"\\\""
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD=$JAVA_HOME/bin/java
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -132,120 +83,83 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
Vendored
+44 -47
View File
@@ -1,22 +1,4 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -26,30 +8,27 @@
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set GRADLE_OPTS=-XX:MaxMetaspaceSize=1024m -Xmx1024m -XX:MaxHeapSize=256m %GRADLE_OPTS%
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
if "%ERRORLEVEL%" == "0" goto init
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
@@ -57,36 +36,54 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
if exist "%JAVA_EXE%" goto init
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
+117
View File
@@ -0,0 +1,117 @@
@echo off
set STS_TEST_VERSION='2.9.2.RELEASE'
set CURRENT_DIR=%~dp0
cd %CURRENT_DIR%
cls
echo.
echo -----------------------------------------------------------------------
echo Spring Framework Eclipse/STS project import guide
echo.
echo This script will guide you through the process of importing the
echo Spring Framework sources into Eclipse/STS. It is recommended that you
echo have a recent version of the SpringSource Tool Suite (this script has
echo been tested against STS %STS_TEST_VERSION%), but at the minimum you will
echo need Eclipse + AJDT.
echo.
echo If you need to download and install STS, please do that now by
echo visiting http://spring.io/tools/sts/all
echo.
echo Otherwise, press enter and we'll begin.
pause
REM this command:
REM - wipes out any existing Eclipse metadata
REM - generates OXM test classes to avoid errors on import into Eclipse
REM - generates metadata for all subprojects
REM - skips metadata gen for the root project (-x :eclipse) to work
REM around Eclipse's inability to import hierarchical project structures
REM SET COMMAND="./gradlew cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse"
SET COMMAND=gradlew cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse
echo.
echo -----------------------------------------------------------------------
echo STEP 1: Generate subproject Eclipse metadata
echo.
echo The first step will be to generate Eclipse project metadata for each
echo of the spring-* subprojects. This happens via the built-in
echo "Gradle wrapper" script (./gradlew in this directory). If this is your
echo first time using the Gradle wrapper, this step may take a few minutes
echo while a Gradle distribution is downloaded for you.
echo.
echo The command run will be:
echo.
echo %COMMAND%
echo.
echo Press enter when ready.
pause
call %COMMAND%
if not "%ERRORLEVEL%" == "0" exit /B %ERRORLEVEL%
echo.
echo -----------------------------------------------------------------------
echo STEP 2: Import subprojects into Eclipse/STS
echo.
echo Within Eclipse/STS, do the following:
echo.
echo File ^> Import... ^> Existing Projects into Workspace
echo ^> When prompted for the 'root directory', provide %CURRENT_DIR%
echo ^> Press enter. You will see the modules show up under "Projects"
echo ^> All projects should be selected/checked. Click Finish.
echo ^> When the project import is complete, you should have no errors.
echo.
echo When the above is complete, return here and press the enter key.
pause
set COMMAND=gradlew :eclipse
echo.
echo -----------------------------------------------------------------------
echo STEP 3: generate root project Eclipse metadata
echo.
echo Unfortunately, Eclipse does not allow for importing project
echo hierarchies, so we had to skip root project metadata generation in the
echo during step 1. In this step we simply generate root project metadata
echo so you can import it in the next step.
echo.
echo The command run will be:
echo.
echo %COMMAND%
echo.
echo Press the enter key when ready.
pause
call %COMMAND%
if not "%ERRORLEVEL%" == "0" exit /B %ERRORLEVEL%
echo.
echo -----------------------------------------------------------------------
echo STEP 4: Import root project into Eclipse/STS
echo.
echo Follow the project import steps listed in step 2 above to import the
echo root project.
echo.
echo Press enter when complete, and move on to the final step.
pause
echo.
echo -----------------------------------------------------------------------
echo STEP 5: Enable Git support for all projects
echo.
echo - In the Eclipse/STS Package Explorer, select all spring* projects.
echo - Right-click to open the context menu and select Team ^> Share Project...
echo - In the Share Project dialog that appears, select Git and press Next
echo - Check "Use or create repository in parent folder of project"
echo - Click Finish
echo.
echo When complete, you'll have Git support enabled for all projects.
echo.
echo You're ready to code! Goodbye!
+120
View File
@@ -0,0 +1,120 @@
STS_TEST_VERSION='2.9.2.RELEASE'
cd `dirname $0`
clear
cat <<EOM
-----------------------------------------------------------------------
Spring Framework Eclipse/STS project import guide
This script will guide you through the process of importing the
Spring Framework sources into Eclipse/STS. It is recommended that you
have a recent version of the SpringSource Tool Suite (this script has
been tested against STS $STS_TEST_VERSION), but at the minimum you will
need Eclipse + AJDT.
If you need to download and install STS, please do that now by
visiting http://spring.io/tools/sts/all
Otherwise, press enter and we'll begin.
EOM
read
# this command:
# - wipes out any existing Eclipse metadata
# - generates OXM test classes to avoid errors on import into Eclipse
# - generates metadata for all subprojects
# - skips metadata gen for the root project (-x :eclipse) to work
# around Eclipse's inability to import hierarchical project structures
COMMAND="./gradlew cleanEclipse :spring-oxm:compileTestJava eclipse -x :eclipse"
cat <<EOM
-----------------------------------------------------------------------
STEP 1: Generate subproject Eclipse metadata
The first step will be to generate Eclipse project metadata for each
of the spring-* subprojects. This happens via the built-in
"Gradle wrapper" script (./gradlew in this directory). If this is your
first time using the Gradle wrapper, this step may take a few minutes
while a Gradle distribution is downloaded for you.
The command run will be:
$COMMAND
Press enter when ready.
EOM
read
$COMMAND || exit
cat <<EOM
-----------------------------------------------------------------------
STEP 2: Import subprojects into Eclipse/STS
Within Eclipse/STS, do the following:
File > Import... > Existing Projects into Workspace
> When prompted for the 'root directory', provide $PWD
> Press enter. You will see the modules show up under "Projects"
> All projects should be selected/checked. Click Finish.
> When the project import is complete, you should have no errors.
When the above is complete, return here and press the enter key.
EOM
read
COMMAND="./gradlew :eclipse"
cat <<EOM
-----------------------------------------------------------------------
STEP 3: generate root project Eclipse metadata
Unfortunately, Eclipse does not allow for importing project
hierarchies, so we had to skip root project metadata generation in the
during step 1. In this step we simply generate root project metadata
so you can import it in the next step.
The command run will be:
$COMMAND
Press the enter key when ready.
EOM
read
$COMMAND || exit
cat <<EOM
-----------------------------------------------------------------------
STEP 4: Import root project into Eclipse/STS
Follow the project import steps listed in step 2 above to import the
root project.
Press enter when complete, and move on to the final step.
EOM
read
cat <<EOM
-----------------------------------------------------------------------
STEP 5: Enable Git support for all projects
- In the Eclipse/STS Package Explorer, select all spring* projects.
- Right-click to open the context menu and select Team > Share Project...
- In the Share Project dialog that appears, select Git and press Next
- Check "Use or create repository in parent folder of project"
- Click Finish
When complete, you'll have Git support enabled for all projects.
You're ready to code! Goodbye!
EOM
+32
View File
@@ -0,0 +1,32 @@
The following has been tested against Intellij IDEA 12.0
## Steps
_Within your locally cloned spring-framework working directory:_
1. Generate IDEA metadata with `./gradlew :spring-oxm:compileTestJava cleanIdea idea`
2. Import into IDEA as usual
3. Set the Project JDK as appropriate
4. Add git support
5. Code away
## Known issues
1. `spring-aspects` does not compile out of the box due to references to aspect types unknown to IDEA.
See http://youtrack.jetbrains.com/issue/IDEA-64446 for details. In the meantime, the 'spring-aspects'
module has been excluded from the overall project to avoid compilation errors.
2. While all JUnit tests pass from the command line with Gradle, many will fail when run from IDEA.
Resolving this is a work in progress. If attempting to run all JUnit tests from within IDEA, you will
likely need to set the following VM options to avoid out of memory errors:
-XX:MaxPermSize=2048m -Xmx2048m -XX:MaxHeapSize=2048m
## Tips
In any case, please do not check in your own generated .iml, .ipr, or .iws files.
You'll notice these files are already intentionally in .gitignore. The same policy goes for eclipse metadata.
## FAQ
Q. What about IDEA's own [Gradle support](http://confluence.jetbrains.net/display/IDEADEV/Gradle+integration)?
A. Keep an eye on http://youtrack.jetbrains.com/issue/IDEA-53476
-11
View File
@@ -1,11 +0,0 @@
{
"dependencies": {
"antora": "3.2.0-alpha.12",
"@antora/atlas-extension": "1.0.0-alpha.5",
"@antora/collector-extension": "1.0.3",
"@asciidoctor/tabs": "1.0.0-beta.6",
"@springio/antora-extensions": "1.14.12",
"fast-xml-parser": "5.7.0",
"@springio/asciidoctor-extensions": "1.0.0-alpha.18"
}
}
+29 -3
View File
@@ -1,4 +1,30 @@
plugins {
id "org.gradle.toolchains.foojay-resolver-convention" version "1.0.0"
}
rootProject.name = "spring"
include "spring-aop"
include "spring-aspects"
include "spring-beans"
include "spring-beans-groovy"
include "spring-context"
include "spring-context-support"
include "spring-core"
include "spring-expression"
include "spring-instrument"
include "spring-instrument-tomcat"
include "spring-jdbc"
include "spring-jms"
include "spring-messaging"
include "spring-orm"
include "spring-orm-hibernate4"
include "spring-oxm"
include "spring-test"
include "spring-tx"
include "spring-web"
include "spring-webmvc"
include "spring-webmvc-portlet"
include "spring-webmvc-tiles3"
include "spring-websocket"
include "spring-framework-bom"
// Exposes gradle buildSrc for IDE support
include "buildSrc"
rootProject.children.find{ it.name == "buildSrc" }.name = "spring-build-src"
@@ -0,0 +1,60 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import org.aopalliance.aop.Advice;
/**
* Base interface holding AOP <b>advice</b> (action to take at a joinpoint)
* and a filter determining the applicability of the advice (such as
* a pointcut). <i>This interface is not for use by Spring users, but to
* allow for commonality in support for different types of advice.</i>
*
* <p>Spring AOP is based around <b>around advice</b> delivered via method
* <b>interception</b>, compliant with the AOP Alliance interception API.
* The Advisor interface allows support for different types of advice,
* such as <b>before</b> and <b>after</b> advice, which need not be
* implemented using interception.
*
* @author Rod Johnson
*/
public interface Advisor {
/**
* Return the advice part of this aspect. An advice may be an
* interceptor, a before advice, a throws advice, etc.
* @return the advice that should apply if the pointcut matches
* @see org.aopalliance.intercept.MethodInterceptor
* @see BeforeAdvice
* @see ThrowsAdvice
* @see AfterReturningAdvice
*/
Advice getAdvice();
/**
* Return whether this advice is associated with a particular instance
* (for example, creating a mixin) or shared with all instances of
* the advised class obtained from the same Spring bean factory.
* <p><b>Note that this method is not currently used by the framework.</b>
* Typical Advisor implementations always return {@code true}.
* Use singleton/prototype bean definitions or appropriate programmatic
* proxy creation to ensure that Advisors have the correct lifecycle model.
* @return whether this advice is associated with a particular target instance
*/
boolean isPerInstance();
}
@@ -0,0 +1,31 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import org.aopalliance.aop.Advice;
/**
* Common marker interface for after advice,
* such as {@link AfterReturningAdvice} and {@link ThrowsAdvice}.
*
* @author Juergen Hoeller
* @since 2.0.3
* @see BeforeAdvice
*/
public interface AfterAdvice extends Advice {
}
@@ -0,0 +1,44 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import java.lang.reflect.Method;
/**
* After returning advice is invoked only on normal method return, not if an
* exception is thrown. Such advice can see the return value, but cannot change it.
*
* @author Rod Johnson
* @see MethodBeforeAdvice
* @see ThrowsAdvice
*/
public interface AfterReturningAdvice extends AfterAdvice {
/**
* Callback after a given method successfully returned.
* @param returnValue the value returned by the method, if any
* @param method method being invoked
* @param args arguments to the method
* @param target target of the method invocation. May be {@code null}.
* @throws Throwable if this object wishes to abort the call.
* Any exception thrown will be returned to the caller if it's
* allowed by the method signature. Otherwise the exception
* will be wrapped as a runtime exception.
*/
void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable;
}
@@ -0,0 +1,48 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import org.springframework.core.NestedRuntimeException;
/**
* Exception that gets thrown when an AOP invocation failed
* because of misconfiguration or unexpected runtime issues.
*
* @author Juergen Hoeller
* @since 2.0
*/
@SuppressWarnings("serial")
public class AopInvocationException extends NestedRuntimeException {
/**
* Constructor for AopInvocationException.
* @param msg the detail message
*/
public AopInvocationException(String msg) {
super(msg);
}
/**
* Constructor for AopInvocationException.
* @param msg the detail message
* @param cause the root cause
*/
public AopInvocationException(String msg, Throwable cause) {
super(msg, cause);
}
}
@@ -0,0 +1,32 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import org.aopalliance.aop.Advice;
/**
* Common marker interface for before advice, such as {@link MethodBeforeAdvice}.
*
* <p>Spring supports only method before advice. Although this is unlikely to change,
* this API is designed to allow field advice in future if desired.
*
* @author Rod Johnson
* @see AfterAdvice
*/
public interface BeforeAdvice extends Advice {
}
@@ -0,0 +1,45 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Filter that restricts matching of a pointcut or introduction to
* a given set of target classes.
*
* <p>Can be used as part of a {@link Pointcut} or for the entire
* targeting of an {@link IntroductionAdvisor}.
*
* @author Rod Johnson
* @see Pointcut
* @see MethodMatcher
*/
public interface ClassFilter {
/**
* Should the pointcut apply to the given interface or target class?
* @param clazz the candidate target class
* @return whether the advice should apply to the given target class
*/
boolean matches(Class<?> clazz);
/**
* Canonical instance of a ClassFilter that matches all classes.
*/
ClassFilter TRUE = TrueClassFilter.INSTANCE;
}
@@ -0,0 +1,48 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import org.aopalliance.aop.Advice;
/**
* Subinterface of AOP Alliance Advice that allows additional interfaces
* to be implemented by an Advice, and available via a proxy using that
* interceptor. This is a fundamental AOP concept called <b>introduction</b>.
*
* <p>Introductions are often <b>mixins</b>, enabling the building of composite
* objects that can achieve many of the goals of multiple inheritance in Java.
*
* <p>Compared to {qlink IntroductionInfo}, this interface allows an advice to
* implement a range of interfaces that is not necessarily known in advance.
* Thus an {@link IntroductionAdvisor} can be used to specify which interfaces
* will be exposed in an advised object.
*
* @author Rod Johnson
* @since 1.1.1
* @see IntroductionInfo
* @see IntroductionAdvisor
*/
public interface DynamicIntroductionAdvice extends Advice {
/**
* Does this introduction advice implement the given interface?
* @param intf the interface to check
* @return whether the advice implements the specified interface
*/
boolean implementsInterface(Class<?> intf);
}
@@ -0,0 +1,51 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Superinterface for advisors that perform one or more AOP <b>introductions</b>.
*
* <p>This interface cannot be implemented directly; subinterfaces must
* provide the advice type implementing the introduction.
*
* <p>Introduction is the implementation of additional interfaces
* (not implemented by a target) via AOP advice.
*
* @author Rod Johnson
* @since 04.04.2003
* @see IntroductionInterceptor
*/
public interface IntroductionAdvisor extends Advisor, IntroductionInfo {
/**
* Return the filter determining which target classes this introduction
* should apply to.
* <p>This represents the class part of a pointcut. Note that method
* matching doesn't make sense to introductions.
* @return the class filter
*/
ClassFilter getClassFilter();
/**
* Can the advised interfaces be implemented by the introduction advice?
* Invoked before adding an IntroductionAdvisor.
* @throws IllegalArgumentException if the advised interfaces can't be
* implemented by the introduction advice
*/
void validateInterfaces() throws IllegalArgumentException;
}
@@ -0,0 +1,44 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import java.lang.reflect.Method;
/**
* A specialized type of MethodMatcher that takes into account introductions when
* matching methods. If there are no introductions on the target class, a method
* matcher may be able to optimize matching more effectively for example.
*
* @author Adrian Colyer
* @since 2.0
*/
public interface IntroductionAwareMethodMatcher extends MethodMatcher {
/**
* Perform static checking whether the given method matches. This may be invoked
* instead of the 2-arg {@link #matches(java.lang.reflect.Method, Class)} method
* if the caller supports the extended IntroductionAwareMethodMatcher interface.
* @param method the candidate method
* @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @param hasIntroductions {@code true} if the object on whose behalf we are
* asking is the subject on one or more introductions; {@code false} otherwise
* @return whether or not this method matches statically
*/
boolean matches(Method method, Class<?> targetClass, boolean hasIntroductions);
}
@@ -0,0 +1,39 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Interface supplying the information necessary to describe an introduction.
*
* <p>{@link IntroductionAdvisor IntroductionAdvisors} must implement this
* interface. If an {@link org.aopalliance.aop.Advice} implements this,
* it may be used as an introduction without an {@link IntroductionAdvisor}.
* In this case, the advice is self-describing, providing not only the
* necessary behavior, but describing the interfaces it introduces.
*
* @author Rod Johnson
* @since 1.1.1
*/
public interface IntroductionInfo {
/**
* Return the additional interfaces introduced by this Advisor or Advice.
* @return the introduced interfaces
*/
Class<?>[] getInterfaces();
}
@@ -0,0 +1,34 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import org.aopalliance.intercept.MethodInterceptor;
/**
* Subinterface of AOP Alliance MethodInterceptor that allows additional interfaces
* to be implemented by the interceptor, and available via a proxy using that
* interceptor. This is a fundamental AOP concept called <b>introduction</b>.
*
* <p>Introductions are often <b>mixins</b>, enabling the building of composite
* objects that can achieve many of the goals of multiple inheritance in Java.
*
* @author Rod Johnson
* @see DynamicIntroductionAdvice
*/
public interface IntroductionInterceptor extends MethodInterceptor, DynamicIntroductionAdvice {
}
@@ -0,0 +1,44 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import java.lang.reflect.Method;
/**
* Advice invoked before a method is invoked. Such advices cannot
* prevent the method call proceeding, unless they throw a Throwable.
*
* @see AfterReturningAdvice
* @see ThrowsAdvice
*
* @author Rod Johnson
*/
public interface MethodBeforeAdvice extends BeforeAdvice {
/**
* Callback before a given method is invoked.
* @param method method being invoked
* @param args arguments to the method
* @param target target of the method invocation. May be {@code null}.
* @throws Throwable if this object wishes to abort the call.
* Any exception thrown will be returned to the caller if it's
* allowed by the method signature. Otherwise the exception
* will be wrapped as a runtime exception.
*/
void before(Method method, Object[] args, Object target) throws Throwable;
}
@@ -0,0 +1,97 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import java.lang.reflect.Method;
/**
* Part of a {@link Pointcut}: Checks whether the target method is eligible for advice.
*
* <p>A MethodMatcher may be evaluated <b>statically</b> or at <b>runtime</b> (dynamically).
* Static matching involves method and (possibly) method attributes. Dynamic matching
* also makes arguments for a particular call available, and any effects of running
* previous advice applying to the joinpoint.
*
* <p>If an implementation returns {@code false} from its {@link #isRuntime()}
* method, evaluation can be performed statically, and the result will be the same
* for all invocations of this method, whatever their arguments. This means that
* if the {@link #isRuntime()} method returns {@code false}, the 3-arg
* {@link #matches(java.lang.reflect.Method, Class, Object[])} method will never be invoked.
*
* <p>If an implementation returns {@code true} from its 2-arg
* {@link #matches(java.lang.reflect.Method, Class)} method and its {@link #isRuntime()} method
* returns {@code true}, the 3-arg {@link #matches(java.lang.reflect.Method, Class, Object[])}
* method will be invoked <i>immediately before each potential execution of the related advice</i>,
* to decide whether the advice should run. All previous advice, such as earlier interceptors
* in an interceptor chain, will have run, so any state changes they have produced in
* parameters or ThreadLocal state will be available at the time of evaluation.
*
* @author Rod Johnson
* @since 11.11.2003
* @see Pointcut
* @see ClassFilter
*/
public interface MethodMatcher {
/**
* Perform static checking whether the given method matches. If this
* returns {@code false} or if the {@link #isRuntime()} method
* returns {@code false}, no runtime check (i.e. no.
* {@link #matches(java.lang.reflect.Method, Class, Object[])} call) will be made.
* @param method the candidate method
* @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @return whether or not this method matches statically
*/
boolean matches(Method method, Class<?> targetClass);
/**
* Is this MethodMatcher dynamic, that is, must a final call be made on the
* {@link #matches(java.lang.reflect.Method, Class, Object[])} method at
* runtime even if the 2-arg matches method returns {@code true}?
* <p>Can be invoked when an AOP proxy is created, and need not be invoked
* again before each method invocation,
* @return whether or not a runtime match via the 3-arg
* {@link #matches(java.lang.reflect.Method, Class, Object[])} method
* is required if static matching passed
*/
boolean isRuntime();
/**
* Check whether there a runtime (dynamic) match for this method,
* which must have matched statically.
* <p>This method is invoked only if the 2-arg matches method returns
* {@code true} for the given method and target class, and if the
* {@link #isRuntime()} method returns {@code true}. Invoked
* immediately before potential running of the advice, after any
* advice earlier in the advice chain has run.
* @param method the candidate method
* @param targetClass the target class (may be {@code null}, in which case
* the candidate class must be taken to be the method's declaring class)
* @param args arguments to the method
* @return whether there's a runtime match
* @see MethodMatcher#matches(Method, Class)
*/
boolean matches(Method method, Class<?> targetClass, Object[] args);
/**
* Canonical instance that matches all methods.
*/
MethodMatcher TRUE = TrueMethodMatcher.INSTANCE;
}
@@ -0,0 +1,53 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Core Spring pointcut abstraction.
*
* <p>A pointcut is composed of a {@link ClassFilter} and a {@link MethodMatcher}.
* Both these basic terms and a Pointcut itself can be combined to build up combinations
* (e.g. through {@link org.springframework.aop.support.ComposablePointcut}).
*
* @author Rod Johnson
* @see ClassFilter
* @see MethodMatcher
* @see org.springframework.aop.support.Pointcuts
* @see org.springframework.aop.support.ClassFilters
* @see org.springframework.aop.support.MethodMatchers
*/
public interface Pointcut {
/**
* Return the ClassFilter for this pointcut.
* @return the ClassFilter (never {@code null})
*/
ClassFilter getClassFilter();
/**
* Return the MethodMatcher for this pointcut.
* @return the MethodMatcher (never {@code null})
*/
MethodMatcher getMethodMatcher();
/**
* Canonical Pointcut instance that always matches.
*/
Pointcut TRUE = TruePointcut.INSTANCE;
}
@@ -0,0 +1,33 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Superinterface for all Advisors that are driven by a pointcut.
* This covers nearly all advisors except introduction advisors,
* for which method-level matching doesn't apply.
*
* @author Rod Johnson
*/
public interface PointcutAdvisor extends Advisor {
/**
* Get the Pointcut that drives this advisor.
*/
Pointcut getPointcut();
}
@@ -0,0 +1,86 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import org.aopalliance.intercept.MethodInvocation;
/**
* Extension of the AOP Alliance {@link org.aopalliance.intercept.MethodInvocation}
* interface, allowing access to the proxy that the method invocation was made through.
*
* <p>Useful to be able to substitute return values with the proxy,
* if necessary, for example if the invocation target returned itself.
*
* @author Juergen Hoeller
* @author Adrian Colyer
* @since 1.1.3
* @see org.springframework.aop.framework.ReflectiveMethodInvocation
* @see org.springframework.aop.support.DelegatingIntroductionInterceptor
*/
public interface ProxyMethodInvocation extends MethodInvocation {
/**
* Return the proxy that this method invocation was made through.
* @return the original proxy object
*/
Object getProxy();
/**
* Create a clone of this object. If cloning is done before {@code proceed()}
* is invoked on this object, {@code proceed()} can be invoked once per clone
* to invoke the joinpoint (and the rest of the advice chain) more than once.
* @return an invocable clone of this invocation.
* {@code proceed()} can be called once per clone.
*/
MethodInvocation invocableClone();
/**
* Create a clone of this object. If cloning is done before {@code proceed()}
* is invoked on this object, {@code proceed()} can be invoked once per clone
* to invoke the joinpoint (and the rest of the advice chain) more than once.
* @param arguments the arguments that the cloned invocation is supposed to use,
* overriding the original arguments
* @return an invocable clone of this invocation.
* {@code proceed()} can be called once per clone.
*/
MethodInvocation invocableClone(Object[] arguments);
/**
* Set the arguments to be used on subsequent invocations in the any advice
* in this chain.
* @param arguments the argument array
*/
void setArguments(Object[] arguments);
/**
* Add the specified user attribute with the given value to this invocation.
* <p>Such attributes are not used within the AOP framework itself. They are
* just kept as part of the invocation object, for use in special interceptors.
* @param key the name of the attribute
* @param value the value of the attribute, or {@code null} to reset it
*/
void setUserAttribute(String key, Object value);
/**
* Return the value of the specified user attribute.
* @param key the name of the attribute
* @return the value of the attribute, or {@code null} if not set
* @see #setUserAttribute
*/
Object getUserAttribute(String key);
}
@@ -0,0 +1,37 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Marker for AOP proxy interfaces (in particular: introduction interfaces)
* that explicitly intend to return the raw target object (which would normally
* get replaced with the proxy object when returned from a method invocation).
*
* <p>Note that this is a marker interface in the style of {@link java.io.Serializable},
* semantically applying to a declared interface rather than to the full class
* of a concrete object. In other words, this marker applies to a particular
* interface only (typically an introduction interface that does not serve
* as the primary interface of an AOP proxy), and hence does not affect
* other interfaces that a concrete AOP proxy may implement.
*
* @author Juergen Hoeller
* @since 2.0.5
* @see org.springframework.aop.scope.ScopedObject
*/
public interface RawTargetAccess {
}
@@ -0,0 +1,29 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Marker interface implemented by all AOP proxies. Used to detect
* whether or not objects are Spring-generated proxies.
*
* @author Rob Harrop
* @since 2.0.1
* @see org.springframework.aop.support.AopUtils#isAopProxy(Object)
*/
public interface SpringProxy {
}
@@ -0,0 +1,39 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Minimal interface for exposing the target class behind a proxy.
*
* <p>Implemented by AOP proxy objects and proxy factories
* (via {@link org.springframework.aop.framework.Advised}}
* as well as by {@link TargetSource TargetSources}.
*
* @author Juergen Hoeller
* @since 2.0.3
* @see org.springframework.aop.support.AopUtils#getTargetClass(Object)
*/
public interface TargetClassAware {
/**
* Return the target class behind the implementing object
* (typically a proxy configuration or an actual proxy).
* @return the target Class, or {@code null} if not known
*/
Class<?> getTargetClass();
}
@@ -0,0 +1,71 @@
/*<
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* A {@code TargetSource} is used to obtain the current "target" of
* an AOP invocation, which will be invoked via reflection if no around
* advice chooses to end the interceptor chain itself.
*
* <p>If a {@code TargetSource} is "static", it will always return
* the same target, allowing optimizations in the AOP framework. Dynamic
* target sources can support pooling, hot swapping, etc.
*
* <p>Application developers don't usually need to work with
* {@code TargetSources} directly: this is an AOP framework interface.
*
* @author Rod Johnson
*/
public interface TargetSource extends TargetClassAware {
/**
* Return the type of targets returned by this {@link TargetSource}.
* <p>Can return {@code null}, although certain usages of a
* {@code TargetSource} might just work with a predetermined
* target class.
* @return the type of targets returned by this {@link TargetSource}
*/
@Override
Class<?> getTargetClass();
/**
* Will all calls to {@link #getTarget()} return the same object?
* <p>In that case, there will be no need to invoke
* {@link #releaseTarget(Object)}, and the AOP framework can cache
* the return value of {@link #getTarget()}.
* @return {@code true} if the target is immutable
* @see #getTarget
*/
boolean isStatic();
/**
* Return a target instance. Invoked immediately before the
* AOP framework calls the "target" of an AOP method invocation.
* @return the target object, which contains the joinpoint
* @throws Exception if the target object can't be resolved
*/
Object getTarget() throws Exception;
/**
* Release the given target object obtained from the
* {@link #getTarget()} method.
* @param target object obtained from a call to {@link #getTarget()}
* @throws Exception if the object can't be released
*/
void releaseTarget(Object target) throws Exception;
}
@@ -0,0 +1,53 @@
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
/**
* Tag interface for throws advice.
*
* <p>There are not any methods on this interface, as methods are invoked by
* reflection. Implementing classes must implement methods of the form:
*
* <pre class="code">void afterThrowing([Method, args, target], ThrowableSubclass);</pre>
*
* <p>Some examples of valid methods would be:
*
* <pre class="code">public void afterThrowing(Exception ex)</pre>
* <pre class="code">public void afterThrowing(RemoteException)</pre>
* <pre class="code">public void afterThrowing(Method method, Object[] args, Object target, Exception ex)</pre>
* <pre class="code">public void afterThrowing(Method method, Object[] args, Object target, ServletException ex)</pre>
*
* The first three arguments are optional, and only useful if we want further
* information about the joinpoint, as in AspectJ <b>after-throwing</b> advice.
*
* <p><b>Note:</b> If a throws-advice method throws an exception itself, it will
* override the original exception (i.e. change the exception thrown to the user).
* The overriding exception will typically be a RuntimeException; this is compatible
* with any method signature. However, if a throws-advice method throws a checked
* exception, it will have to match the declared exceptions of the target method
* and is hence to some degree coupled to specific target method signatures.
* <b>Do not throw an undeclared checked exception that is incompatible with
* the target method's signature!</b>
*
* @author Rod Johnson
* @author Juergen Hoeller
* @see AfterReturningAdvice
* @see MethodBeforeAdvice
*/
public interface ThrowsAdvice extends AfterAdvice {
}
@@ -0,0 +1,56 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import java.io.Serializable;
/**
* Canonical ClassFilter instance that matches all classes.
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TrueClassFilter implements ClassFilter, Serializable {
public static final TrueClassFilter INSTANCE = new TrueClassFilter();
/**
* Enforce Singleton pattern.
*/
private TrueClassFilter() {
}
@Override
public boolean matches(Class<?> clazz) {
return true;
}
/**
* Required to support serialization. Replaces with canonical
* instance on deserialization, protecting Singleton pattern.
* Alternative to overriding {@code equals()}.
*/
private Object readResolve() {
return INSTANCE;
}
@Override
public String toString() {
return "ClassFilter.TRUE";
}
}
@@ -0,0 +1,68 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import java.io.Serializable;
import java.lang.reflect.Method;
/**
* Canonical MethodMatcher instance that matches all methods.
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TrueMethodMatcher implements MethodMatcher, Serializable {
public static final TrueMethodMatcher INSTANCE = new TrueMethodMatcher();
/**
* Enforce Singleton pattern.
*/
private TrueMethodMatcher() {
}
@Override
public boolean isRuntime() {
return false;
}
@Override
public boolean matches(Method method, Class<?> targetClass) {
return true;
}
@Override
public boolean matches(Method method, Class<?> targetClass, Object[] args) {
// Should never be invoked as isRuntime returns false.
throw new UnsupportedOperationException();
}
/**
* Required to support serialization. Replaces with canonical
* instance on deserialization, protecting Singleton pattern.
* Alternative to overriding {@code equals()}.
*/
private Object readResolve() {
return INSTANCE;
}
@Override
public String toString() {
return "MethodMatcher.TRUE";
}
}
@@ -0,0 +1,61 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop;
import java.io.Serializable;
/**
* Canonical Pointcut instance that always matches.
*
* @author Rod Johnson
*/
@SuppressWarnings("serial")
class TruePointcut implements Pointcut, Serializable {
public static final TruePointcut INSTANCE = new TruePointcut();
/**
* Enforce Singleton pattern.
*/
private TruePointcut() {
}
@Override
public ClassFilter getClassFilter() {
return ClassFilter.TRUE;
}
@Override
public MethodMatcher getMethodMatcher() {
return MethodMatcher.TRUE;
}
/**
* Required to support serialization. Replaces with canonical
* instance on deserialization, protecting Singleton pattern.
* Alternative to overriding {@code equals()}.
*/
private Object readResolve() {
return INSTANCE;
}
@Override
public String toString() {
return "Pointcut.TRUE";
}
}
@@ -0,0 +1,704 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.HashMap;
import java.util.Map;
import org.aopalliance.aop.Advice;
import org.aopalliance.intercept.MethodInvocation;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.weaver.tools.JoinPointMatch;
import org.aspectj.weaver.tools.PointcutParameter;
import org.springframework.aop.AopInvocationException;
import org.springframework.aop.MethodMatcher;
import org.springframework.aop.Pointcut;
import org.springframework.aop.ProxyMethodInvocation;
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
import org.springframework.aop.support.ComposablePointcut;
import org.springframework.aop.support.MethodMatchers;
import org.springframework.aop.support.StaticMethodMatcher;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
/**
* Base class for AOP Alliance {@link org.aopalliance.aop.Advice} classes
* wrapping an AspectJ aspect or an AspectJ-annotated advice method.
*
* @author Rod Johnson
* @author Adrian Colyer
* @author Juergen Hoeller
* @author Ramnivas Laddad
* @since 2.0
*/
public abstract class AbstractAspectJAdvice implements Advice, AspectJPrecedenceInformation {
/**
* Key used in ReflectiveMethodInvocation userAtributes map for the current joinpoint.
*/
protected static final String JOIN_POINT_KEY = JoinPoint.class.getName();
/**
* Lazily instantiate joinpoint for the current invocation.
* Requires MethodInvocation to be bound with ExposeInvocationInterceptor.
* <p>Do not use if access is available to the current ReflectiveMethodInvocation
* (in an around advice).
* @return current AspectJ joinpoint, or through an exception if we're not in a
* Spring AOP invocation.
*/
public static JoinPoint currentJoinPoint() {
MethodInvocation mi = ExposeInvocationInterceptor.currentInvocation();
if (!(mi instanceof ProxyMethodInvocation)) {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
}
ProxyMethodInvocation pmi = (ProxyMethodInvocation) mi;
JoinPoint jp = (JoinPoint) pmi.getUserAttribute(JOIN_POINT_KEY);
if (jp == null) {
jp = new MethodInvocationProceedingJoinPoint(pmi);
pmi.setUserAttribute(JOIN_POINT_KEY, jp);
}
return jp;
}
protected final Method aspectJAdviceMethod;
/** The total number of arguments we have to populate on advice dispatch */
private final int adviceInvocationArgumentCount;
private final AspectJExpressionPointcut pointcut;
private final AspectInstanceFactory aspectInstanceFactory;
/**
* The name of the aspect (ref bean) in which this advice was defined (used
* when determining advice precedence so that we can determine
* whether two pieces of advice come from the same aspect).
*/
private String aspectName;
/**
* The order of declaration of this advice within the aspect.
*/
private int declarationOrder;
/**
* This will be non-null if the creator of this advice object knows the argument names
* and sets them explicitly
*/
private String[] argumentNames = null;
/** Non-null if after throwing advice binds the thrown value */
private String throwingName = null;
/** Non-null if after returning advice binds the return value */
private String returningName = null;
private Class<?> discoveredReturningType = Object.class;
private Class<?> discoveredThrowingType = Object.class;
/**
* Index for thisJoinPoint argument (currently only
* supported at index 0 if present at all)
*/
private int joinPointArgumentIndex = -1;
/**
* Index for thisJoinPointStaticPart argument (currently only
* supported at index 0 if present at all)
*/
private int joinPointStaticPartArgumentIndex = -1;
private Map<String, Integer> argumentBindings = null;
private boolean argumentsIntrospected = false;
private Type discoveredReturningGenericType;
// Note: Unlike return type, no such generic information is needed for the throwing type,
// since Java doesn't allow exception types to be parameterized.
/**
* Create a new AbstractAspectJAdvice for the given advice method.
* @param aspectJAdviceMethod the AspectJ-style advice method
* @param pointcut the AspectJ expression pointcut
* @param aspectInstanceFactory the factory for aspect instances
*/
public AbstractAspectJAdvice(
Method aspectJAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aspectInstanceFactory) {
Assert.notNull(aspectJAdviceMethod, "Advice method must not be null");
this.aspectJAdviceMethod = aspectJAdviceMethod;
this.adviceInvocationArgumentCount = this.aspectJAdviceMethod.getParameterTypes().length;
this.pointcut = pointcut;
this.aspectInstanceFactory = aspectInstanceFactory;
}
/**
* Return the AspectJ-style advice method.
*/
public final Method getAspectJAdviceMethod() {
return this.aspectJAdviceMethod;
}
/**
* Return the AspectJ expression pointcut.
*/
public final AspectJExpressionPointcut getPointcut() {
calculateArgumentBindings();
return this.pointcut;
}
/**
* Build a 'safe' pointcut that excludes the AspectJ advice method itself.
* @return a composable pointcut that builds on the original AspectJ expression pointcut
* @see #getPointcut()
*/
public final Pointcut buildSafePointcut() {
Pointcut pc = getPointcut();
MethodMatcher safeMethodMatcher = MethodMatchers.intersection(
new AdviceExcludingMethodMatcher(this.aspectJAdviceMethod), pc.getMethodMatcher());
return new ComposablePointcut(pc.getClassFilter(), safeMethodMatcher);
}
/**
* Return the factory for aspect instances.
*/
public final AspectInstanceFactory getAspectInstanceFactory() {
return this.aspectInstanceFactory;
}
/**
* Return the ClassLoader for aspect instances.
*/
public final ClassLoader getAspectClassLoader() {
return this.aspectInstanceFactory.getAspectClassLoader();
}
@Override
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
public void setAspectName(String name) {
this.aspectName = name;
}
@Override
public String getAspectName() {
return this.aspectName;
}
/**
* Sets the <b>declaration order</b> of this advice within the aspect
*/
public void setDeclarationOrder(int order) {
this.declarationOrder = order;
}
@Override
public int getDeclarationOrder() {
return this.declarationOrder;
}
/**
* Set by creator of this advice object if the argument names are known.
* <p>This could be for example because they have been explicitly specified in XML,
* or in an advice annotation.
* @param argNames comma delimited list of arg names
*/
public void setArgumentNames(String argNames) {
String[] tokens = StringUtils.commaDelimitedListToStringArray(argNames);
setArgumentNamesFromStringArray(tokens);
}
public void setArgumentNamesFromStringArray(String[] args) {
this.argumentNames = new String[args.length];
for (int i = 0; i < args.length; i++) {
this.argumentNames[i] = StringUtils.trimWhitespace(args[i]);
if (!isVariableName(this.argumentNames[i])) {
throw new IllegalArgumentException(
"'argumentNames' property of AbstractAspectJAdvice contains an argument name '" +
this.argumentNames[i] + "' that is not a valid Java identifier");
}
}
if (argumentNames != null) {
if (aspectJAdviceMethod.getParameterTypes().length == argumentNames.length + 1) {
// May need to add implicit join point arg name...
Class<?> firstArgType = aspectJAdviceMethod.getParameterTypes()[0];
if (firstArgType == JoinPoint.class ||
firstArgType == ProceedingJoinPoint.class ||
firstArgType == JoinPoint.StaticPart.class) {
String[] oldNames = argumentNames;
argumentNames = new String[oldNames.length + 1];
argumentNames[0] = "THIS_JOIN_POINT";
System.arraycopy(oldNames, 0, argumentNames, 1, oldNames.length);
}
}
}
}
public void setReturningName(String name) {
throw new UnsupportedOperationException("Only afterReturning advice can be used to bind a return value");
}
/**
* We need to hold the returning name at this level for argument binding calculations,
* this method allows the afterReturning advice subclass to set the name.
*/
protected void setReturningNameNoCheck(String name) {
// name could be a variable or a type...
if (isVariableName(name)) {
this.returningName = name;
}
else {
// assume a type
try {
this.discoveredReturningType = ClassUtils.forName(name, getAspectClassLoader());
}
catch (Throwable ex) {
throw new IllegalArgumentException("Returning name '" + name +
"' is neither a valid argument name nor the fully-qualified name of a Java type on the classpath. " +
"Root cause: " + ex);
}
}
}
protected Class<?> getDiscoveredReturningType() {
return this.discoveredReturningType;
}
protected Type getDiscoveredReturningGenericType() {
return this.discoveredReturningGenericType;
}
public void setThrowingName(String name) {
throw new UnsupportedOperationException("Only afterThrowing advice can be used to bind a thrown exception");
}
/**
* We need to hold the throwing name at this level for argument binding calculations,
* this method allows the afterThrowing advice subclass to set the name.
*/
protected void setThrowingNameNoCheck(String name) {
// name could be a variable or a type...
if (isVariableName(name)) {
this.throwingName = name;
}
else {
// assume a type
try {
this.discoveredThrowingType = ClassUtils.forName(name, getAspectClassLoader());
}
catch (Throwable ex) {
throw new IllegalArgumentException("Throwing name '" + name +
"' is neither a valid argument name nor the fully-qualified name of a Java type on the classpath. " +
"Root cause: " + ex);
}
}
}
protected Class<?> getDiscoveredThrowingType() {
return this.discoveredThrowingType;
}
private boolean isVariableName(String name) {
char[] chars = name.toCharArray();
if (!Character.isJavaIdentifierStart(chars[0])) {
return false;
}
for (int i = 1; i < chars.length; i++) {
if (!Character.isJavaIdentifierPart(chars[i])) {
return false;
}
}
return true;
}
/**
* Do as much work as we can as part of the set-up so that argument binding
* on subsequent advice invocations can be as fast as possible.
* <p>If the first argument is of type JoinPoint or ProceedingJoinPoint then we
* pass a JoinPoint in that position (ProceedingJoinPoint for around advice).
* <p>If the first argument is of type {@code JoinPoint.StaticPart}
* then we pass a {@code JoinPoint.StaticPart} in that position.
* <p>Remaining arguments have to be bound by pointcut evaluation at
* a given join point. We will get back a map from argument name to
* value. We need to calculate which advice parameter needs to be bound
* to which argument name. There are multiple strategies for determining
* this binding, which are arranged in a ChainOfResponsibility.
*/
public synchronized final void calculateArgumentBindings() {
// The simple case... nothing to bind.
if (this.argumentsIntrospected || this.adviceInvocationArgumentCount == 0) {
return;
}
int numUnboundArgs = this.adviceInvocationArgumentCount;
Class<?>[] parameterTypes = this.aspectJAdviceMethod.getParameterTypes();
if (maybeBindJoinPoint(parameterTypes[0]) || maybeBindProceedingJoinPoint(parameterTypes[0])) {
numUnboundArgs--;
}
else if (maybeBindJoinPointStaticPart(parameterTypes[0])) {
numUnboundArgs--;
}
if (numUnboundArgs > 0) {
// need to bind arguments by name as returned from the pointcut match
bindArgumentsByName(numUnboundArgs);
}
this.argumentsIntrospected = true;
}
private boolean maybeBindJoinPoint(Class<?> candidateParameterType) {
if (candidateParameterType.equals(JoinPoint.class)) {
this.joinPointArgumentIndex = 0;
return true;
}
else {
return false;
}
}
private boolean maybeBindProceedingJoinPoint(Class<?> candidateParameterType) {
if (candidateParameterType.equals(ProceedingJoinPoint.class)) {
if (!supportsProceedingJoinPoint()) {
throw new IllegalArgumentException("ProceedingJoinPoint is only supported for around advice");
}
this.joinPointArgumentIndex = 0;
return true;
}
else {
return false;
}
}
protected boolean supportsProceedingJoinPoint() {
return false;
}
private boolean maybeBindJoinPointStaticPart(Class<?> candidateParameterType) {
if (candidateParameterType.equals(JoinPoint.StaticPart.class)) {
this.joinPointStaticPartArgumentIndex = 0;
return true;
}
else {
return false;
}
}
private void bindArgumentsByName(int numArgumentsExpectingToBind) {
if (this.argumentNames == null) {
this.argumentNames = createParameterNameDiscoverer().getParameterNames(this.aspectJAdviceMethod);
}
if (this.argumentNames != null) {
// We have been able to determine the arg names.
bindExplicitArguments(numArgumentsExpectingToBind);
}
else {
throw new IllegalStateException("Advice method [" + this.aspectJAdviceMethod.getName() + "] " +
"requires " + numArgumentsExpectingToBind + " arguments to be bound by name, but " +
"the argument names were not specified and could not be discovered.");
}
}
/**
* Create a ParameterNameDiscoverer to be used for argument binding.
* <p>The default implementation creates a {@link DefaultParameterNameDiscoverer}
* and adds a specifically configured {@link AspectJAdviceParameterNameDiscoverer}.
*/
protected ParameterNameDiscoverer createParameterNameDiscoverer() {
// We need to discover them, or if that fails, guess,
// and if we can't guess with 100% accuracy, fail.
DefaultParameterNameDiscoverer discoverer = new DefaultParameterNameDiscoverer();
AspectJAdviceParameterNameDiscoverer adviceParameterNameDiscoverer =
new AspectJAdviceParameterNameDiscoverer(this.pointcut.getExpression());
adviceParameterNameDiscoverer.setReturningName(this.returningName);
adviceParameterNameDiscoverer.setThrowingName(this.throwingName);
// Last in chain, so if we're called and we fail, that's bad...
adviceParameterNameDiscoverer.setRaiseExceptions(true);
discoverer.addDiscoverer(adviceParameterNameDiscoverer);
return discoverer;
}
private void bindExplicitArguments(int numArgumentsLeftToBind) {
this.argumentBindings = new HashMap<String, Integer>();
int numExpectedArgumentNames = this.aspectJAdviceMethod.getParameterTypes().length;
if (this.argumentNames.length != numExpectedArgumentNames) {
throw new IllegalStateException("Expecting to find " + numExpectedArgumentNames
+ " arguments to bind by name in advice, but actually found " +
this.argumentNames.length + " arguments.");
}
// So we match in number...
int argumentIndexOffset = this.adviceInvocationArgumentCount - numArgumentsLeftToBind;
for (int i = argumentIndexOffset; i < this.argumentNames.length; i++) {
this.argumentBindings.put(this.argumentNames[i], i);
}
// Check that returning and throwing were in the argument names list if
// specified, and find the discovered argument types.
if (this.returningName != null) {
if (!this.argumentBindings.containsKey(this.returningName)) {
throw new IllegalStateException("Returning argument name '"
+ this.returningName + "' was not bound in advice arguments");
}
else {
Integer index = this.argumentBindings.get(this.returningName);
this.discoveredReturningType = this.aspectJAdviceMethod.getParameterTypes()[index];
this.discoveredReturningGenericType = this.aspectJAdviceMethod.getGenericParameterTypes()[index];
}
}
if (this.throwingName != null) {
if (!this.argumentBindings.containsKey(this.throwingName)) {
throw new IllegalStateException("Throwing argument name '"
+ this.throwingName + "' was not bound in advice arguments");
}
else {
Integer index = this.argumentBindings.get(this.throwingName);
this.discoveredThrowingType = this.aspectJAdviceMethod.getParameterTypes()[index];
}
}
// configure the pointcut expression accordingly.
configurePointcutParameters(argumentIndexOffset);
}
/**
* All parameters from argumentIndexOffset onwards are candidates for
* pointcut parameters - but returning and throwing vars are handled differently
* and must be removed from the list if present.
*/
private void configurePointcutParameters(int argumentIndexOffset) {
int numParametersToRemove = argumentIndexOffset;
if (this.returningName != null) {
numParametersToRemove++;
}
if (this.throwingName != null) {
numParametersToRemove++;
}
String[] pointcutParameterNames = new String[this.argumentNames.length - numParametersToRemove];
Class<?>[] pointcutParameterTypes = new Class<?>[pointcutParameterNames.length];
Class<?>[] methodParameterTypes = this.aspectJAdviceMethod.getParameterTypes();
int index = 0;
for (int i = 0; i < this.argumentNames.length; i++) {
if (i < argumentIndexOffset) {
continue;
}
if (this.argumentNames[i].equals(this.returningName) ||
this.argumentNames[i].equals(this.throwingName)) {
continue;
}
pointcutParameterNames[index] = this.argumentNames[i];
pointcutParameterTypes[index] = methodParameterTypes[i];
index++;
}
this.pointcut.setParameterNames(pointcutParameterNames);
this.pointcut.setParameterTypes(pointcutParameterTypes);
}
/**
* Take the arguments at the method execution join point and output a set of arguments
* to the advice method
* @param jp the current JoinPoint
* @param jpMatch the join point match that matched this execution join point
* @param returnValue the return value from the method execution (may be null)
* @param ex the exception thrown by the method execution (may be null)
* @return the empty array if there are no arguments
*/
protected Object[] argBinding(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable ex) {
calculateArgumentBindings();
// AMC start
Object[] adviceInvocationArgs = new Object[this.adviceInvocationArgumentCount];
int numBound = 0;
if (this.joinPointArgumentIndex != -1) {
adviceInvocationArgs[this.joinPointArgumentIndex] = jp;
numBound++;
}
else if (this.joinPointStaticPartArgumentIndex != -1) {
adviceInvocationArgs[this.joinPointStaticPartArgumentIndex] = jp.getStaticPart();
numBound++;
}
if (!CollectionUtils.isEmpty(this.argumentBindings)) {
// binding from pointcut match
if (jpMatch != null) {
PointcutParameter[] parameterBindings = jpMatch.getParameterBindings();
for (PointcutParameter parameter : parameterBindings) {
String name = parameter.getName();
Integer index = this.argumentBindings.get(name);
adviceInvocationArgs[index] = parameter.getBinding();
numBound++;
}
}
// binding from returning clause
if (this.returningName != null) {
Integer index = this.argumentBindings.get(this.returningName);
adviceInvocationArgs[index] = returnValue;
numBound++;
}
// binding from thrown exception
if (this.throwingName != null) {
Integer index = this.argumentBindings.get(this.throwingName);
adviceInvocationArgs[index] = ex;
numBound++;
}
}
if (numBound != this.adviceInvocationArgumentCount) {
throw new IllegalStateException("Required to bind " + this.adviceInvocationArgumentCount
+ " arguments, but only bound " + numBound + " (JoinPointMatch " +
(jpMatch == null ? "was NOT" : "WAS") +
" bound in invocation)");
}
return adviceInvocationArgs;
}
/**
* Invoke the advice method.
* @param jpMatch the JoinPointMatch that matched this execution join point
* @param returnValue the return value from the method execution (may be null)
* @param ex the exception thrown by the method execution (may be null)
* @return the invocation result
* @throws Throwable in case of invocation failure
*/
protected Object invokeAdviceMethod(JoinPointMatch jpMatch, Object returnValue, Throwable ex) throws Throwable {
return invokeAdviceMethodWithGivenArgs(argBinding(getJoinPoint(), jpMatch, returnValue, ex));
}
// As above, but in this case we are given the join point.
protected Object invokeAdviceMethod(JoinPoint jp, JoinPointMatch jpMatch, Object returnValue, Throwable t)
throws Throwable {
return invokeAdviceMethodWithGivenArgs(argBinding(jp, jpMatch, returnValue, t));
}
protected Object invokeAdviceMethodWithGivenArgs(Object[] args) throws Throwable {
Object[] actualArgs = args;
if (this.aspectJAdviceMethod.getParameterTypes().length == 0) {
actualArgs = null;
}
try {
ReflectionUtils.makeAccessible(this.aspectJAdviceMethod);
// TODO AopUtils.invokeJoinpointUsingReflection
return this.aspectJAdviceMethod.invoke(this.aspectInstanceFactory.getAspectInstance(), actualArgs);
}
catch (IllegalArgumentException ex) {
throw new AopInvocationException("Mismatch on arguments to advice method [" +
this.aspectJAdviceMethod + "]; pointcut expression [" +
this.pointcut.getPointcutExpression() + "]", ex);
}
catch (InvocationTargetException ex) {
throw ex.getTargetException();
}
}
/**
* Overridden in around advice to return proceeding join point.
*/
protected JoinPoint getJoinPoint() {
return currentJoinPoint();
}
/**
* Get the current join point match at the join point we are being dispatched on.
*/
protected JoinPointMatch getJoinPointMatch() {
MethodInvocation mi = ExposeInvocationInterceptor.currentInvocation();
if (!(mi instanceof ProxyMethodInvocation)) {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
}
return getJoinPointMatch((ProxyMethodInvocation) mi);
}
// Note: We can't use JoinPointMatch.getClass().getName() as the key, since
// Spring AOP does all the matching at a join point, and then all the invocations.
// Under this scenario, if we just use JoinPointMatch as the key, then
// 'last man wins' which is not what we want at all.
// Using the expression is guaranteed to be safe, since 2 identical expressions
// are guaranteed to bind in exactly the same way.
protected JoinPointMatch getJoinPointMatch(ProxyMethodInvocation pmi) {
return (JoinPointMatch) pmi.getUserAttribute(this.pointcut.getExpression());
}
@Override
public String toString() {
return getClass().getName() + ": advice method [" + this.aspectJAdviceMethod + "]; " +
"aspect name '" + this.aspectName + "'";
}
/**
* MethodMatcher that excludes the specified advice method.
* @see AbstractAspectJAdvice#buildSafePointcut()
*/
private static class AdviceExcludingMethodMatcher extends StaticMethodMatcher {
private final Method adviceMethod;
public AdviceExcludingMethodMatcher(Method adviceMethod) {
this.adviceMethod = adviceMethod;
}
@Override
public boolean matches(Method method, Class<?> targetClass) {
return !this.adviceMethod.equals(method);
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof AdviceExcludingMethodMatcher)) {
return false;
}
AdviceExcludingMethodMatcher otherMm = (AdviceExcludingMethodMatcher) other;
return this.adviceMethod.equals(otherMm.adviceMethod);
}
@Override
public int hashCode() {
return this.adviceMethod.hashCode();
}
}
}
@@ -0,0 +1,47 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.springframework.core.Ordered;
/**
* Interface implemented to provide an instance of an AspectJ aspect.
* Decouples from Spring's bean factory.
*
* <p>Extends the {@link org.springframework.core.Ordered} interface
* to express an order value for the underlying aspect in a chain.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
* @see org.springframework.beans.factory.BeanFactory#getBean
*/
public interface AspectInstanceFactory extends Ordered {
/**
* Create an instance of this factory's aspect.
* @return the aspect instance (never {@code null})
*/
Object getAspectInstance();
/**
* Expose the aspect class loader that this factory uses.
* @return the aspect class loader (never {@code null})
*/
ClassLoader getAspectClassLoader();
}
@@ -0,0 +1,804 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.weaver.tools.PointcutParser;
import org.aspectj.weaver.tools.PointcutPrimitive;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.util.StringUtils;
/**
* {@link ParameterNameDiscoverer} implementation that tries to deduce parameter names
* for an advice method from the pointcut expression, returning, and throwing clauses.
* If an unambiguous interpretation is not available, it returns {@code null}.
*
* <p>This class interprets arguments in the following way:
* <ol>
* <li>If the first parameter of the method is of type {@link JoinPoint}
* or {@link ProceedingJoinPoint}, it is assumed to be for passing
* {@code thisJoinPoint} to the advice, and the parameter name will
* be assigned the value {@code "thisJoinPoint"}.</li>
* <li>If the first parameter of the method is of type
* {@code JoinPoint.StaticPart}, it is assumed to be for passing
* {@code "thisJoinPointStaticPart"} to the advice, and the parameter name
* will be assigned the value {@code "thisJoinPointStaticPart"}.</li>
* <li>If a {@link #setThrowingName(String) throwingName} has been set, and
* there are no unbound arguments of type {@code Throwable+}, then an
* {@link IllegalArgumentException} is raised. If there is more than one
* unbound argument of type {@code Throwable+}, then an
* {@link AmbiguousBindingException} is raised. If there is exactly one
* unbound argument of type {@code Throwable+}, then the corresponding
* parameter name is assigned the value &lt;throwingName&gt;.</li>
* <li>If there remain unbound arguments, then the pointcut expression is
* examined. Let {@code a} be the number of annotation-based pointcut
* expressions (&#64;annotation, &#64;this, &#64;target, &#64;args,
* &#64;within, &#64;withincode) that are used in binding form. Usage in
* binding form has itself to be deduced: if the expression inside the
* pointcut is a single string literal that meets Java variable name
* conventions it is assumed to be a variable name. If {@code a} is
* zero we proceed to the next stage. If {@code a} &gt; 1 then an
* {@code AmbiguousBindingException} is raised. If {@code a} == 1,
* and there are no unbound arguments of type {@code Annotation+},
* then an {@code IllegalArgumentException} is raised. if there is
* exactly one such argument, then the corresponding parameter name is
* assigned the value from the pointcut expression.</li>
* <li>If a returningName has been set, and there are no unbound arguments
* then an {@code IllegalArgumentException} is raised. If there is
* more than one unbound argument then an
* {@code AmbiguousBindingException} is raised. If there is exactly
* one unbound argument then the corresponding parameter name is assigned
* the value &lt;returningName&gt;.</li>
* <li>If there remain unbound arguments, then the pointcut expression is
* examined once more for {@code this}, {@code target}, and
* {@code args} pointcut expressions used in the binding form (binding
* forms are deduced as described for the annotation based pointcuts). If
* there remains more than one unbound argument of a primitive type (which
* can only be bound in {@code args}) then an
* {@code AmbiguousBindingException} is raised. If there is exactly
* one argument of a primitive type, then if exactly one {@code args}
* bound variable was found, we assign the corresponding parameter name
* the variable name. If there were no {@code args} bound variables
* found an {@code IllegalStateException} is raised. If there are
* multiple {@code args} bound variables, an
* {@code AmbiguousBindingException} is raised. At this point, if
* there remains more than one unbound argument we raise an
* {@code AmbiguousBindingException}. If there are no unbound arguments
* remaining, we are done. If there is exactly one unbound argument
* remaining, and only one candidate variable name unbound from
* {@code this}, {@code target}, or {@code args}, it is
* assigned as the corresponding parameter name. If there are multiple
* possibilities, an {@code AmbiguousBindingException} is raised.</li>
* </ol>
*
* <p>The behavior on raising an {@code IllegalArgumentException} or
* {@code AmbiguousBindingException} is configurable to allow this discoverer
* to be used as part of a chain-of-responsibility. By default the condition will
* be logged and the {@code getParameterNames(..)} method will simply return
* {@code null}. If the {@link #setRaiseExceptions(boolean) raiseExceptions}
* property is set to {@code true}, the conditions will be thrown as
* {@code IllegalArgumentException} and {@code AmbiguousBindingException},
* respectively.
*
* <p>Was that perfectly clear? ;)
*
* <p>Short version: If an unambiguous binding can be deduced, then it is.
* If the advice requirements cannot possibly be satisfied, then {@code null}
* is returned. By setting the {@link #setRaiseExceptions(boolean) raiseExceptions}
* property to {@code true}, descriptive exceptions will be thrown instead of
* returning {@code null} in the case that the parameter names cannot be discovered.
*
* @author Adrian Colyer
* @since 2.0
*/
public class AspectJAdviceParameterNameDiscoverer implements ParameterNameDiscoverer {
private static final String THIS_JOIN_POINT = "thisJoinPoint";
private static final String THIS_JOIN_POINT_STATIC_PART = "thisJoinPointStaticPart";
// Steps in the binding algorithm...
private static final int STEP_JOIN_POINT_BINDING = 1;
private static final int STEP_THROWING_BINDING = 2;
private static final int STEP_ANNOTATION_BINDING = 3;
private static final int STEP_RETURNING_BINDING = 4;
private static final int STEP_PRIMITIVE_ARGS_BINDING = 5;
private static final int STEP_THIS_TARGET_ARGS_BINDING = 6;
private static final int STEP_REFERENCE_PCUT_BINDING = 7;
private static final int STEP_FINISHED = 8;
private static final Set<String> singleValuedAnnotationPcds = new HashSet<String>();
private static final Set<String> nonReferencePointcutTokens = new HashSet<String>();
static {
singleValuedAnnotationPcds.add("@this");
singleValuedAnnotationPcds.add("@target");
singleValuedAnnotationPcds.add("@within");
singleValuedAnnotationPcds.add("@withincode");
singleValuedAnnotationPcds.add("@annotation");
Set<PointcutPrimitive> pointcutPrimitives = PointcutParser.getAllSupportedPointcutPrimitives();
for (PointcutPrimitive primitive : pointcutPrimitives) {
nonReferencePointcutTokens.add(primitive.getName());
}
nonReferencePointcutTokens.add("&&");
nonReferencePointcutTokens.add("!");
nonReferencePointcutTokens.add("||");
nonReferencePointcutTokens.add("and");
nonReferencePointcutTokens.add("or");
nonReferencePointcutTokens.add("not");
}
private boolean raiseExceptions;
/**
* If the advice is afterReturning, and binds the return value, this is the parameter name used.
*/
private String returningName;
/**
* If the advice is afterThrowing, and binds the thrown value, this is the parameter name used.
*/
private String throwingName;
/**
* The pointcut expression associated with the advice, as a simple String.
*/
private String pointcutExpression;
private Class<?>[] argumentTypes;
private String[] parameterNameBindings;
private int numberOfRemainingUnboundArguments;
/**
* Create a new discoverer that attempts to discover parameter names
* from the given pointcut expression.
*/
public AspectJAdviceParameterNameDiscoverer(String pointcutExpression) {
this.pointcutExpression = pointcutExpression;
}
/**
* Indicate whether {@link IllegalArgumentException} and {@link AmbiguousBindingException}
* must be thrown as appropriate in the case of failing to deduce advice parameter names.
* @param raiseExceptions {@code true} if exceptions are to be thrown
*/
public void setRaiseExceptions(boolean raiseExceptions) {
this.raiseExceptions = raiseExceptions;
}
/**
* If {@code afterReturning} advice binds the return value, the
* returning variable name must be specified.
* @param returningName the name of the returning variable
*/
public void setReturningName(String returningName) {
this.returningName = returningName;
}
/**
* If {@code afterThrowing} advice binds the thrown value, the
* throwing variable name must be specified.
* @param throwingName the name of the throwing variable
*/
public void setThrowingName(String throwingName) {
this.throwingName = throwingName;
}
/**
* Deduce the parameter names for an advice method.
* <p>See the {@link AspectJAdviceParameterNameDiscoverer class level javadoc}
* for this class for details of the algorithm used.
* @param method the target {@link Method}
* @return the parameter names
*/
@Override
public String[] getParameterNames(Method method) {
this.argumentTypes = method.getParameterTypes();
this.numberOfRemainingUnboundArguments = this.argumentTypes.length;
this.parameterNameBindings = new String[this.numberOfRemainingUnboundArguments];
int minimumNumberUnboundArgs = 0;
if (this.returningName != null) {
minimumNumberUnboundArgs++;
}
if (this.throwingName != null) {
minimumNumberUnboundArgs++;
}
if (this.numberOfRemainingUnboundArguments < minimumNumberUnboundArgs) {
throw new IllegalStateException(
"Not enough arguments in method to satisfy binding of returning and throwing variables");
}
try {
int algorithmicStep = STEP_JOIN_POINT_BINDING;
while ((this.numberOfRemainingUnboundArguments > 0) && algorithmicStep < STEP_FINISHED) {
switch (algorithmicStep++) {
case STEP_JOIN_POINT_BINDING:
if (!maybeBindThisJoinPoint()) {
maybeBindThisJoinPointStaticPart();
}
break;
case STEP_THROWING_BINDING:
maybeBindThrowingVariable();
break;
case STEP_ANNOTATION_BINDING:
maybeBindAnnotationsFromPointcutExpression();
break;
case STEP_RETURNING_BINDING:
maybeBindReturningVariable();
break;
case STEP_PRIMITIVE_ARGS_BINDING:
maybeBindPrimitiveArgsFromPointcutExpression();
break;
case STEP_THIS_TARGET_ARGS_BINDING:
maybeBindThisOrTargetOrArgsFromPointcutExpression();
break;
case STEP_REFERENCE_PCUT_BINDING:
maybeBindReferencePointcutParameter();
break;
default:
throw new IllegalStateException("Unknown algorithmic step: " + (algorithmicStep - 1));
}
}
}
catch (AmbiguousBindingException ambigEx) {
if (this.raiseExceptions) {
throw ambigEx;
}
else {
return null;
}
}
catch (IllegalArgumentException ex) {
if (this.raiseExceptions) {
throw ex;
}
else {
return null;
}
}
if (this.numberOfRemainingUnboundArguments == 0) {
return this.parameterNameBindings;
}
else {
if (this.raiseExceptions) {
throw new IllegalStateException("Failed to bind all argument names: " +
this.numberOfRemainingUnboundArguments + " argument(s) could not be bound");
}
else {
// convention for failing is to return null, allowing participation in a chain of responsibility
return null;
}
}
}
/**
* An advice method can never be a constructor in Spring.
* @return {@code null}
* @throws UnsupportedOperationException if
* {@link #setRaiseExceptions(boolean) raiseExceptions} has been set to {@code true}
*/
@Override
public String[] getParameterNames(Constructor<?> ctor) {
if (this.raiseExceptions) {
throw new UnsupportedOperationException("An advice method can never be a constructor");
}
else {
// we return null rather than throw an exception so that we behave well
// in a chain-of-responsibility.
return null;
}
}
private void bindParameterName(int index, String name) {
this.parameterNameBindings[index] = name;
this.numberOfRemainingUnboundArguments--;
}
/**
* If the first parameter is of type JoinPoint or ProceedingJoinPoint,bind "thisJoinPoint" as
* parameter name and return true, else return false.
*/
private boolean maybeBindThisJoinPoint() {
if ((this.argumentTypes[0] == JoinPoint.class) || (this.argumentTypes[0] == ProceedingJoinPoint.class)) {
bindParameterName(0, THIS_JOIN_POINT);
return true;
}
else {
return false;
}
}
private void maybeBindThisJoinPointStaticPart() {
if (this.argumentTypes[0] == JoinPoint.StaticPart.class) {
bindParameterName(0, THIS_JOIN_POINT_STATIC_PART);
}
}
/**
* If a throwing name was specified and there is exactly one choice remaining
* (argument that is a subtype of Throwable) then bind it.
*/
private void maybeBindThrowingVariable() {
if (this.throwingName == null) {
return;
}
// So there is binding work to do...
int throwableIndex = -1;
for (int i = 0; i < this.argumentTypes.length; i++) {
if (isUnbound(i) && isSubtypeOf(Throwable.class, i)) {
if (throwableIndex == -1) {
throwableIndex = i;
}
else {
// Second candidate we've found - ambiguous binding
throw new AmbiguousBindingException("Binding of throwing parameter '" +
this.throwingName + "' is ambiguous: could be bound to argument " +
throwableIndex + " or argument " + i);
}
}
}
if (throwableIndex == -1) {
throw new IllegalStateException("Binding of throwing parameter '" + this.throwingName
+ "' could not be completed as no available arguments are a subtype of Throwable");
}
else {
bindParameterName(throwableIndex, this.throwingName);
}
}
/**
* If a returning variable was specified and there is only one choice remaining, bind it.
*/
private void maybeBindReturningVariable() {
if (this.numberOfRemainingUnboundArguments == 0) {
throw new IllegalStateException(
"Algorithm assumes that there must be at least one unbound parameter on entry to this method");
}
if (this.returningName != null) {
if (this.numberOfRemainingUnboundArguments > 1) {
throw new AmbiguousBindingException("Binding of returning parameter '" + this.returningName +
"' is ambiguous, there are " + this.numberOfRemainingUnboundArguments + " candidates.");
}
// We're all set... find the unbound parameter, and bind it.
for (int i = 0; i < this.parameterNameBindings.length; i++) {
if (this.parameterNameBindings[i] == null) {
bindParameterName(i, this.returningName);
break;
}
}
}
}
/**
* Parse the string pointcut expression looking for:
* &#64;this, &#64;target, &#64;args, &#64;within, &#64;withincode, &#64;annotation.
* If we find one of these pointcut expressions, try and extract a candidate variable
* name (or variable names, in the case of args).
* <p>Some more support from AspectJ in doing this exercise would be nice... :)
*/
private void maybeBindAnnotationsFromPointcutExpression() {
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
String toMatch = tokens[i];
int firstParenIndex = toMatch.indexOf("(");
if (firstParenIndex != -1) {
toMatch = toMatch.substring(0, firstParenIndex);
}
if (singleValuedAnnotationPcds.contains(toMatch)) {
PointcutBody body = getPointcutBody(tokens, i);
i += body.numTokensConsumed;
String varName = maybeExtractVariableName(body.text);
if (varName != null) {
varNames.add(varName);
}
}
else if (tokens[i].startsWith("@args(") || tokens[i].equals("@args")) {
PointcutBody body = getPointcutBody(tokens, i);
i += body.numTokensConsumed;
maybeExtractVariableNamesFromArgs(body.text, varNames);
}
}
bindAnnotationsFromVarNames(varNames);
}
/**
* Match the given list of extracted variable names to argument slots.
*/
private void bindAnnotationsFromVarNames(List<String> varNames) {
if (!varNames.isEmpty()) {
// we have work to do...
int numAnnotationSlots = countNumberOfUnboundAnnotationArguments();
if (numAnnotationSlots > 1) {
throw new AmbiguousBindingException("Found " + varNames.size() +
" potential annotation variable(s), and " +
numAnnotationSlots + " potential argument slots");
}
else if (numAnnotationSlots == 1) {
if (varNames.size() == 1) {
// it's a match
findAndBind(Annotation.class, varNames.get(0));
}
else {
// multiple candidate vars, but only one slot
throw new IllegalArgumentException("Found " + varNames.size() +
" candidate annotation binding variables" +
" but only one potential argument binding slot");
}
}
else {
// no slots so presume those candidate vars were actually type names
}
}
}
/*
* If the token starts meets Java identifier conventions, it's in.
*/
private String maybeExtractVariableName(String candidateToken) {
if (candidateToken == null || candidateToken.equals("")) {
return null;
}
if (Character.isJavaIdentifierStart(candidateToken.charAt(0)) &&
Character.isLowerCase(candidateToken.charAt(0))) {
char[] tokenChars = candidateToken.toCharArray();
for (char tokenChar : tokenChars) {
if (!Character.isJavaIdentifierPart(tokenChar)) {
return null;
}
}
return candidateToken;
}
else {
return null;
}
}
/**
* Given an args pointcut body (could be {@code args} or {@code at_args}),
* add any candidate variable names to the given list.
*/
private void maybeExtractVariableNamesFromArgs(String argsSpec, List<String> varNames) {
if (argsSpec == null) {
return;
}
String[] tokens = StringUtils.tokenizeToStringArray(argsSpec, ",");
for (int i = 0; i < tokens.length; i++) {
tokens[i] = StringUtils.trimWhitespace(tokens[i]);
String varName = maybeExtractVariableName(tokens[i]);
if (varName != null) {
varNames.add(varName);
}
}
}
/**
* Parse the string pointcut expression looking for this(), target() and args() expressions.
* If we find one, try and extract a candidate variable name and bind it.
*/
private void maybeBindThisOrTargetOrArgsFromPointcutExpression() {
if (this.numberOfRemainingUnboundArguments > 1) {
throw new AmbiguousBindingException("Still " + this.numberOfRemainingUnboundArguments
+ " unbound args at this(),target(),args() binding stage, with no way to determine between them");
}
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
if (tokens[i].equals("this") ||
tokens[i].startsWith("this(") ||
tokens[i].equals("target") ||
tokens[i].startsWith("target(")) {
PointcutBody body = getPointcutBody(tokens, i);
i += body.numTokensConsumed;
String varName = maybeExtractVariableName(body.text);
if (varName != null) {
varNames.add(varName);
}
}
else if (tokens[i].equals("args") || tokens[i].startsWith("args(")) {
PointcutBody body = getPointcutBody(tokens, i);
i += body.numTokensConsumed;
List<String> candidateVarNames = new ArrayList<String>();
maybeExtractVariableNamesFromArgs(body.text, candidateVarNames);
// we may have found some var names that were bound in previous primitive args binding step,
// filter them out...
for (String varName : candidateVarNames) {
if (!alreadyBound(varName)) {
varNames.add(varName);
}
}
}
}
if (varNames.size() > 1) {
throw new AmbiguousBindingException("Found " + varNames.size() +
" candidate this(), target() or args() variables but only one unbound argument slot");
}
else if (varNames.size() == 1) {
for (int j = 0; j < this.parameterNameBindings.length; j++) {
if (isUnbound(j)) {
bindParameterName(j, varNames.get(0));
break;
}
}
}
// else varNames.size must be 0 and we have nothing to bind.
}
private void maybeBindReferencePointcutParameter() {
if (this.numberOfRemainingUnboundArguments > 1) {
throw new AmbiguousBindingException("Still " + this.numberOfRemainingUnboundArguments
+ " unbound args at reference pointcut binding stage, with no way to determine between them");
}
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
String toMatch = tokens[i];
if (toMatch.startsWith("!")) {
toMatch = toMatch.substring(1);
}
int firstParenIndex = toMatch.indexOf("(");
if (firstParenIndex != -1) {
toMatch = toMatch.substring(0, firstParenIndex);
}
else {
if (tokens.length < i + 2) {
// no "(" and nothing following
continue;
}
else {
String nextToken = tokens[i + 1];
if (nextToken.charAt(0) != '(') {
// next token is not "(" either, can't be a pc...
continue;
}
}
}
// eat the body
PointcutBody body = getPointcutBody(tokens, i);
i += body.numTokensConsumed;
if (!nonReferencePointcutTokens.contains(toMatch)) {
// then it could be a reference pointcut
String varName = maybeExtractVariableName(body.text);
if (varName != null) {
varNames.add(varName);
}
}
}
if (varNames.size() > 1) {
throw new AmbiguousBindingException("Found " + varNames.size() +
" candidate reference pointcut variables but only one unbound argument slot");
}
else if (varNames.size() == 1) {
for (int j = 0; j < this.parameterNameBindings.length; j++) {
if (isUnbound(j)) {
bindParameterName(j, varNames.get(0));
break;
}
}
}
// else varNames.size must be 0 and we have nothing to bind.
}
/*
* We've found the start of a binding pointcut at the given index into the
* token array. Now we need to extract the pointcut body and return it.
*/
private PointcutBody getPointcutBody(String[] tokens, int startIndex) {
int numTokensConsumed = 0;
String currentToken = tokens[startIndex];
int bodyStart = currentToken.indexOf('(');
if (currentToken.charAt(currentToken.length() - 1) == ')') {
// It's an all in one... get the text between the first (and the last)
return new PointcutBody(0, currentToken.substring(bodyStart + 1, currentToken.length() - 1));
}
else {
StringBuilder sb = new StringBuilder();
if (bodyStart >= 0 && bodyStart != (currentToken.length() - 1)) {
sb.append(currentToken.substring(bodyStart + 1));
sb.append(" ");
}
numTokensConsumed++;
int currentIndex = startIndex + numTokensConsumed;
while (currentIndex < tokens.length) {
if (tokens[currentIndex].equals("(")) {
currentIndex++;
continue;
}
if (tokens[currentIndex].endsWith(")")) {
sb.append(tokens[currentIndex].substring(0, tokens[currentIndex].length() - 1));
return new PointcutBody(numTokensConsumed, sb.toString().trim());
}
String toAppend = tokens[currentIndex];
if (toAppend.startsWith("(")) {
toAppend = toAppend.substring(1);
}
sb.append(toAppend);
sb.append(" ");
currentIndex++;
numTokensConsumed++;
}
}
// We looked and failed...
return new PointcutBody(numTokensConsumed, null);
}
/**
* Match up args against unbound arguments of primitive types
*/
private void maybeBindPrimitiveArgsFromPointcutExpression() {
int numUnboundPrimitives = countNumberOfUnboundPrimitiveArguments();
if (numUnboundPrimitives > 1) {
throw new AmbiguousBindingException("Found '" + numUnboundPrimitives +
"' unbound primitive arguments with no way to distinguish between them.");
}
if (numUnboundPrimitives == 1) {
// Look for arg variable and bind it if we find exactly one...
List<String> varNames = new ArrayList<String>();
String[] tokens = StringUtils.tokenizeToStringArray(this.pointcutExpression, " ");
for (int i = 0; i < tokens.length; i++) {
if (tokens[i].equals("args") || tokens[i].startsWith("args(")) {
PointcutBody body = getPointcutBody(tokens, i);
i += body.numTokensConsumed;
maybeExtractVariableNamesFromArgs(body.text, varNames);
}
}
if (varNames.size() > 1) {
throw new AmbiguousBindingException("Found " + varNames.size() +
" candidate variable names but only one candidate binding slot when matching primitive args");
}
else if (varNames.size() == 1) {
// 1 primitive arg, and one candidate...
for (int i = 0; i < this.argumentTypes.length; i++) {
if (isUnbound(i) && this.argumentTypes[i].isPrimitive()) {
bindParameterName(i, varNames.get(0));
break;
}
}
}
}
}
/*
* Return true if the parameter name binding for the given parameter
* index has not yet been assigned.
*/
private boolean isUnbound(int i) {
return this.parameterNameBindings[i] == null;
}
private boolean alreadyBound(String varName) {
for (int i = 0; i < this.parameterNameBindings.length; i++) {
if (!isUnbound(i) && varName.equals(this.parameterNameBindings[i])) {
return true;
}
}
return false;
}
/*
* Return {@code true} if the given argument type is a subclass
* of the given supertype.
*/
private boolean isSubtypeOf(Class<?> supertype, int argumentNumber) {
return supertype.isAssignableFrom(this.argumentTypes[argumentNumber]);
}
private int countNumberOfUnboundAnnotationArguments() {
int count = 0;
for (int i = 0; i < this.argumentTypes.length; i++) {
if (isUnbound(i) && isSubtypeOf(Annotation.class, i)) {
count++;
}
}
return count;
}
private int countNumberOfUnboundPrimitiveArguments() {
int count = 0;
for (int i = 0; i < this.argumentTypes.length; i++) {
if (isUnbound(i) && this.argumentTypes[i].isPrimitive()) {
count++;
}
}
return count;
}
/*
* Find the argument index with the given type, and bind the given
* {@code varName} in that position.
*/
private void findAndBind(Class<?> argumentType, String varName) {
for (int i = 0; i < this.argumentTypes.length; i++) {
if (isUnbound(i) && isSubtypeOf(argumentType, i)) {
bindParameterName(i, varName);
return;
}
}
throw new IllegalStateException("Expected to find an unbound argument of type '" +
argumentType.getName() + "'");
}
/**
* Simple struct to hold the extracted text from a pointcut body, together
* with the number of tokens consumed in extracting it.
*/
private static class PointcutBody {
private int numTokensConsumed;
private String text;
public PointcutBody(int tokens, String text) {
this.numTokensConsumed = tokens;
this.text = text;
}
}
/**
* Thrown in response to an ambiguous binding being detected when
* trying to resolve a method's parameter names.
*/
@SuppressWarnings("serial")
public static class AmbiguousBindingException extends RuntimeException {
/**
* Construct a new AmbiguousBindingException with the specified message.
* @param msg the detail message
*/
public AmbiguousBindingException(String msg) {
super(msg);
}
}
}
@@ -0,0 +1,60 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.Method;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.aop.AfterAdvice;
/**
* Spring AOP advice wrapping an AspectJ after advice method.
*
* @author Rod Johnson
* @since 2.0
*/
public class AspectJAfterAdvice extends AbstractAspectJAdvice implements MethodInterceptor, AfterAdvice {
public AspectJAfterAdvice(
Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) {
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
try {
return mi.proceed();
}
finally {
invokeAdviceMethod(getJoinPointMatch(), null, null);
}
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return true;
}
}
@@ -0,0 +1,104 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import org.springframework.aop.AfterAdvice;
import org.springframework.aop.AfterReturningAdvice;
import org.springframework.util.ClassUtils;
import org.springframework.util.TypeUtils;
/**
* Spring AOP advice wrapping an AspectJ after-returning advice method.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Ramnivas Laddad
* @since 2.0
*/
public class AspectJAfterReturningAdvice extends AbstractAspectJAdvice implements AfterReturningAdvice, AfterAdvice {
public AspectJAfterReturningAdvice(
Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) {
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return true;
}
@Override
public void setReturningName(String name) {
setReturningNameNoCheck(name);
}
@Override
public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
if (shouldInvokeOnReturnValueOf(method, returnValue)) {
invokeAdviceMethod(getJoinPointMatch(), returnValue, null);
}
}
/**
* Following AspectJ semantics, if a returning clause was specified, then the
* advice is only invoked if the returned value is an instance of the given
* returning type and generic type parameters, if any, match the assignment
* rules. If the returning type is Object, the advice is *always* invoked.
* @param returnValue the return value of the target method
* @return whether to invoke the advice method for the given return value
*/
private boolean shouldInvokeOnReturnValueOf(Method method, Object returnValue) {
Class<?> type = getDiscoveredReturningType();
Type genericType = getDiscoveredReturningGenericType();
// If we aren't dealing with a raw type, check if generic parameters are assignable.
return (matchesReturnValue(type, method, returnValue) &&
(genericType == null || genericType == type ||
TypeUtils.isAssignable(genericType, method.getGenericReturnType())));
}
/**
* Following AspectJ semantics, if a return value is null (or return type is void),
* then the return type of target method should be used to determine whether advice
* is invoked or not. Also, even if the return type is void, if the type of argument
* declared in the advice method is Object, then the advice must still get invoked.
* @param type the type of argument declared in advice method
* @param method the advice method
* @param returnValue the return value of the target method
* @return whether to invoke the advice method for the given return value and type
*/
private boolean matchesReturnValue(Class<?> type, Method method, Object returnValue) {
if (returnValue != null) {
return ClassUtils.isAssignableValue(type, returnValue);
}
else if (type.equals(Object.class) && method.getReturnType().equals(void.class)) {
return true;
}
else{
return ClassUtils.isAssignable(type, method.getReturnType());
}
}
}
@@ -0,0 +1,76 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.Method;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.aop.AfterAdvice;
/**
* Spring AOP advice wrapping an AspectJ after-throwing advice method.
*
* @author Rod Johnson
* @since 2.0
*/
public class AspectJAfterThrowingAdvice extends AbstractAspectJAdvice implements MethodInterceptor, AfterAdvice {
public AspectJAfterThrowingAdvice(
Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) {
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return true;
}
@Override
public void setThrowingName(String name) {
setThrowingNameNoCheck(name);
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
try {
return mi.proceed();
}
catch (Throwable t) {
if (shouldInvokeOnThrowing(t)) {
invokeAdviceMethod(getJoinPointMatch(), null, t);
}
throw t;
}
}
/**
* In AspectJ semantics, after throwing advice that specifies a throwing clause
* is only invoked if the thrown exception is a subtype of the given throwing type.
*/
private boolean shouldInvokeOnThrowing(Throwable t) {
return getDiscoveredThrowingType().isAssignableFrom(t.getClass());
}
}
@@ -0,0 +1,72 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.aopalliance.aop.Advice;
import org.springframework.aop.Advisor;
import org.springframework.aop.AfterAdvice;
import org.springframework.aop.BeforeAdvice;
/**
* Utility methods for dealing with AspectJ advisors.
*
* @author Adrian Colyer
* @author Juergen Hoeller
* @since 2.0
*/
public abstract class AspectJAopUtils {
/**
* Return {@code true} if the advisor is a form of before advice.
*/
public static boolean isBeforeAdvice(Advisor anAdvisor) {
AspectJPrecedenceInformation precedenceInfo = getAspectJPrecedenceInformationFor(anAdvisor);
if (precedenceInfo != null) {
return precedenceInfo.isBeforeAdvice();
}
return (anAdvisor.getAdvice() instanceof BeforeAdvice);
}
/**
* Return {@code true} if the advisor is a form of after advice.
*/
public static boolean isAfterAdvice(Advisor anAdvisor) {
AspectJPrecedenceInformation precedenceInfo = getAspectJPrecedenceInformationFor(anAdvisor);
if (precedenceInfo != null) {
return precedenceInfo.isAfterAdvice();
}
return (anAdvisor.getAdvice() instanceof AfterAdvice);
}
/**
* Return the AspectJPrecedenceInformation provided by this advisor or its advice.
* If neither the advisor nor the advice have precedence information, this method
* will return {@code null}.
*/
public static AspectJPrecedenceInformation getAspectJPrecedenceInformationFor(Advisor anAdvisor) {
if (anAdvisor instanceof AspectJPrecedenceInformation) {
return (AspectJPrecedenceInformation) anAdvisor;
}
Advice advice = anAdvisor.getAdvice();
if (advice instanceof AspectJPrecedenceInformation) {
return (AspectJPrecedenceInformation) advice;
}
return null;
}
}
@@ -0,0 +1,82 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.Method;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.weaver.tools.JoinPointMatch;
import org.springframework.aop.ProxyMethodInvocation;
/**
* Spring AOP around advice (MethodInterceptor) that wraps
* an AspectJ advice method. Exposes ProceedingJoinPoint.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
*/
public class AspectJAroundAdvice extends AbstractAspectJAdvice implements MethodInterceptor {
public AspectJAroundAdvice(
Method aspectJAroundAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) {
super(aspectJAroundAdviceMethod, pointcut, aif);
}
@Override
public boolean isBeforeAdvice() {
return false;
}
@Override
public boolean isAfterAdvice() {
return false;
}
@Override
protected boolean supportsProceedingJoinPoint() {
return true;
}
@Override
public Object invoke(MethodInvocation mi) throws Throwable {
if (!(mi instanceof ProxyMethodInvocation)) {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
}
ProxyMethodInvocation pmi = (ProxyMethodInvocation) mi;
ProceedingJoinPoint pjp = lazyGetProceedingJoinPoint(pmi);
JoinPointMatch jpm = getJoinPointMatch(pmi);
return invokeAdviceMethod(pjp, jpm, null, null);
}
/**
* Return the ProceedingJoinPoint for the current invocation,
* instantiating it lazily if it hasn't been bound to the thread already.
* @param rmi the current Spring AOP ReflectiveMethodInvocation,
* which we'll use for attribute binding
* @return the ProceedingJoinPoint to make available to advice methods
*/
protected ProceedingJoinPoint lazyGetProceedingJoinPoint(ProxyMethodInvocation rmi) {
return new MethodInvocationProceedingJoinPoint(rmi);
}
}
@@ -0,0 +1,666 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.lang.reflect.Method;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.weaver.BCException;
import org.aspectj.weaver.patterns.NamePattern;
import org.aspectj.weaver.reflect.ReflectionWorld;
import org.aspectj.weaver.reflect.ReflectionWorld.ReflectionWorldException;
import org.aspectj.weaver.reflect.ShadowMatchImpl;
import org.aspectj.weaver.tools.ContextBasedMatcher;
import org.aspectj.weaver.tools.FuzzyBoolean;
import org.aspectj.weaver.tools.JoinPointMatch;
import org.aspectj.weaver.tools.MatchingContext;
import org.aspectj.weaver.tools.PointcutDesignatorHandler;
import org.aspectj.weaver.tools.PointcutExpression;
import org.aspectj.weaver.tools.PointcutParameter;
import org.aspectj.weaver.tools.PointcutParser;
import org.aspectj.weaver.tools.PointcutPrimitive;
import org.aspectj.weaver.tools.ShadowMatch;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.IntroductionAwareMethodMatcher;
import org.springframework.aop.MethodMatcher;
import org.springframework.aop.ProxyMethodInvocation;
import org.springframework.aop.framework.autoproxy.ProxyCreationContext;
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
import org.springframework.aop.support.AbstractExpressionPointcut;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
/**
* Spring {@link org.springframework.aop.Pointcut} implementation
* that uses the AspectJ weaver to evaluate a pointcut expression.
*
* <p>The pointcut expression value is an AspectJ expression. This can
* reference other pointcuts and use composition and other operations.
*
* <p>Naturally, as this is to be processed by Spring AOP's proxy-based model,
* only method execution pointcuts are supported.
*
* @author Rob Harrop
* @author Adrian Colyer
* @author Rod Johnson
* @author Juergen Hoeller
* @author Ramnivas Laddad
* @author Dave Syer
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJExpressionPointcut extends AbstractExpressionPointcut
implements ClassFilter, IntroductionAwareMethodMatcher, BeanFactoryAware {
private static final Set<PointcutPrimitive> SUPPORTED_PRIMITIVES = new HashSet<PointcutPrimitive>();
static {
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.EXECUTION);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.ARGS);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.REFERENCE);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.THIS);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.TARGET);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.WITHIN);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ANNOTATION);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_WITHIN);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_ARGS);
SUPPORTED_PRIMITIVES.add(PointcutPrimitive.AT_TARGET);
}
private static final Log logger = LogFactory.getLog(AspectJExpressionPointcut.class);
private Class<?> pointcutDeclarationScope;
private String[] pointcutParameterNames = new String[0];
private Class<?>[] pointcutParameterTypes = new Class<?>[0];
private BeanFactory beanFactory;
private transient PointcutExpression pointcutExpression;
private transient Map<Method, ShadowMatch> shadowMatchCache = new ConcurrentHashMap<Method, ShadowMatch>(32);
/**
* Create a new default AspectJExpressionPointcut.
*/
public AspectJExpressionPointcut() {
}
/**
* Create a new AspectJExpressionPointcut with the given settings.
* @param declarationScope the declaration scope for the pointcut
* @param paramNames the parameter names for the pointcut
* @param paramTypes the parameter types for the pointcut
*/
public AspectJExpressionPointcut(Class<?> declarationScope, String[] paramNames, Class<?>[] paramTypes) {
this.pointcutDeclarationScope = declarationScope;
if (paramNames.length != paramTypes.length) {
throw new IllegalStateException(
"Number of pointcut parameter names must match number of pointcut parameter types");
}
this.pointcutParameterNames = paramNames;
this.pointcutParameterTypes = paramTypes;
}
/**
* Set the declaration scope for the pointcut.
*/
public void setPointcutDeclarationScope(Class<?> pointcutDeclarationScope) {
this.pointcutDeclarationScope = pointcutDeclarationScope;
}
/**
* Set the parameter names for the pointcut.
*/
public void setParameterNames(String[] names) {
this.pointcutParameterNames = names;
}
/**
* Set the parameter types for the pointcut.
*/
public void setParameterTypes(Class<?>[] types) {
this.pointcutParameterTypes = types;
}
@Override
public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
@Override
public ClassFilter getClassFilter() {
checkReadyToMatch();
return this;
}
@Override
public MethodMatcher getMethodMatcher() {
checkReadyToMatch();
return this;
}
/**
* Check whether this pointcut is ready to match,
* lazily building the underlying AspectJ pointcut expression.
*/
private void checkReadyToMatch() {
if (getExpression() == null) {
throw new IllegalStateException("Must set property 'expression' before attempting to match");
}
if (this.pointcutExpression == null) {
this.pointcutExpression = buildPointcutExpression();
}
}
/**
* Build the underlying AspectJ pointcut expression.
*/
private PointcutExpression buildPointcutExpression() {
ClassLoader cl = (this.beanFactory instanceof ConfigurableBeanFactory ? ((ConfigurableBeanFactory) this.beanFactory)
.getBeanClassLoader() : Thread.currentThread()
.getContextClassLoader());
return buildPointcutExpression(cl);
}
/**
* Build the underlying AspectJ pointcut expression.
*/
private PointcutExpression buildPointcutExpression(ClassLoader classLoader) {
PointcutParser parser = initializePointcutParser(classLoader);
PointcutParameter[] pointcutParameters = new PointcutParameter[this.pointcutParameterNames.length];
for (int i = 0; i < pointcutParameters.length; i++) {
pointcutParameters[i] = parser.createPointcutParameter(
this.pointcutParameterNames[i],
this.pointcutParameterTypes[i]);
}
return parser.parsePointcutExpression(
replaceBooleanOperators(getExpression()),
this.pointcutDeclarationScope, pointcutParameters);
}
/**
* Initialize the underlying AspectJ pointcut parser.
*/
private PointcutParser initializePointcutParser(ClassLoader cl) {
PointcutParser parser = PointcutParser
.getPointcutParserSupportingSpecifiedPrimitivesAndUsingSpecifiedClassLoaderForResolution(
SUPPORTED_PRIMITIVES, cl);
parser.registerPointcutDesignatorHandler(new BeanNamePointcutDesignatorHandler());
return parser;
}
/**
* If a pointcut expression has been specified in XML, the user cannot
* write {@code and} as "&&" (though &amp;&amp; will work).
* We also allow {@code and} between two pointcut sub-expressions.
* <p>This method converts back to {@code &&} for the AspectJ pointcut parser.
*/
private String replaceBooleanOperators(String pcExpr) {
String result = StringUtils.replace(pcExpr, " and ", " && ");
result = StringUtils.replace(result, " or ", " || ");
result = StringUtils.replace(result, " not ", " ! ");
return result;
}
/**
* Return the underlying AspectJ pointcut expression.
*/
public PointcutExpression getPointcutExpression() {
checkReadyToMatch();
return this.pointcutExpression;
}
@Override
public boolean matches(Class<?> targetClass) {
checkReadyToMatch();
try {
return this.pointcutExpression.couldMatchJoinPointsInType(targetClass);
} catch (ReflectionWorldException e) {
logger.debug("PointcutExpression matching rejected target class", e);
try {
// Actually this is still a "maybe" - treat the pointcut as dynamic if we
// don't know enough yet
return getFallbackPointcutExpression(targetClass).couldMatchJoinPointsInType(targetClass);
} catch (BCException ex) {
logger.debug(
"Fallback PointcutExpression matching rejected target class",
ex);
return false;
}
}
catch (BCException ex) {
logger.debug("PointcutExpression matching rejected target class", ex);
return false;
}
}
@Override
public boolean matches(Method method, Class<?> targetClass, boolean beanHasIntroductions) {
checkReadyToMatch();
Method targetMethod = AopUtils.getMostSpecificMethod(method, targetClass);
ShadowMatch shadowMatch = getShadowMatch(targetMethod, method);
// Special handling for this, target, @this, @target, @annotation
// in Spring - we can optimize since we know we have exactly this class,
// and there will never be matching subclass at runtime.
if (shadowMatch.alwaysMatches()) {
return true;
}
else if (shadowMatch.neverMatches()) {
return false;
}
else {
// the maybe case
return (beanHasIntroductions || matchesIgnoringSubtypes(shadowMatch) || matchesTarget(shadowMatch, targetClass));
}
}
@Override
public boolean matches(Method method, Class<?> targetClass) {
return matches(method, targetClass, false);
}
@Override
public boolean isRuntime() {
checkReadyToMatch();
return this.pointcutExpression.mayNeedDynamicTest();
}
@Override
public boolean matches(Method method, Class<?> targetClass, Object[] args) {
checkReadyToMatch();
ShadowMatch shadowMatch = getShadowMatch(AopUtils.getMostSpecificMethod(method, targetClass), method);
ShadowMatch originalShadowMatch = getShadowMatch(method, method);
// Bind Spring AOP proxy to AspectJ "this" and Spring AOP target to AspectJ target,
// consistent with return of MethodInvocationProceedingJoinPoint
ProxyMethodInvocation pmi = null;
Object targetObject = null;
Object thisObject = null;
try {
MethodInvocation mi = ExposeInvocationInterceptor.currentInvocation();
targetObject = mi.getThis();
if (!(mi instanceof ProxyMethodInvocation)) {
throw new IllegalStateException("MethodInvocation is not a Spring ProxyMethodInvocation: " + mi);
}
pmi = (ProxyMethodInvocation) mi;
thisObject = pmi.getProxy();
}
catch (IllegalStateException ex) {
// No current invocation...
// TODO: Should we really proceed here?
logger.debug("Couldn't access current invocation - matching with limited context: " + ex);
}
JoinPointMatch joinPointMatch = shadowMatch.matchesJoinPoint(thisObject, targetObject, args);
/*
* Do a final check to see if any this(TYPE) kind of residue match. For
* this purpose, we use the original method's (proxy method's) shadow to
* ensure that 'this' is correctly checked against. Without this check,
* we get incorrect match on this(TYPE) where TYPE matches the target
* type but not 'this' (as would be the case of JDK dynamic proxies).
* <p>See SPR-2979 for the original bug.
*/
if (pmi != null) { // there is a current invocation
RuntimeTestWalker originalMethodResidueTest = getRuntimeTestWalker(originalShadowMatch);
if (!originalMethodResidueTest.testThisInstanceOfResidue(thisObject.getClass())) {
return false;
}
}
if (joinPointMatch.matches() && pmi != null) {
bindParameters(pmi, joinPointMatch);
}
return joinPointMatch.matches();
}
protected String getCurrentProxiedBeanName() {
return ProxyCreationContext.getCurrentProxiedBeanName();
}
/**
* Get a new pointcut expression based on a target class's loader, rather
* than the default.
*/
private PointcutExpression getFallbackPointcutExpression(
Class<?> targetClass) {
ClassLoader classLoader = targetClass.getClassLoader();
return classLoader == null ? this.pointcutExpression : buildPointcutExpression(classLoader);
}
/**
* A match test returned maybe - if there are any subtype sensitive variables
* involved in the test (this, target, at_this, at_target, at_annotation) then
* we say this is not a match as in Spring there will never be a different
* runtime subtype.
*/
private boolean matchesIgnoringSubtypes(ShadowMatch shadowMatch) {
return !(getRuntimeTestWalker(shadowMatch).testsSubtypeSensitiveVars());
}
private boolean matchesTarget(ShadowMatch shadowMatch, Class<?> targetClass) {
return getRuntimeTestWalker(shadowMatch).testTargetInstanceOfResidue(targetClass);
}
private RuntimeTestWalker getRuntimeTestWalker(ShadowMatch shadowMatch) {
if (shadowMatch instanceof DefensiveShadowMatch) {
return new RuntimeTestWalker(((DefensiveShadowMatch)shadowMatch).primary);
}
return new RuntimeTestWalker(shadowMatch);
}
private void bindParameters(ProxyMethodInvocation invocation, JoinPointMatch jpm) {
// Note: Can't use JoinPointMatch.getClass().getName() as the key, since
// Spring AOP does all the matching at a join point, and then all the invocations
// under this scenario, if we just use JoinPointMatch as the key, then
// 'last man wins' which is not what we want at all.
// Using the expression is guaranteed to be safe, since 2 identical expressions
// are guaranteed to bind in exactly the same way.
invocation.setUserAttribute(getExpression(), jpm);
}
private ShadowMatch getShadowMatch(Method targetMethod, Method originalMethod) {
// Avoid lock contention for known Methods through concurrent access...
ShadowMatch shadowMatch = this.shadowMatchCache.get(targetMethod);
if (shadowMatch == null) {
synchronized (this.shadowMatchCache) {
// Not found - now check again with full lock...
Method methodToMatch = targetMethod;
PointcutExpression fallbackPointcutExpression = null;
shadowMatch = this.shadowMatchCache.get(methodToMatch);
if (shadowMatch == null) {
try {
shadowMatch = this.pointcutExpression.matchesMethodExecution(targetMethod);
}
catch (ReflectionWorld.ReflectionWorldException ex) {
// Failed to introspect target method, probably because it has been loaded
// in a special ClassLoader. Let's try the original method instead...
try {
fallbackPointcutExpression = getFallbackPointcutExpression(methodToMatch.getDeclaringClass());
shadowMatch = fallbackPointcutExpression.matchesMethodExecution(methodToMatch);
} catch (ReflectionWorld.ReflectionWorldException e) {
if (targetMethod == originalMethod) {
shadowMatch = new ShadowMatchImpl(org.aspectj.util.FuzzyBoolean.NO, null, null, null);
}
else {
try {
shadowMatch = this.pointcutExpression.matchesMethodExecution(originalMethod);
}
catch (ReflectionWorld.ReflectionWorldException ex2) {
// Could neither introspect the target class nor the proxy class ->
// let's simply consider this method as non-matching.
methodToMatch = originalMethod;
fallbackPointcutExpression = getFallbackPointcutExpression(methodToMatch.getDeclaringClass());
try {
shadowMatch = fallbackPointcutExpression.matchesMethodExecution(methodToMatch);
} catch (ReflectionWorld.ReflectionWorldException e2) {
shadowMatch = new ShadowMatchImpl(org.aspectj.util.FuzzyBoolean.NO, null, null, null);
}
}
}
}
}
if (shadowMatch.maybeMatches() && fallbackPointcutExpression!=null) {
shadowMatch = new DefensiveShadowMatch(shadowMatch,
fallbackPointcutExpression.matchesMethodExecution(methodToMatch));
}
this.shadowMatchCache.put(targetMethod, shadowMatch);
}
}
}
return shadowMatch;
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof AspectJExpressionPointcut)) {
return false;
}
AspectJExpressionPointcut otherPc = (AspectJExpressionPointcut) other;
return ObjectUtils.nullSafeEquals(this.getExpression(), otherPc.getExpression()) &&
ObjectUtils.nullSafeEquals(this.pointcutDeclarationScope, otherPc.pointcutDeclarationScope) &&
ObjectUtils.nullSafeEquals(this.pointcutParameterNames, otherPc.pointcutParameterNames) &&
ObjectUtils.nullSafeEquals(this.pointcutParameterTypes, otherPc.pointcutParameterTypes);
}
@Override
public int hashCode() {
int hashCode = ObjectUtils.nullSafeHashCode(this.getExpression());
hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode(this.pointcutDeclarationScope);
hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode(this.pointcutParameterNames);
hashCode = 31 * hashCode + ObjectUtils.nullSafeHashCode(this.pointcutParameterTypes);
return hashCode;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("AspectJExpressionPointcut: ");
if (this.pointcutParameterNames != null && this.pointcutParameterTypes != null) {
sb.append("(");
for (int i = 0; i < this.pointcutParameterTypes.length; i++) {
sb.append(this.pointcutParameterTypes[i].getName());
sb.append(" ");
sb.append(this.pointcutParameterNames[i]);
if ((i+1) < this.pointcutParameterTypes.length) {
sb.append(", ");
}
}
sb.append(")");
}
sb.append(" ");
if (getExpression() != null) {
sb.append(getExpression());
}
else {
sb.append("<pointcut expression not set>");
}
return sb.toString();
}
/**
* Handler for the Spring-specific {@code bean()} pointcut designator
* extension to AspectJ.
* <p>This handler must be added to each pointcut object that needs to
* handle the {@code bean()} PCD. Matching context is obtained
* automatically by examining a thread local variable and therefore a matching
* context need not be set on the pointcut.
*/
private class BeanNamePointcutDesignatorHandler implements PointcutDesignatorHandler {
private static final String BEAN_DESIGNATOR_NAME = "bean";
@Override
public String getDesignatorName() {
return BEAN_DESIGNATOR_NAME;
}
@Override
public ContextBasedMatcher parse(String expression) {
return new BeanNameContextMatcher(expression);
}
}
/**
* Matcher class for the BeanNamePointcutDesignatorHandler.
* <p>Dynamic match tests for this matcher always return true,
* since the matching decision is made at the proxy creation time.
* For static match tests, this matcher abstains to allow the overall
* pointcut to match even when negation is used with the bean() pointcut.
*/
private class BeanNameContextMatcher implements ContextBasedMatcher {
private final NamePattern expressionPattern;
public BeanNameContextMatcher(String expression) {
this.expressionPattern = new NamePattern(expression);
}
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}
@Override
@SuppressWarnings("rawtypes")
@Deprecated
public boolean couldMatchJoinPointsInType(Class someClass, MatchingContext context) {
return (contextMatch(someClass) == FuzzyBoolean.YES);
}
@Override
public boolean matchesDynamically(MatchingContext context) {
return true;
}
@Override
public FuzzyBoolean matchesStatically(MatchingContext context) {
return contextMatch(null);
}
@Override
public boolean mayNeedDynamicTest() {
return false;
}
private FuzzyBoolean contextMatch(Class<?> targetType) {
String advisedBeanName = getCurrentProxiedBeanName();
if (advisedBeanName == null) { // no proxy creation in progress
// abstain; can't return YES, since that will make pointcut with negation fail
return FuzzyBoolean.MAYBE;
}
if (BeanFactoryUtils.isGeneratedBeanName(advisedBeanName)) {
return FuzzyBoolean.NO;
}
if (targetType != null) {
boolean isFactory = FactoryBean.class.isAssignableFrom(targetType);
return FuzzyBoolean.fromBoolean(
matchesBeanName(isFactory ? BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName : advisedBeanName));
}
else {
return FuzzyBoolean.fromBoolean(matchesBeanName(advisedBeanName) ||
matchesBeanName(BeanFactory.FACTORY_BEAN_PREFIX + advisedBeanName));
}
}
private boolean matchesBeanName(String advisedBeanName) {
if (this.expressionPattern.matches(advisedBeanName)) {
return true;
}
if (beanFactory != null) {
String[] aliases = beanFactory.getAliases(advisedBeanName);
for (String alias : aliases) {
if (this.expressionPattern.matches(alias)) {
return true;
}
}
}
return false;
}
}
//---------------------------------------------------------------------
// Serialization support
//---------------------------------------------------------------------
private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
// Rely on default serialization, just initialize state after deserialization.
ois.defaultReadObject();
// Initialize transient fields.
// pointcutExpression will be initialized lazily by checkReadyToMatch()
this.shadowMatchCache = new ConcurrentHashMap<Method, ShadowMatch>(32);
}
private static class DefensiveShadowMatch implements ShadowMatch {
private final ShadowMatch primary;
private final ShadowMatch other;
public DefensiveShadowMatch(ShadowMatch primary, ShadowMatch other) {
this.primary = primary;
this.other = other;
}
@Override
public boolean alwaysMatches() {
return primary.alwaysMatches();
}
@Override
public boolean maybeMatches() {
return primary.maybeMatches();
}
@Override
public boolean neverMatches() {
return primary.neverMatches();
}
@Override
public JoinPointMatch matchesJoinPoint(Object thisObject,
Object targetObject, Object[] args) {
try {
return primary.matchesJoinPoint(thisObject, targetObject, args);
} catch (ReflectionWorldException e) {
return other.matchesJoinPoint(thisObject, targetObject, args);
}
}
@Override
public void setMatchingContext(MatchingContext aMatchContext) {
primary.setMatchingContext(aMatchContext);
other.setMatchingContext(aMatchContext);
}
}
}
@@ -0,0 +1,63 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.springframework.aop.Pointcut;
import org.springframework.aop.support.AbstractGenericPointcutAdvisor;
/**
* Spring AOP Advisor that can be used for any AspectJ pointcut expression.
*
* @author Rob Harrop
* @since 2.0
*/
@SuppressWarnings("serial")
public class AspectJExpressionPointcutAdvisor extends AbstractGenericPointcutAdvisor {
private final AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
public void setExpression(String expression) {
this.pointcut.setExpression(expression);
}
public void setLocation(String location) {
this.pointcut.setLocation(location);
}
public void setParameterTypes(Class<?>[] types) {
this.pointcut.setParameterTypes(types);
}
public void setParameterNames(String[] names) {
this.pointcut.setParameterNames(names);
}
public String getLocation() {
return this.pointcut.getLocation();
}
public String getExpression() {
return this.pointcut.getExpression();
}
}
@@ -0,0 +1,53 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.Method;
import org.springframework.aop.MethodBeforeAdvice;
/**
* Spring AOP advice that wraps an AspectJ before method.
*
* @author Rod Johnson
* @author Adrian Colyer
* @since 2.0
*/
public class AspectJMethodBeforeAdvice extends AbstractAspectJAdvice implements MethodBeforeAdvice {
public AspectJMethodBeforeAdvice(
Method aspectJBeforeAdviceMethod, AspectJExpressionPointcut pointcut, AspectInstanceFactory aif) {
super(aspectJBeforeAdviceMethod, pointcut, aif);
}
@Override
public void before(Method method, Object[] args, Object target) throws Throwable {
invokeAdviceMethod(getJoinPointMatch(), null, null);
}
@Override
public boolean isBeforeAdvice() {
return true;
}
@Override
public boolean isAfterAdvice() {
return false;
}
}
@@ -0,0 +1,102 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.aopalliance.aop.Advice;
import org.springframework.aop.Pointcut;
import org.springframework.aop.PointcutAdvisor;
import org.springframework.core.Ordered;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
/**
* AspectJPointcutAdvisor that adapts an {@link AbstractAspectJAdvice}
* to the {@link org.springframework.aop.PointcutAdvisor} interface.
*
* @author Adrian Colyer
* @author Juergen Hoeller
* @since 2.0
*/
public class AspectJPointcutAdvisor implements PointcutAdvisor, Ordered {
private final AbstractAspectJAdvice advice;
private final Pointcut pointcut;
private Integer order;
/**
* Create a new AspectJPointcutAdvisor for the given advice
* @param advice the AbstractAspectJAdvice to wrap
*/
public AspectJPointcutAdvisor(AbstractAspectJAdvice advice) {
Assert.notNull(advice, "Advice must not be null");
this.advice = advice;
this.pointcut = advice.buildSafePointcut();
}
public void setOrder(int order) {
this.order = order;
}
@Override
public boolean isPerInstance() {
return true;
}
@Override
public Advice getAdvice() {
return this.advice;
}
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
@Override
public int getOrder() {
if (this.order != null) {
return this.order;
}
else {
return this.advice.getOrder();
}
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof AspectJPointcutAdvisor)) {
return false;
}
AspectJPointcutAdvisor otherAdvisor = (AspectJPointcutAdvisor) other;
return (ObjectUtils.nullSafeEquals(this.advice, otherAdvisor.advice));
}
@Override
public int hashCode() {
return AspectJPointcutAdvisor.class.hashCode();
}
}
@@ -0,0 +1,58 @@
/*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.springframework.core.Ordered;
/**
* Interface to be implemented by types that can supply the information
* needed to sort advice/advisors by AspectJ's precedence rules.
*
* @author Adrian Colyer
* @since 2.0
* @see org.springframework.aop.aspectj.autoproxy.AspectJPrecedenceComparator
*/
public interface AspectJPrecedenceInformation extends Ordered {
// Implementation note:
// We need the level of indirection this interface provides as otherwise the
// AspectJPrecedenceComparator must ask an Advisor for its Advice in all cases
// in order to sort advisors. This causes problems with the
// InstantiationModelAwarePointcutAdvisor which needs to delay creating
// its advice for aspects with non-singleton instantiation models.
/**
* The name of the aspect (bean) in which the advice was declared.
*/
String getAspectName();
/**
* The declaration order of the advice member within the aspect.
*/
int getDeclarationOrder();
/**
* Return whether this is a before advice.
*/
boolean isBeforeAdvice();
/**
* Return whether this is an after advice.
*/
boolean isAfterAdvice();
}
@@ -0,0 +1,72 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.util.List;
import org.springframework.aop.Advisor;
import org.springframework.aop.PointcutAdvisor;
import org.springframework.aop.interceptor.ExposeInvocationInterceptor;
/**
* Utility methods for working with AspectJ proxies.
*
* @author Rod Johnson
* @author Ramnivas Laddad
* @since 2.0
*/
public abstract class AspectJProxyUtils {
/**
* Add special advisors if necessary to work with a proxy chain that contains AspectJ advisors.
* This will expose the current Spring AOP invocation (necessary for some AspectJ pointcut matching)
* and make available the current AspectJ JoinPoint. The call will have no effect if there are no
* AspectJ advisors in the advisor chain.
* @param advisors Advisors available
* @return {@code true} if any special {@link Advisor Advisors} were added, otherwise {@code false}.
*/
public static boolean makeAdvisorChainAspectJCapableIfNecessary(List<Advisor> advisors) {
// Don't add advisors to an empty list; may indicate that proxying is just not required
if (!advisors.isEmpty()) {
boolean foundAspectJAdvice = false;
for (Advisor advisor : advisors) {
// Be careful not to get the Advice without a guard, as
// this might eagerly instantiate a non-singleton AspectJ aspect
if (isAspectJAdvice(advisor)) {
foundAspectJAdvice = true;
}
}
if (foundAspectJAdvice && !advisors.contains(ExposeInvocationInterceptor.ADVISOR)) {
advisors.add(0, ExposeInvocationInterceptor.ADVISOR);
return true;
}
}
return false;
}
/**
* Determine whether the given Advisor contains an AspectJ advice.
* @param advisor the Advisor to check
*/
private static boolean isAspectJAdvice(Advisor advisor) {
return (advisor instanceof InstantiationModelAwarePointcutAdvisor ||
advisor.getAdvice() instanceof AbstractAspectJAdvice ||
(advisor instanceof PointcutAdvisor &&
((PointcutAdvisor) advisor).getPointcut() instanceof AspectJExpressionPointcut));
}
}
@@ -0,0 +1,107 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.bridge.AbortException;
import org.aspectj.bridge.IMessage;
import org.aspectj.bridge.IMessage.Kind;
import org.aspectj.bridge.IMessageHandler;
/**
* Implementation of AspectJ's {@link IMessageHandler} interface that
* routes AspectJ weaving messages through the same logging system as the
* regular Spring messages.
*
* <p>Pass the option...
*
* <p><code class="code">-XmessageHandlerClass:org.springframework.aop.aspectj.AspectJWeaverMessageHandler</code>
*
* <p>to the weaver; for example, specifying the following in a
* "{@code META-INF/aop.xml} file:
*
* <p><code class="code">&lt;weaver options="..."/&gt;</code>
*
* @author Adrian Colyer
* @author Juergen Hoeller
* @since 2.0
*/
public class AspectJWeaverMessageHandler implements IMessageHandler {
private static final String AJ_ID = "[AspectJ] ";
private static final Log logger = LogFactory.getLog("AspectJ Weaver");
@Override
public boolean handleMessage(IMessage message) throws AbortException {
Kind messageKind = message.getKind();
if (messageKind == IMessage.DEBUG) {
if (logger.isDebugEnabled()) {
logger.debug(makeMessageFor(message));
return true;
}
}
else if (messageKind == IMessage.INFO || messageKind == IMessage.WEAVEINFO) {
if (logger.isInfoEnabled()) {
logger.info(makeMessageFor(message));
return true;
}
}
else if (messageKind == IMessage.WARNING) {
if (logger.isWarnEnabled()) {
logger.warn(makeMessageFor(message));
return true;
}
}
else if (messageKind == IMessage.ERROR) {
if (logger.isErrorEnabled()) {
logger.error(makeMessageFor(message));
return true;
}
}
else if (messageKind == IMessage.ABORT) {
if (logger.isFatalEnabled()) {
logger.fatal(makeMessageFor(message));
return true;
}
}
return false;
}
private String makeMessageFor(IMessage aMessage) {
return AJ_ID + aMessage.getMessage();
}
@Override
public boolean isIgnoring(Kind messageKind) {
// We want to see everything, and allow configuration of log levels dynamically.
return false;
}
@Override
public void dontIgnore(Kind messageKind) {
// We weren't ignoring anything anyway...
}
@Override
public void ignore(Kind kind) {
// We weren't ignoring anything anyway...
}
}
@@ -0,0 +1,116 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.aopalliance.aop.Advice;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.IntroductionAdvisor;
import org.springframework.aop.support.ClassFilters;
import org.springframework.aop.support.DelegatePerTargetObjectIntroductionInterceptor;
import org.springframework.aop.support.DelegatingIntroductionInterceptor;
/**
* Introduction advisor delegating to the given object.
* Implements AspectJ annotation-style behavior for the DeclareParents annotation.
*
* @author Rod Johnson
* @author Ramnivas Laddad
* @since 2.0
*/
public class DeclareParentsAdvisor implements IntroductionAdvisor {
private final Class<?> introducedInterface;
private final ClassFilter typePatternClassFilter;
private final Advice advice;
/**
* Create a new advisor for this DeclareParents field.
* @param interfaceType static field defining the introduction
* @param typePattern type pattern the introduction is restricted to
* @param defaultImpl the default implementation class
*/
public DeclareParentsAdvisor(Class<?> interfaceType, String typePattern, Class<?> defaultImpl) {
this(interfaceType, typePattern, defaultImpl,
new DelegatePerTargetObjectIntroductionInterceptor(defaultImpl, interfaceType));
}
/**
* Create a new advisor for this DeclareParents field.
* @param interfaceType static field defining the introduction
* @param typePattern type pattern the introduction is restricted to
* @param delegateRef the delegate implementation object
*/
public DeclareParentsAdvisor(Class<?> interfaceType, String typePattern, Object delegateRef) {
this(interfaceType, typePattern, delegateRef.getClass(),
new DelegatingIntroductionInterceptor(delegateRef));
}
/**
* Private constructor to share common code between impl-based delegate and reference-based delegate
* (cannot use method such as init() to share common code, due the the use of final fields)
* @param interfaceType static field defining the introduction
* @param typePattern type pattern the introduction is restricted to
* @param implementationClass implementation class
* @param advice delegation advice
*/
private DeclareParentsAdvisor(Class<?> interfaceType, String typePattern, Class<?> implementationClass, Advice advice) {
this.introducedInterface = interfaceType;
ClassFilter typePatternFilter = new TypePatternClassFilter(typePattern);
// Excludes methods implemented.
ClassFilter exclusion = new ClassFilter() {
@Override
public boolean matches(Class<?> clazz) {
return !(introducedInterface.isAssignableFrom(clazz));
}
};
this.typePatternClassFilter = ClassFilters.intersection(typePatternFilter, exclusion);
this.advice = advice;
}
@Override
public ClassFilter getClassFilter() {
return this.typePatternClassFilter;
}
@Override
public void validateInterfaces() throws IllegalArgumentException {
// Do nothing
}
@Override
public boolean isPerInstance() {
return true;
}
@Override
public Advice getAdvice() {
return this.advice;
}
@Override
public Class<?>[] getInterfaces() {
return new Class<?>[] {this.introducedInterface};
}
}
@@ -0,0 +1,42 @@
/*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.springframework.aop.PointcutAdvisor;
/**
* Interface to be implemented by Spring AOP Advisors wrapping AspectJ
* aspects that may have a lazy initialization strategy. For example,
* a perThis instantiation model would mean lazy initialization of the advice.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
*/
public interface InstantiationModelAwarePointcutAdvisor extends PointcutAdvisor {
/**
* Return whether this advisor is lazily initializing its underlying advice.
*/
boolean isLazy();
/**
* Return whether this advisor has already instantiated its advice.
*/
boolean isAdviceInstantiated();
}
@@ -0,0 +1,324 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.reflect.MethodSignature;
import org.aspectj.lang.reflect.SourceLocation;
import org.aspectj.runtime.internal.AroundClosure;
import org.springframework.aop.ProxyMethodInvocation;
import org.springframework.core.DefaultParameterNameDiscoverer;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.util.Assert;
/**
* Implementation of AspectJ ProceedingJoinPoint interface
* wrapping an AOP Alliance MethodInvocation.
*
* <p><b>Note</b>: the {@code getThis()} method returns the current Spring AOP proxy.
* The {@code getTarget()} method returns the current Spring AOP target (which may be
* {@code null} if there is no target), and is a plain POJO without any advice.
* <b>If you want to call the object and have the advice take effect, use
* {@code getThis()}.</b> A common example is casting the object to an
* introduced interface in the implementation of an introduction.
*
* <p>Of course there is no such distinction between target and proxy in AspectJ.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Adrian Colyer
* @author Ramnivas Laddad
* @since 2.0
*/
public class MethodInvocationProceedingJoinPoint implements ProceedingJoinPoint, JoinPoint.StaticPart {
private static final ParameterNameDiscoverer parameterNameDiscoverer = new DefaultParameterNameDiscoverer();
private final ProxyMethodInvocation methodInvocation;
private Object[] defensiveCopyOfArgs;
/** Lazily initialized signature object */
private Signature signature;
/** Lazily initialized source location object */
private SourceLocation sourceLocation;
/**
* Create a new MethodInvocationProceedingJoinPoint, wrapping the given
* Spring ProxyMethodInvocation object.
* @param methodInvocation the Spring ProxyMethodInvocation object
*/
public MethodInvocationProceedingJoinPoint(ProxyMethodInvocation methodInvocation) {
Assert.notNull(methodInvocation, "MethodInvocation must not be null");
this.methodInvocation = methodInvocation;
}
@Override
public void set$AroundClosure(AroundClosure aroundClosure) {
throw new UnsupportedOperationException();
}
@Override
public Object proceed() throws Throwable {
return this.methodInvocation.invocableClone().proceed();
}
@Override
public Object proceed(Object[] arguments) throws Throwable {
Assert.notNull(arguments, "Argument array passed to proceed cannot be null");
if (arguments.length != this.methodInvocation.getArguments().length) {
throw new IllegalArgumentException("Expecting " +
this.methodInvocation.getArguments().length + " arguments to proceed, " +
"but was passed " + arguments.length + " arguments");
}
this.methodInvocation.setArguments(arguments);
return this.methodInvocation.invocableClone(arguments).proceed();
}
/**
* Returns the Spring AOP proxy. Cannot be {@code null}.
*/
@Override
public Object getThis() {
return this.methodInvocation.getProxy();
}
/**
* Returns the Spring AOP target. May be {@code null} if there is no target.
*/
@Override
public Object getTarget() {
return this.methodInvocation.getThis();
}
@Override
public Object[] getArgs() {
if (this.defensiveCopyOfArgs == null) {
Object[] argsSource = this.methodInvocation.getArguments();
this.defensiveCopyOfArgs = new Object[argsSource.length];
System.arraycopy(argsSource, 0, this.defensiveCopyOfArgs, 0, argsSource.length);
}
return this.defensiveCopyOfArgs;
}
@Override
public Signature getSignature() {
if (this.signature == null) {
this.signature = new MethodSignatureImpl();
}
return signature;
}
@Override
public SourceLocation getSourceLocation() {
if (this.sourceLocation == null) {
this.sourceLocation = new SourceLocationImpl();
}
return this.sourceLocation;
}
@Override
public String getKind() {
return ProceedingJoinPoint.METHOD_EXECUTION;
}
@Override
public int getId() {
// TODO: It's just an adapter but returning 0 might still have side effects...
return 0;
}
@Override
public JoinPoint.StaticPart getStaticPart() {
return this;
}
@Override
public String toShortString() {
return "execution(" + getSignature().toShortString() + ")";
}
@Override
public String toLongString() {
return "execution(" + getSignature().toLongString() + ")";
}
@Override
public String toString() {
return "execution(" + getSignature().toString() + ")";
}
/**
* Lazily initialized MethodSignature.
*/
private class MethodSignatureImpl implements MethodSignature {
private volatile String[] parameterNames;
@Override
public String getName() {
return methodInvocation.getMethod().getName();
}
@Override
public int getModifiers() {
return methodInvocation.getMethod().getModifiers();
}
@Override
public Class<?> getDeclaringType() {
return methodInvocation.getMethod().getDeclaringClass();
}
@Override
public String getDeclaringTypeName() {
return methodInvocation.getMethod().getDeclaringClass().getName();
}
@Override
public Class<?> getReturnType() {
return methodInvocation.getMethod().getReturnType();
}
@Override
public Method getMethod() {
return methodInvocation.getMethod();
}
@Override
public Class<?>[] getParameterTypes() {
return methodInvocation.getMethod().getParameterTypes();
}
@Override
public String[] getParameterNames() {
if (this.parameterNames == null) {
this.parameterNames = parameterNameDiscoverer.getParameterNames(getMethod());
}
return this.parameterNames;
}
@Override
public Class<?>[] getExceptionTypes() {
return methodInvocation.getMethod().getExceptionTypes();
}
@Override
public String toShortString() {
return toString(false, false, false, false);
}
@Override
public String toLongString() {
return toString(true, true, true, true);
}
@Override
public String toString() {
return toString(false, true, false, true);
}
private String toString(boolean includeModifier, boolean includeReturnTypeAndArgs,
boolean useLongReturnAndArgumentTypeName, boolean useLongTypeName) {
StringBuilder sb = new StringBuilder();
if (includeModifier) {
sb.append(Modifier.toString(getModifiers()));
sb.append(" ");
}
if (includeReturnTypeAndArgs) {
appendType(sb, getReturnType(), useLongReturnAndArgumentTypeName);
sb.append(" ");
}
appendType(sb, getDeclaringType(), useLongTypeName);
sb.append(".");
sb.append(getMethod().getName());
sb.append("(");
Class<?>[] parametersTypes = getParameterTypes();
appendTypes(sb, parametersTypes, includeReturnTypeAndArgs, useLongReturnAndArgumentTypeName);
sb.append(")");
return sb.toString();
}
private void appendTypes(StringBuilder sb, Class<?>[] types,
boolean includeArgs, boolean useLongReturnAndArgumentTypeName) {
if (includeArgs) {
for (int size = types.length, i = 0; i < size; i++) {
appendType(sb, types[i], useLongReturnAndArgumentTypeName);
if (i < size - 1) {
sb.append(",");
}
}
}
else {
if (types.length != 0) {
sb.append("..");
}
}
}
private void appendType(StringBuilder sb, Class<?> type, boolean useLongTypeName) {
if (type.isArray()) {
appendType(sb, type.getComponentType(), useLongTypeName);
sb.append("[]");
}
else {
sb.append(useLongTypeName ? type.getName() : type.getSimpleName());
}
}
}
/**
* Lazily initialized SourceLocation.
*/
private class SourceLocationImpl implements SourceLocation {
@Override
public Class<?> getWithinType() {
if (methodInvocation.getThis() == null) {
throw new UnsupportedOperationException("No source location joinpoint available: target is null");
}
return methodInvocation.getThis().getClass();
}
@Override
public String getFileName() {
throw new UnsupportedOperationException();
}
@Override
public int getLine() {
throw new UnsupportedOperationException();
}
@Override
@Deprecated
public int getColumn() {
throw new UnsupportedOperationException();
}
}
}
@@ -0,0 +1,269 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import java.lang.reflect.Field;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.ast.And;
import org.aspectj.weaver.ast.Call;
import org.aspectj.weaver.ast.FieldGetCall;
import org.aspectj.weaver.ast.HasAnnotation;
import org.aspectj.weaver.ast.ITestVisitor;
import org.aspectj.weaver.ast.Instanceof;
import org.aspectj.weaver.ast.Literal;
import org.aspectj.weaver.ast.Not;
import org.aspectj.weaver.ast.Or;
import org.aspectj.weaver.ast.Test;
import org.aspectj.weaver.internal.tools.MatchingContextBasedTest;
import org.aspectj.weaver.reflect.ReflectionVar;
import org.aspectj.weaver.reflect.ShadowMatchImpl;
import org.aspectj.weaver.tools.ShadowMatch;
import org.springframework.util.ClassUtils;
import org.springframework.util.ReflectionUtils;
/**
* This class encapsulates some AspectJ internal knowledge that should be
* pushed back into the AspectJ project in a future release.
*
* <p>It relies on implementation specific knowledge in AspectJ to break
* encapsulation and do something AspectJ was not designed to do: query
* the types of runtime tests that will be performed. The code here should
* migrate to {@code ShadowMatch.getVariablesInvolvedInRuntimeTest()}
* or some similar operation.
*
* <p>See <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=151593"/>.
*
* @author Adrian Colyer
* @author Ramnivas Laddad
* @since 2.0
*/
class RuntimeTestWalker {
private final Test runtimeTest;
public RuntimeTestWalker(ShadowMatch shadowMatch) {
ShadowMatchImpl shadowMatchImplementation = (ShadowMatchImpl) shadowMatch;
try {
Field testField = shadowMatchImplementation.getClass().getDeclaredField("residualTest");
ReflectionUtils.makeAccessible(testField);
this.runtimeTest = (Test) testField.get(shadowMatch);
}
catch (NoSuchFieldException noSuchFieldEx) {
throw new IllegalStateException("The version of aspectjtools.jar / aspectjweaver.jar " +
"on the classpath is incompatible with this version of Spring: Expected field " +
"'runtimeTest' is not present on ShadowMatchImpl class.");
}
catch (IllegalAccessException illegalAccessEx) {
// Famous last words... but I don't see how this can happen given the
// makeAccessible call above
throw new IllegalStateException("Unable to access ShadowMatchImpl.residualTest field");
}
}
/**
* If the test uses any of the this, target, at_this, at_target, and at_annotation vars,
* then it tests subtype sensitive vars.
*/
public boolean testsSubtypeSensitiveVars() {
return (this.runtimeTest != null &&
new SubtypeSensitiveVarTypeTestVisitor().testsSubtypeSensitiveVars(this.runtimeTest));
}
public boolean testThisInstanceOfResidue(Class<?> thisClass) {
return (this.runtimeTest != null &&
new ThisInstanceOfResidueTestVisitor(thisClass).thisInstanceOfMatches(this.runtimeTest));
}
public boolean testTargetInstanceOfResidue(Class<?> targetClass) {
return (this.runtimeTest != null &&
new TargetInstanceOfResidueTestVisitor(targetClass).targetInstanceOfMatches(this.runtimeTest));
}
private static class TestVisitorAdapter implements ITestVisitor {
protected static final int THIS_VAR = 0;
protected static final int TARGET_VAR = 1;
protected static final int AT_THIS_VAR = 3;
protected static final int AT_TARGET_VAR = 4;
protected static final int AT_ANNOTATION_VAR = 8;
@Override
public void visit(And e) {
e.getLeft().accept(this);
e.getRight().accept(this);
}
@Override
public void visit(Or e) {
e.getLeft().accept(this);
e.getRight().accept(this);
}
@Override
public void visit(Not e) {
e.getBody().accept(this);
}
@Override
public void visit(Instanceof i) {
}
@Override
public void visit(Literal literal) {
}
@Override
public void visit(Call call) {
}
@Override
public void visit(FieldGetCall fieldGetCall) {
}
@Override
public void visit(HasAnnotation hasAnnotation) {
}
@Override
public void visit(MatchingContextBasedTest matchingContextTest) {
}
protected int getVarType(ReflectionVar v) {
try {
Field varTypeField = ReflectionVar.class.getDeclaredField("varType");
ReflectionUtils.makeAccessible(varTypeField);
return (Integer) varTypeField.get(v);
}
catch (NoSuchFieldException noSuchFieldEx) {
throw new IllegalStateException("the version of aspectjtools.jar / aspectjweaver.jar " +
"on the classpath is incompatible with this version of Spring:- expected field " +
"'varType' is not present on ReflectionVar class");
}
catch (IllegalAccessException illegalAccessEx) {
// Famous last words... but I don't see how this can happen given the
// makeAccessible call above
throw new IllegalStateException("Unable to access ReflectionVar.varType field");
}
}
}
private static abstract class InstanceOfResidueTestVisitor extends TestVisitorAdapter {
private Class<?> matchClass;
private boolean matches;
private int matchVarType;
public InstanceOfResidueTestVisitor(Class<?> matchClass, boolean defaultMatches, int matchVarType) {
this.matchClass = matchClass;
this.matches = defaultMatches;
this.matchVarType = matchVarType;
}
public boolean instanceOfMatches(Test test) {
test.accept(this);
return matches;
}
@Override
public void visit(Instanceof i) {
ResolvedType type = (ResolvedType) i.getType();
int varType = getVarType((ReflectionVar) i.getVar());
if (varType != this.matchVarType) {
return;
}
try {
Class<?> typeClass = ClassUtils.forName(type.getName(), this.matchClass.getClassLoader());
// Don't use ReflectionType.isAssignableFrom() as it won't be aware of (Spring) mixins
this.matches = typeClass.isAssignableFrom(this.matchClass);
}
catch (ClassNotFoundException ex) {
this.matches = false;
}
}
}
/**
* Check if residue of target(TYPE) kind. See SPR-3783 for more details.
*/
private static class TargetInstanceOfResidueTestVisitor extends InstanceOfResidueTestVisitor {
public TargetInstanceOfResidueTestVisitor(Class<?> targetClass) {
super(targetClass, false, TARGET_VAR);
}
public boolean targetInstanceOfMatches(Test test) {
return instanceOfMatches(test);
}
}
/**
* Check if residue of this(TYPE) kind. See SPR-2979 for more details.
*/
private static class ThisInstanceOfResidueTestVisitor extends InstanceOfResidueTestVisitor {
public ThisInstanceOfResidueTestVisitor(Class<?> thisClass) {
super(thisClass, true, THIS_VAR);
}
// TODO: Optimization: Process only if this() specifies a type and not an identifier.
public boolean thisInstanceOfMatches(Test test) {
return instanceOfMatches(test);
}
}
private static class SubtypeSensitiveVarTypeTestVisitor extends TestVisitorAdapter {
private final Object thisObj = new Object();
private final Object targetObj = new Object();
private final Object[] argsObjs = new Object[0];
private boolean testsSubtypeSensitiveVars = false;
public boolean testsSubtypeSensitiveVars(Test aTest) {
aTest.accept(this);
return this.testsSubtypeSensitiveVars;
}
@Override
public void visit(Instanceof i) {
ReflectionVar v = (ReflectionVar) i.getVar();
Object varUnderTest = v.getBindingAtJoinPoint(thisObj,targetObj,argsObjs);
if ((varUnderTest == thisObj) || (varUnderTest == targetObj)) {
this.testsSubtypeSensitiveVars = true;
}
}
@Override
public void visit(HasAnnotation hasAnn) {
// If you thought things were bad before, now we sink to new levels of horror...
ReflectionVar v = (ReflectionVar) hasAnn.getVar();
int varType = getVarType(v);
if ((varType == AT_THIS_VAR) || (varType == AT_TARGET_VAR) || (varType == AT_ANNOTATION_VAR)) {
this.testsSubtypeSensitiveVars = true;
}
}
}
}
@@ -0,0 +1,94 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.springframework.aop.framework.AopConfigException;
import org.springframework.core.Ordered;
import org.springframework.util.Assert;
/**
* Implementation of {@link AspectInstanceFactory} that creates a new instance
* of the specified aspect class for every {@link #getAspectInstance()} call.
*
* @author Juergen Hoeller
* @since 2.0.4
*/
public class SimpleAspectInstanceFactory implements AspectInstanceFactory {
private final Class<?> aspectClass;
/**
* Create a new SimpleAspectInstanceFactory for the given aspect class.
* @param aspectClass the aspect class
*/
public SimpleAspectInstanceFactory(Class<?> aspectClass) {
Assert.notNull(aspectClass, "Aspect class must not be null");
this.aspectClass = aspectClass;
}
/**
* Return the specified aspect class (never {@code null}).
*/
public final Class<?> getAspectClass() {
return this.aspectClass;
}
@Override
public final Object getAspectInstance() {
try {
return this.aspectClass.newInstance();
}
catch (InstantiationException ex) {
throw new AopConfigException("Unable to instantiate aspect class [" + this.aspectClass.getName() + "]", ex);
}
catch (IllegalAccessException ex) {
throw new AopConfigException("Cannot access element class [" + this.aspectClass.getName() + "]", ex);
}
}
@Override
public ClassLoader getAspectClassLoader() {
return this.aspectClass.getClassLoader();
}
/**
* Determine the order for this factory's aspect instance,
* either an instance-specific order expressed through implementing
* the {@link org.springframework.core.Ordered} interface,
* or a fallback order.
* @see org.springframework.core.Ordered
* @see #getOrderForAspectClass
*/
@Override
public int getOrder() {
return getOrderForAspectClass(this.aspectClass);
}
/**
* Determine a fallback order for the case that the aspect instance
* does not express an instance-specific order through implementing
* the {@link org.springframework.core.Ordered} interface.
* <p>The default implementation simply returns {@code Ordered.LOWEST_PRECEDENCE}.
* @param aspectClass the aspect class
*/
protected int getOrderForAspectClass(Class<?> aspectClass) {
return Ordered.LOWEST_PRECEDENCE;
}
}
@@ -0,0 +1,84 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.springframework.core.Ordered;
import org.springframework.util.Assert;
/**
* Implementation of {@link AspectInstanceFactory} that is backed by a
* specified singleton object, returning the same instance for every
* {@link #getAspectInstance()} call.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
* @see SimpleAspectInstanceFactory
*/
public class SingletonAspectInstanceFactory implements AspectInstanceFactory {
private final Object aspectInstance;
/**
* Create a new SingletonAspectInstanceFactory for the given aspect instance.
* @param aspectInstance the singleton aspect instance
*/
public SingletonAspectInstanceFactory(Object aspectInstance) {
Assert.notNull(aspectInstance, "Aspect instance must not be null");
this.aspectInstance = aspectInstance;
}
@Override
public final Object getAspectInstance() {
return this.aspectInstance;
}
@Override
public ClassLoader getAspectClassLoader() {
return this.aspectInstance.getClass().getClassLoader();
}
/**
* Determine the order for this factory's aspect instance,
* either an instance-specific order expressed through implementing
* the {@link org.springframework.core.Ordered} interface,
* or a fallback order.
* @see org.springframework.core.Ordered
* @see #getOrderForAspectClass
*/
@Override
public int getOrder() {
if (this.aspectInstance instanceof Ordered) {
return ((Ordered) this.aspectInstance).getOrder();
}
return getOrderForAspectClass(this.aspectInstance.getClass());
}
/**
* Determine a fallback order for the case that the aspect instance
* does not express an instance-specific order through implementing
* the {@link org.springframework.core.Ordered} interface.
* <p>The default implementation simply returns {@code Ordered.LOWEST_PRECEDENCE}.
* @param aspectClass the aspect class
*/
protected int getOrderForAspectClass(Class<?> aspectClass) {
return Ordered.LOWEST_PRECEDENCE;
}
}
@@ -0,0 +1,116 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj;
import org.aspectj.weaver.tools.PointcutParser;
import org.aspectj.weaver.tools.TypePatternMatcher;
import org.springframework.aop.ClassFilter;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* Spring AOP {@link ClassFilter} implementation using AspectJ type matching.
*
* @author Rod Johnson
* @since 2.0
*/
public class TypePatternClassFilter implements ClassFilter {
private String typePattern;
private TypePatternMatcher aspectJTypePatternMatcher;
/**
* Creates a new instance of the {@link TypePatternClassFilter} class.
* <p>This is the JavaBean constructor; be sure to set the
* {@link #setTypePattern(String) typePattern} property, else a
* no doubt fatal {@link IllegalStateException} will be thrown
* when the {@link #matches(Class)} method is first invoked.
*/
public TypePatternClassFilter() {
}
/**
* Create a fully configured {@link TypePatternClassFilter} using the
* given type pattern.
* @param typePattern the type pattern that AspectJ weaver should parse
* @throws IllegalArgumentException if the supplied {@code typePattern} is {@code null}
* or is recognized as invalid
*/
public TypePatternClassFilter(String typePattern) {
setTypePattern(typePattern);
}
/**
* Set the AspectJ type pattern to match.
* <p>Examples include:
* <code class="code">
* org.springframework.beans.*
* </code>
* This will match any class or interface in the given package.
* <code class="code">
* org.springframework.beans.ITestBean+
* </code>
* This will match the {@code ITestBean} interface and any class
* that implements it.
* <p>These conventions are established by AspectJ, not Spring AOP.
* @param typePattern the type pattern that AspectJ weaver should parse
* @throws IllegalArgumentException if the supplied {@code typePattern} is {@code null}
* or is recognized as invalid
*/
public void setTypePattern(String typePattern) {
Assert.notNull(typePattern);
this.typePattern = typePattern;
this.aspectJTypePatternMatcher =
PointcutParser.getPointcutParserSupportingAllPrimitivesAndUsingContextClassloaderForResolution().
parseTypePattern(replaceBooleanOperators(typePattern));
}
public String getTypePattern() {
return typePattern;
}
/**
* Should the pointcut apply to the given interface or target class?
* @param clazz candidate target class
* @return whether the advice should apply to this candidate target class
* @throws IllegalStateException if no {@link #setTypePattern(String)} has been set
*/
@Override
public boolean matches(Class<?> clazz) {
if (this.aspectJTypePatternMatcher == null) {
throw new IllegalStateException("No 'typePattern' has been set via ctor/setter.");
}
return this.aspectJTypePatternMatcher.matches(clazz);
}
/**
* If a type pattern has been specified in XML, the user cannot
* write {@code and} as "&&" (though &amp;&amp; will work).
* We also allow {@code and} between two sub-expressions.
* <p>This method converts back to {@code &&} for the AspectJ pointcut parser.
*/
private String replaceBooleanOperators(String pcExpr) {
pcExpr = StringUtils.replace(pcExpr," and "," && ");
pcExpr = StringUtils.replace(pcExpr, " or ", " || ");
pcExpr = StringUtils.replace(pcExpr, " not ", " ! ");
return pcExpr;
}
}
@@ -0,0 +1,331 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.AjType;
import org.aspectj.lang.reflect.AjTypeSystem;
import org.aspectj.lang.reflect.PerClauseKind;
import org.springframework.aop.aspectj.AspectJExpressionPointcut;
import org.springframework.aop.framework.AopConfigException;
import org.springframework.core.ParameterNameDiscoverer;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.util.StringUtils;
/**
* Abstract base class for factories that can create Spring AOP Advisors
* given AspectJ classes from classes honoring the AspectJ 5 annotation syntax.
*
* <p>This class handles annotation parsing and validation functionality.
* It does not actually generate Spring AOP Advisors, which is deferred to subclasses.
*
* @author Rod Johnson
* @author Adrian Colyer
* @author Juergen Hoeller
* @since 2.0
*/
public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFactory {
private static final String AJC_MAGIC = "ajc$";
/**
* Find and return the first AspectJ annotation on the given method
* (there <i>should</i> only be one anyway...)
*/
@SuppressWarnings("unchecked")
protected static AspectJAnnotation<?> findAspectJAnnotationOnMethod(Method method) {
Class<?>[] classesToLookFor = new Class<?>[] {
Before.class, Around.class, After.class, AfterReturning.class, AfterThrowing.class, Pointcut.class};
for (Class<?> c : classesToLookFor) {
AspectJAnnotation<?> foundAnnotation = findAnnotation(method, (Class<Annotation>) c);
if (foundAnnotation != null) {
return foundAnnotation;
}
}
return null;
}
private static <A extends Annotation> AspectJAnnotation<A> findAnnotation(Method method, Class<A> toLookFor) {
A result = AnnotationUtils.findAnnotation(method, toLookFor);
if (result != null) {
return new AspectJAnnotation<A>(result);
}
else {
return null;
}
}
/** Logger available to subclasses */
protected final Log logger = LogFactory.getLog(getClass());
protected final ParameterNameDiscoverer parameterNameDiscoverer = new AspectJAnnotationParameterNameDiscoverer();
/**
* We consider something to be an AspectJ aspect suitable for use by the Spring AOP system
* if it has the @Aspect annotation, and was not compiled by ajc. The reason for this latter test
* is that aspects written in the code-style (AspectJ language) also have the annotation present
* when compiled by ajc with the -1.5 flag, yet they cannot be consumed by Spring AOP.
*/
@Override
public boolean isAspect(Class<?> clazz) {
return (hasAspectAnnotation(clazz) && !compiledByAjc(clazz));
}
private boolean hasAspectAnnotation(Class<?> clazz) {
return (AnnotationUtils.findAnnotation(clazz, Aspect.class) != null);
}
/**
* We need to detect this as "code-style" AspectJ aspects should not be
* interpreted by Spring AOP.
*/
private boolean compiledByAjc(Class<?> clazz) {
// The AJTypeSystem goes to great lengths to provide a uniform appearance between code-style and
// annotation-style aspects. Therefore there is no 'clean' way to tell them apart. Here we rely on
// an implementation detail of the AspectJ compiler.
for (Field field : clazz.getDeclaredFields()) {
if (field.getName().startsWith(AJC_MAGIC)) {
return true;
}
}
return false;
}
@Override
public void validate(Class<?> aspectClass) throws AopConfigException {
// If the parent has the annotation and isn't abstract it's an error
if (aspectClass.getSuperclass().getAnnotation(Aspect.class) != null &&
!Modifier.isAbstract(aspectClass.getSuperclass().getModifiers())) {
throw new AopConfigException("[" + aspectClass.getName() + "] cannot extend concrete aspect [" +
aspectClass.getSuperclass().getName() + "]");
}
AjType<?> ajType = AjTypeSystem.getAjType(aspectClass);
if (!ajType.isAspect()) {
throw new NotAnAtAspectException(aspectClass);
}
if (ajType.getPerClause().getKind() == PerClauseKind.PERCFLOW) {
throw new AopConfigException(aspectClass.getName() + " uses percflow instantiation model: " +
"This is not supported in Spring AOP.");
}
if (ajType.getPerClause().getKind() == PerClauseKind.PERCFLOWBELOW) {
throw new AopConfigException(aspectClass.getName() + " uses percflowbelow instantiation model: " +
"This is not supported in Spring AOP.");
}
}
/**
* The pointcut and advice annotations both have an "argNames" member which contains a
* comma-separated list of the argument names. We use this (if non-empty) to build the
* formal parameters for the pointcut.
*/
protected AspectJExpressionPointcut createPointcutExpression(
Method annotatedMethod, Class<?> declarationScope, String[] pointcutParameterNames) {
Class<?> [] pointcutParameterTypes = new Class<?>[0];
if (pointcutParameterNames != null) {
pointcutParameterTypes = extractPointcutParameterTypes(pointcutParameterNames,annotatedMethod);
}
AspectJExpressionPointcut ajexp =
new AspectJExpressionPointcut(declarationScope,pointcutParameterNames,pointcutParameterTypes);
ajexp.setLocation(annotatedMethod.toString());
return ajexp;
}
/**
* Create the pointcut parameters needed by aspectj based on the given argument names
* and the argument types that are available from the adviceMethod. Needs to take into
* account (ignore) any JoinPoint based arguments as these are not pointcut context but
* rather part of the advice execution context (thisJoinPoint, thisJoinPointStaticPart)
*/
private Class<?>[] extractPointcutParameterTypes(String[] argNames, Method adviceMethod) {
Class<?>[] ret = new Class<?>[argNames.length];
Class<?>[] paramTypes = adviceMethod.getParameterTypes();
if (argNames.length > paramTypes.length) {
throw new IllegalStateException("Expecting at least " + argNames.length +
" arguments in the advice declaration, but only found " + paramTypes.length);
}
// Make the simplifying assumption for now that all of the JoinPoint based arguments
// come first in the advice declaration.
int typeOffset = paramTypes.length - argNames.length;
for (int i = 0; i < ret.length; i++) {
ret[i] = paramTypes[i + typeOffset];
}
return ret;
}
protected enum AspectJAnnotationType {
AtPointcut,
AtBefore,
AtAfter,
AtAfterReturning,
AtAfterThrowing,
AtAround
}
/**
* Class modelling an AspectJ annotation, exposing its type enumeration and
* pointcut String.
*/
protected static class AspectJAnnotation<A extends Annotation> {
private static final String[] EXPRESSION_PROPERTIES = new String[] {"value", "pointcut"};
private static Map<Class<?>, AspectJAnnotationType> annotationTypes =
new HashMap<Class<?>, AspectJAnnotationType>();
static {
annotationTypes.put(Pointcut.class,AspectJAnnotationType.AtPointcut);
annotationTypes.put(After.class,AspectJAnnotationType.AtAfter);
annotationTypes.put(AfterReturning.class,AspectJAnnotationType.AtAfterReturning);
annotationTypes.put(AfterThrowing.class,AspectJAnnotationType.AtAfterThrowing);
annotationTypes.put(Around.class,AspectJAnnotationType.AtAround);
annotationTypes.put(Before.class,AspectJAnnotationType.AtBefore);
}
private final A annotation;
private final AspectJAnnotationType annotationType;
private final String pointcutExpression;
private final String argumentNames;
public AspectJAnnotation(A annotation) {
this.annotation = annotation;
this.annotationType = determineAnnotationType(annotation);
// We know these methods exist with the same name on each object,
// but need to invoke them reflectively as there isn't a common interface.
try {
this.pointcutExpression = resolveExpression(annotation);
this.argumentNames = (String) annotation.getClass().getMethod("argNames").invoke(annotation);
}
catch (Exception ex) {
throw new IllegalArgumentException(annotation + " cannot be an AspectJ annotation", ex);
}
}
private AspectJAnnotationType determineAnnotationType(A annotation) {
for (Class<?> type : annotationTypes.keySet()) {
if (type.isInstance(annotation)) {
return annotationTypes.get(type);
}
}
throw new IllegalStateException("Unknown annotation type: " + annotation.toString());
}
private String resolveExpression(A annotation) throws Exception {
String expression = null;
for (String methodName : EXPRESSION_PROPERTIES) {
Method method;
try {
method = annotation.getClass().getDeclaredMethod(methodName);
}
catch (NoSuchMethodException ex) {
method = null;
}
if (method != null) {
String candidate = (String) method.invoke(annotation);
if (StringUtils.hasText(candidate)) {
expression = candidate;
}
}
}
return expression;
}
public AspectJAnnotationType getAnnotationType() {
return this.annotationType;
}
public A getAnnotation() {
return this.annotation;
}
public String getPointcutExpression() {
return this.pointcutExpression;
}
public String getArgumentNames() {
return this.argumentNames;
}
@Override
public String toString() {
return this.annotation.toString();
}
}
/**
* ParameterNameDiscoverer implementation that analyzes the arg names
* specified at the AspectJ annotation level.
*/
private static class AspectJAnnotationParameterNameDiscoverer implements ParameterNameDiscoverer {
@Override
public String[] getParameterNames(Method method) {
if (method.getParameterTypes().length == 0) {
return new String[0];
}
AspectJAnnotation<?> annotation = findAspectJAnnotationOnMethod(method);
if (annotation == null) {
return null;
}
StringTokenizer strTok = new StringTokenizer(annotation.getArgumentNames(), ",");
if (strTok.countTokens() > 0) {
String[] names = new String[strTok.countTokens()];
for (int i = 0; i < names.length; i++) {
names[i] = strTok.nextToken();
}
return names;
}
else {
return null;
}
}
@Override
public String[] getParameterNames(Constructor<?> ctor) {
throw new UnsupportedOperationException("Spring AOP cannot handle constructor advice");
}
}
}
@@ -0,0 +1,142 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
import org.springframework.aop.Advisor;
import org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.util.Assert;
/**
* {@link AspectJAwareAdvisorAutoProxyCreator} subclass that processes all AspectJ
* annotation aspects in the current application context, as well as Spring Advisors.
*
* <p>Any AspectJ annotated classes will automatically be recognized, and their
* advice applied if Spring AOP's proxy-based model is capable of applying it.
* This covers method execution joinpoints.
*
* <p>If the &lt;aop:include&gt; element is used, only @AspectJ beans with names matched by
* an include pattern will be considered as defining aspects to use for Spring auto-proxying.
*
* <p>Processing of Spring Advisors follows the rules established in
* {@link org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator}.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
* @see org.springframework.aop.aspectj.annotation.AspectJAdvisorFactory
*/
@SuppressWarnings("serial")
public class AnnotationAwareAspectJAutoProxyCreator extends AspectJAwareAdvisorAutoProxyCreator {
private List<Pattern> includePatterns;
private AspectJAdvisorFactory aspectJAdvisorFactory = new ReflectiveAspectJAdvisorFactory();
private BeanFactoryAspectJAdvisorsBuilder aspectJAdvisorsBuilder;
/**
* Set a list of regex patterns, matching eligible @AspectJ bean names.
* <p>Default is to consider all @AspectJ beans as eligible.
*/
public void setIncludePatterns(List<String> patterns) {
this.includePatterns = new ArrayList<Pattern>(patterns.size());
for (String patternText : patterns) {
this.includePatterns.add(Pattern.compile(patternText));
}
}
public void setAspectJAdvisorFactory(AspectJAdvisorFactory aspectJAdvisorFactory) {
Assert.notNull(this.aspectJAdvisorFactory, "AspectJAdvisorFactory must not be null");
this.aspectJAdvisorFactory = aspectJAdvisorFactory;
}
@Override
protected void initBeanFactory(ConfigurableListableBeanFactory beanFactory) {
super.initBeanFactory(beanFactory);
this.aspectJAdvisorsBuilder =
new BeanFactoryAspectJAdvisorsBuilderAdapter(beanFactory, this.aspectJAdvisorFactory);
}
@Override
protected List<Advisor> findCandidateAdvisors() {
// Add all the Spring advisors found according to superclass rules.
List<Advisor> advisors = super.findCandidateAdvisors();
// Build Advisors for all AspectJ aspects in the bean factory.
advisors.addAll(this.aspectJAdvisorsBuilder.buildAspectJAdvisors());
return advisors;
}
@Override
protected boolean isInfrastructureClass(Class<?> beanClass) {
// Previously we setProxyTargetClass(true) in the constructor, but that has too
// broad an impact. Instead we now override isInfrastructureClass to avoid proxying
// aspects. I'm not entirely happy with that as there is no good reason not
// to advise aspects, except that it causes advice invocation to go through a
// proxy, and if the aspect implements e.g the Ordered interface it will be
// proxied by that interface and fail at runtime as the advice method is not
// defined on the interface. We could potentially relax the restriction about
// not advising aspects in the future.
return (super.isInfrastructureClass(beanClass) || this.aspectJAdvisorFactory.isAspect(beanClass));
}
/**
* Check whether the given aspect bean is eligible for auto-proxying.
* <p>If no &lt;aop:include&gt; elements were used then "includePatterns" will be
* {@code null} and all beans are included. If "includePatterns" is non-null,
* then one of the patterns must match.
*/
protected boolean isEligibleAspectBean(String beanName) {
if (this.includePatterns == null) {
return true;
}
else {
for (Pattern pattern : this.includePatterns) {
if (pattern.matcher(beanName).matches()) {
return true;
}
}
return false;
}
}
/**
* Subclass of BeanFactoryAspectJAdvisorsBuilderAdapter that delegates to
* surrounding AnnotationAwareAspectJAutoProxyCreator facilities.
*/
private class BeanFactoryAspectJAdvisorsBuilderAdapter extends BeanFactoryAspectJAdvisorsBuilder {
public BeanFactoryAspectJAdvisorsBuilderAdapter(
ListableBeanFactory beanFactory, AspectJAdvisorFactory advisorFactory) {
super(beanFactory, advisorFactory);
}
@Override
protected boolean isEligibleBean(String beanName) {
return AnnotationAwareAspectJAutoProxyCreator.this.isEligibleAspectBean(beanName);
}
}
}
@@ -0,0 +1,104 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import java.lang.reflect.Method;
import java.util.List;
import org.aopalliance.aop.Advice;
import org.springframework.aop.Advisor;
import org.springframework.aop.aspectj.AspectJExpressionPointcut;
import org.springframework.aop.framework.AopConfigException;
/**
* Interface for factories that can create Spring AOP Advisors from classes
* annotated with AspectJ annotation syntax.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
* @see AspectMetadata
* @see org.aspectj.lang.reflect.AjTypeSystem
*/
public interface AspectJAdvisorFactory {
/**
* Determine whether or not the given class is an aspect, as reported
* by AspectJ's {@link org.aspectj.lang.reflect.AjTypeSystem}.
* <p>Will simply return {@code false} if the supposed aspect is
* invalid (such as an extension of a concrete aspect class).
* Will return true for some aspects that Spring AOP cannot process,
* such as those with unsupported instantiation models.
* Use the {@link #validate} method to handle these cases if necessary.
* @param clazz the supposed annotation-style AspectJ class
* @return whether or not this class is recognized by AspectJ as an aspect class
*/
boolean isAspect(Class<?> clazz);
/**
* Is the given class a valid AspectJ aspect class?
* @param aspectClass the supposed AspectJ annotation-style class to validate
* @throws AopConfigException if the class is an invalid aspect
* (which can never be legal)
* @throws NotAnAtAspectException if the class is not an aspect at all
* (which may or may not be legal, depending on the context)
*/
void validate(Class<?> aspectClass) throws AopConfigException;
/**
* Build Spring AOP Advisors for all annotated At-AspectJ methods
* on the specified aspect instance.
* @param aif the aspect instance factory (not the aspect instance itself
* in order to avoid eager instantiation)
* @return a list of advisors for this class
*/
List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aif);
/**
* Build a Spring AOP Advisor for the given AspectJ advice method.
* @param candidateAdviceMethod the candidate advice method
* @param aif the aspect instance factory
* @param declarationOrderInAspect the declaration order within the aspect
* @param aspectName the name of the aspect
* @return {@code null} if the method is not an AspectJ advice method
* or if it is a pointcut that will be used by other advice but will not
* create a Spring advice in its own right
*/
Advisor getAdvisor(Method candidateAdviceMethod,
MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, String aspectName);
/**
* Build a Spring AOP Advice for the given AspectJ advice method.
* @param candidateAdviceMethod the candidate advice method
* @param pointcut the corresponding AspectJ expression pointcut
* @param aif the aspect instance factory
* @param declarationOrderInAspect the declaration order within the aspect
* @param aspectName the name of the aspect
* @return {@code null} if the method is not an AspectJ advice method
* or if it is a pointcut that will be used by other advice but will not
* create a Spring advice in its own right
* @see org.springframework.aop.aspectj.AspectJAroundAdvice
* @see org.springframework.aop.aspectj.AspectJMethodBeforeAdvice
* @see org.springframework.aop.aspectj.AspectJAfterAdvice
* @see org.springframework.aop.aspectj.AspectJAfterReturningAdvice
* @see org.springframework.aop.aspectj.AspectJAfterThrowingAdvice
*/
Advice getAdvice(Method candidateAdviceMethod, AspectJExpressionPointcut pointcut,
MetadataAwareAspectInstanceFactory aif, int declarationOrderInAspect, String aspectName);
}
@@ -0,0 +1,211 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.aspectj.lang.reflect.PerClauseKind;
import org.springframework.aop.Advisor;
import org.springframework.aop.aspectj.AspectJProxyUtils;
import org.springframework.aop.framework.AopConfigException;
import org.springframework.aop.framework.ProxyCreatorSupport;
import org.springframework.aop.support.AopUtils;
import org.springframework.core.OrderComparator;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
/**
* AspectJ-based proxy factory, allowing for programmatic building
* of proxies which include AspectJ aspects (code style as well
* Java 5 annotation style).
*
* @author Rob Harrop
* @author Juergen Hoeller
* @author Ramnivas Laddad
* @since 2.0
* @see #addAspect(Object)
* @see #addAspect(Class)
* @see #getProxy()
* @see #getProxy(ClassLoader)
* @see org.springframework.aop.framework.ProxyFactory
*/
@SuppressWarnings("serial")
public class AspectJProxyFactory extends ProxyCreatorSupport {
/** Cache for singleton aspect instances */
private static final Map<Class<?>, Object> aspectCache = new HashMap<Class<?>, Object>();
private final AspectJAdvisorFactory aspectFactory = new ReflectiveAspectJAdvisorFactory();
/**
* Create a new AspectJProxyFactory.
*/
public AspectJProxyFactory() {
}
/**
* Create a new AspectJProxyFactory.
* <p>Will proxy all interfaces that the given target implements.
* @param target the target object to be proxied
*/
public AspectJProxyFactory(Object target) {
Assert.notNull(target, "Target object must not be null");
setInterfaces(ClassUtils.getAllInterfaces(target));
setTarget(target);
}
/**
* Create a new {@code AspectJProxyFactory}.
* No target, only interfaces. Must add interceptors.
*/
public AspectJProxyFactory(Class<?>[] interfaces) {
setInterfaces(interfaces);
}
/**
* Add the supplied aspect instance to the chain. The type of the aspect instance
* supplied must be a singleton aspect. True singleton lifecycle is not honoured when
* using this method - the caller is responsible for managing the lifecycle of any
* aspects added in this way.
* @param aspectInstance the AspectJ aspect instance
*/
public void addAspect(Object aspectInstance) {
Class<?> aspectClass = aspectInstance.getClass();
String aspectName = aspectClass.getName();
AspectMetadata am = createAspectMetadata(aspectClass, aspectName);
if (am.getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON) {
throw new IllegalArgumentException(
"Aspect class [" + aspectClass.getName() + "] does not define a singleton aspect");
}
addAdvisorsFromAspectInstanceFactory(
new SingletonMetadataAwareAspectInstanceFactory(aspectInstance, aspectName));
}
/**
* Add an aspect of the supplied type to the end of the advice chain.
* @param aspectClass the AspectJ aspect class
*/
public void addAspect(Class<?> aspectClass) {
String aspectName = aspectClass.getName();
AspectMetadata am = createAspectMetadata(aspectClass, aspectName);
MetadataAwareAspectInstanceFactory instanceFactory = createAspectInstanceFactory(am, aspectClass, aspectName);
addAdvisorsFromAspectInstanceFactory(instanceFactory);
}
/**
* Add all {@link Advisor Advisors} from the supplied {@link MetadataAwareAspectInstanceFactory}
* to the current chain. Exposes any special purpose {@link Advisor Advisors} if needed.
* @see AspectJProxyUtils#makeAdvisorChainAspectJCapableIfNecessary(List)
*/
private void addAdvisorsFromAspectInstanceFactory(MetadataAwareAspectInstanceFactory instanceFactory) {
List<Advisor> advisors = this.aspectFactory.getAdvisors(instanceFactory);
advisors = AopUtils.findAdvisorsThatCanApply(advisors, getTargetClass());
AspectJProxyUtils.makeAdvisorChainAspectJCapableIfNecessary(advisors);
OrderComparator.sort(advisors);
addAdvisors(advisors);
}
/**
* Create an {@link AspectMetadata} instance for the supplied aspect type.
*/
private AspectMetadata createAspectMetadata(Class<?> aspectClass, String aspectName) {
AspectMetadata am = new AspectMetadata(aspectClass, aspectName);
if (!am.getAjType().isAspect()) {
throw new IllegalArgumentException("Class [" + aspectClass.getName() + "] is not a valid aspect type");
}
return am;
}
/**
* Create a {@link MetadataAwareAspectInstanceFactory} for the supplied aspect type. If the aspect type
* has no per clause, then a {@link SingletonMetadataAwareAspectInstanceFactory} is returned, otherwise
* a {@link PrototypeAspectInstanceFactory} is returned.
*/
private MetadataAwareAspectInstanceFactory createAspectInstanceFactory(
AspectMetadata am, Class<?> aspectClass, String aspectName) {
MetadataAwareAspectInstanceFactory instanceFactory = null;
if (am.getAjType().getPerClause().getKind() == PerClauseKind.SINGLETON) {
// Create a shared aspect instance.
Object instance = getSingletonAspectInstance(aspectClass);
instanceFactory = new SingletonMetadataAwareAspectInstanceFactory(instance, aspectName);
}
else {
// Create a factory for independent aspect instances.
instanceFactory = new SimpleMetadataAwareAspectInstanceFactory(aspectClass, aspectName);
}
return instanceFactory;
}
/**
* Get the singleton aspect instance for the supplied aspect type. An instance
* is created if one cannot be found in the instance cache.
*/
private Object getSingletonAspectInstance(Class<?> aspectClass) {
synchronized (aspectCache) {
Object instance = aspectCache.get(aspectClass);
if (instance != null) {
return instance;
}
try {
instance = aspectClass.newInstance();
aspectCache.put(aspectClass, instance);
return instance;
}
catch (InstantiationException ex) {
throw new AopConfigException("Unable to instantiate aspect class [" + aspectClass.getName() + "]", ex);
}
catch (IllegalAccessException ex) {
throw new AopConfigException("Cannot access aspect class [" + aspectClass.getName() + "]", ex);
}
}
}
/**
* Create a new proxy according to the settings in this factory.
* <p>Can be called repeatedly. Effect will vary if we've added
* or removed interfaces. Can add and remove interceptors.
* <p>Uses a default class loader: Usually, the thread context class loader
* (if necessary for proxy creation).
* @return the new proxy
*/
@SuppressWarnings("unchecked")
public <T> T getProxy() {
return (T) createAopProxy().getProxy();
}
/**
* Create a new proxy according to the settings in this factory.
* <p>Can be called repeatedly. Effect will vary if we've added
* or removed interfaces. Can add and remove interceptors.
* <p>Uses the given class loader (if necessary for proxy creation).
* @param classLoader the class loader to create the proxy with
* @return the new proxy
*/
@SuppressWarnings("unchecked")
public <T> T getProxy(ClassLoader classLoader) {
return (T) createAopProxy().getProxy(classLoader);
}
}
@@ -0,0 +1,176 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.AjType;
import org.aspectj.lang.reflect.AjTypeSystem;
import org.aspectj.lang.reflect.PerClauseKind;
import org.springframework.aop.Pointcut;
import org.springframework.aop.aspectj.AspectJExpressionPointcut;
import org.springframework.aop.aspectj.TypePatternClassFilter;
import org.springframework.aop.framework.AopConfigException;
import org.springframework.aop.support.ComposablePointcut;
/**
* Metadata for an AspectJ aspect class, with an additional Spring AOP pointcut
* for the per clause.
*
* <p>Uses AspectJ 5 AJType reflection API, so is only supported on Java 5.
* Enables us to work with different AspectJ instantiation models such as
* "singleton", "pertarget" and "perthis".
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
* @see org.springframework.aop.aspectj.AspectJExpressionPointcut
*/
public class AspectMetadata {
/**
* AspectJ reflection information (AspectJ 5 / Java 5 specific).
*/
private final AjType<?> ajType;
/**
* Spring AOP pointcut corresponding to the per clause of the
* aspect. Will be the Pointcut.TRUE canonical instance in the
* case of a singleton, otherwise an AspectJExpressionPointcut.
*/
private final Pointcut perClausePointcut;
/**
* The name of this aspect as defined to Spring (the bean name) -
* allows us to determine if two pieces of advice come from the
* same aspect and hence their relative precedence.
*/
private String aspectName;
/**
* Create a new AspectMetadata instance for the given aspect class.
* @param aspectClass the aspect class
* @param aspectName the name of the aspect
*/
public AspectMetadata(Class<?> aspectClass, String aspectName) {
this.aspectName = aspectName;
Class<?> currClass = aspectClass;
AjType<?> ajType = null;
while (!currClass.equals(Object.class)) {
AjType<?> ajTypeToCheck = AjTypeSystem.getAjType(currClass);
if (ajTypeToCheck.isAspect()) {
ajType = ajTypeToCheck;
break;
}
currClass = currClass.getSuperclass();
}
if (ajType == null) {
throw new IllegalArgumentException("Class '" + aspectClass.getName() + "' is not an @AspectJ aspect");
}
this.ajType = ajType;
if (this.ajType.getDeclarePrecedence().length > 0) {
throw new IllegalArgumentException("DeclarePrecendence not presently supported in Spring AOP");
}
switch (this.ajType.getPerClause().getKind()) {
case SINGLETON :
this.perClausePointcut = Pointcut.TRUE;
return;
case PERTARGET : case PERTHIS :
AspectJExpressionPointcut ajexp = new AspectJExpressionPointcut();
ajexp.setLocation("@Aspect annotation on " + aspectClass.getName());
ajexp.setExpression(findPerClause(aspectClass));
this.perClausePointcut = ajexp;
return;
case PERTYPEWITHIN :
// Works with a type pattern
this.perClausePointcut = new ComposablePointcut(new TypePatternClassFilter(findPerClause(aspectClass)));
return;
default :
throw new AopConfigException(
"PerClause " + ajType.getPerClause().getKind() + " not supported by Spring AOP for " + aspectClass);
}
}
/**
* Extract contents from String of form {@code pertarget(contents)}.
*/
private String findPerClause(Class<?> aspectClass) {
// TODO when AspectJ provides this, we can remove this hack. Hence we don't
// bother to make it elegant. Or efficient. Or robust :-)
String str = aspectClass.getAnnotation(Aspect.class).value();
str = str.substring(str.indexOf("(") + 1);
str = str.substring(0, str.length() - 1);
return str;
}
/**
* Return AspectJ reflection information.
*/
public AjType<?> getAjType() {
return this.ajType;
}
/**
* Return the aspect class.
*/
public Class<?> getAspectClass() {
return this.ajType.getJavaClass();
}
/**
* Return the aspect class.
*/
public String getAspectName() {
return this.aspectName;
}
/**
* Return a Spring pointcut expression for a singleton aspect.
* (e.g. {@code Pointcut.TRUE} if it's a singleton).
*/
public Pointcut getPerClausePointcut() {
return this.perClausePointcut;
}
/**
* Return whether the aspect is defined as "perthis" or "pertarget".
*/
public boolean isPerThisOrPerTarget() {
PerClauseKind kind = getAjType().getPerClause().getKind();
return (kind == PerClauseKind.PERTARGET || kind == PerClauseKind.PERTHIS);
}
/**
* Return whether the aspect is defined as "pertypewithin".
*/
public boolean isPerTypeWithin() {
PerClauseKind kind = getAjType().getPerClause().getKind();
return (kind == PerClauseKind.PERTYPEWITHIN);
}
/**
* Return whether the aspect needs to be lazily instantiated.
*/
public boolean isLazilyInstantiated() {
return (isPerThisOrPerTarget() || isPerTypeWithin());
}
}
@@ -0,0 +1,127 @@
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.AnnotationUtils;
import org.springframework.core.annotation.Order;
import org.springframework.util.ClassUtils;
/**
* {@link org.springframework.aop.aspectj.AspectInstanceFactory} implementation
* backed by a Spring {@link org.springframework.beans.factory.BeanFactory}.
*
* <p>Note that this may instantiate multiple times if using a prototype,
* which probably won't give the semantics you expect.
* Use a {@link LazySingletonAspectInstanceFactoryDecorator}
* to wrap this to ensure only one new aspect comes back.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
* @see org.springframework.beans.factory.BeanFactory
* @see LazySingletonAspectInstanceFactoryDecorator
*/
public class BeanFactoryAspectInstanceFactory implements MetadataAwareAspectInstanceFactory {
private final BeanFactory beanFactory;
private final String name;
private final AspectMetadata aspectMetadata;
/**
* Create a BeanFactoryAspectInstanceFactory. AspectJ will be called to
* introspect to create AJType metadata using the type returned for the
* given bean name from the BeanFactory.
* @param beanFactory BeanFactory to obtain instance(s) from
* @param name name of the bean
*/
public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name) {
this(beanFactory, name, beanFactory.getType(name));
}
/**
* Create a BeanFactoryAspectInstanceFactory, providing a type that AspectJ should
* introspect to create AJType metadata. Use if the BeanFactory may consider the type
* to be a subclass (as when using CGLIB), and the information should relate to a superclass.
* @param beanFactory BeanFactory to obtain instance(s) from
* @param name the name of the bean
* @param type the type that should be introspected by AspectJ
*/
public BeanFactoryAspectInstanceFactory(BeanFactory beanFactory, String name, Class<?> type) {
this.beanFactory = beanFactory;
this.name = name;
this.aspectMetadata = new AspectMetadata(type, name);
}
@Override
public Object getAspectInstance() {
return this.beanFactory.getBean(this.name);
}
@Override
public ClassLoader getAspectClassLoader() {
if (this.beanFactory instanceof ConfigurableBeanFactory) {
return ((ConfigurableBeanFactory) this.beanFactory).getBeanClassLoader();
}
else {
return ClassUtils.getDefaultClassLoader();
}
}
@Override
public AspectMetadata getAspectMetadata() {
return this.aspectMetadata;
}
/**
* Determine the order for this factory's target aspect, either
* an instance-specific order expressed through implementing the
* {@link org.springframework.core.Ordered} interface (only
* checked for singleton beans), or an order expressed through the
* {@link org.springframework.core.annotation.Order} annotation
* at the class level.
* @see org.springframework.core.Ordered
* @see org.springframework.core.annotation.Order
*/
@Override
public int getOrder() {
Class<?> type = this.beanFactory.getType(this.name);
if (type != null) {
if (Ordered.class.isAssignableFrom(type) && this.beanFactory.isSingleton(this.name)) {
return ((Ordered) this.beanFactory.getBean(this.name)).getOrder();
}
Order order = AnnotationUtils.findAnnotation(type, Order.class);
if (order != null) {
return order.value();
}
}
return Ordered.LOWEST_PRECEDENCE;
}
@Override
public String toString() {
return getClass().getSimpleName() + ": bean name '" + this.name + "'";
}
}
@@ -0,0 +1,162 @@
/*
* Copyright 2002-2008 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import org.aspectj.lang.reflect.PerClauseKind;
import org.springframework.aop.Advisor;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.beans.factory.ListableBeanFactory;
import org.springframework.util.Assert;
/**
* Helper for retrieving @AspectJ beans from a BeanFactory and building
* Spring Advisors based on them, for use with auto-proxying.
*
* @author Juergen Hoeller
* @since 2.0.2
* @see AnnotationAwareAspectJAutoProxyCreator
*/
public class BeanFactoryAspectJAdvisorsBuilder {
private final ListableBeanFactory beanFactory;
private final AspectJAdvisorFactory advisorFactory;
private List<String> aspectBeanNames;
private final Map<String, List<Advisor>> advisorsCache = new HashMap<String, List<Advisor>>();
private final Map<String, MetadataAwareAspectInstanceFactory> aspectFactoryCache =
new HashMap<String, MetadataAwareAspectInstanceFactory>();
/**
* Create a new BeanFactoryAspectJAdvisorsBuilder for the given BeanFactory.
* @param beanFactory the ListableBeanFactory to scan
*/
public BeanFactoryAspectJAdvisorsBuilder(ListableBeanFactory beanFactory) {
this(beanFactory, new ReflectiveAspectJAdvisorFactory());
}
/**
* Create a new BeanFactoryAspectJAdvisorsBuilder for the given BeanFactory.
* @param beanFactory the ListableBeanFactory to scan
* @param advisorFactory the AspectJAdvisorFactory to build each Advisor with
*/
public BeanFactoryAspectJAdvisorsBuilder(ListableBeanFactory beanFactory, AspectJAdvisorFactory advisorFactory) {
Assert.notNull(beanFactory, "ListableBeanFactory must not be null");
Assert.notNull(advisorFactory, "AspectJAdvisorFactory must not be null");
this.beanFactory = beanFactory;
this.advisorFactory = advisorFactory;
}
/**
* Look for AspectJ-annotated aspect beans in the current bean factory,
* and return to a list of Spring AOP Advisors representing them.
* <p>Creates a Spring Advisor for each AspectJ advice method.
* @return the list of {@link org.springframework.aop.Advisor} beans
* @see #isEligibleBean
*/
public List<Advisor> buildAspectJAdvisors() {
List<String> aspectNames = null;
synchronized (this) {
aspectNames = this.aspectBeanNames;
if (aspectNames == null) {
List<Advisor> advisors = new LinkedList<Advisor>();
aspectNames = new LinkedList<String>();
String[] beanNames =
BeanFactoryUtils.beanNamesForTypeIncludingAncestors(this.beanFactory, Object.class, true, false);
for (String beanName : beanNames) {
if (!isEligibleBean(beanName)) {
continue;
}
// We must be careful not to instantiate beans eagerly as in this
// case they would be cached by the Spring container but would not
// have been weaved
Class<?> beanType = this.beanFactory.getType(beanName);
if (beanType == null) {
continue;
}
if (this.advisorFactory.isAspect(beanType)) {
aspectNames.add(beanName);
AspectMetadata amd = new AspectMetadata(beanType, beanName);
if (amd.getAjType().getPerClause().getKind() == PerClauseKind.SINGLETON) {
MetadataAwareAspectInstanceFactory factory =
new BeanFactoryAspectInstanceFactory(this.beanFactory, beanName);
List<Advisor> classAdvisors = this.advisorFactory.getAdvisors(factory);
if (this.beanFactory.isSingleton(beanName)) {
this.advisorsCache.put(beanName, classAdvisors);
}
else {
this.aspectFactoryCache.put(beanName, factory);
}
advisors.addAll(classAdvisors);
}
else {
// Per target or per this.
if (this.beanFactory.isSingleton(beanName)) {
throw new IllegalArgumentException("Bean with name '" + beanName +
"' is a singleton, but aspect instantiation model is not singleton");
}
MetadataAwareAspectInstanceFactory factory =
new PrototypeAspectInstanceFactory(this.beanFactory, beanName);
this.aspectFactoryCache.put(beanName, factory);
advisors.addAll(this.advisorFactory.getAdvisors(factory));
}
}
}
this.aspectBeanNames = aspectNames;
return advisors;
}
}
if (aspectNames.isEmpty()) {
return Collections.emptyList();
}
List<Advisor> advisors = new LinkedList<Advisor>();
for (String aspectName : aspectNames) {
List<Advisor> cachedAdvisors = this.advisorsCache.get(aspectName);
if (cachedAdvisors != null) {
advisors.addAll(cachedAdvisors);
}
else {
MetadataAwareAspectInstanceFactory factory = this.aspectFactoryCache.get(aspectName);
advisors.addAll(this.advisorFactory.getAdvisors(factory));
}
}
return advisors;
}
/**
* Return whether the aspect bean with the given name is eligible.
* @param beanName the name of the aspect bean
* @return whether the bean is eligible
*/
protected boolean isEligibleBean(String beanName) {
return true;
}
}
@@ -0,0 +1,269 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import java.lang.reflect.Method;
import org.aopalliance.aop.Advice;
import org.aspectj.lang.reflect.PerClauseKind;
import org.springframework.aop.Pointcut;
import org.springframework.aop.aspectj.AspectJExpressionPointcut;
import org.springframework.aop.aspectj.AspectJPrecedenceInformation;
import org.springframework.aop.aspectj.InstantiationModelAwarePointcutAdvisor;
import org.springframework.aop.aspectj.annotation.AbstractAspectJAdvisorFactory.AspectJAnnotation;
import org.springframework.aop.support.DynamicMethodMatcherPointcut;
import org.springframework.aop.support.Pointcuts;
/**
* Internal implementation of AspectJPointcutAdvisor.
* Note that there will be one instance of this advisor for each target method.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
*/
class InstantiationModelAwarePointcutAdvisorImpl
implements InstantiationModelAwarePointcutAdvisor, AspectJPrecedenceInformation {
private final AspectJExpressionPointcut declaredPointcut;
private Pointcut pointcut;
private final MetadataAwareAspectInstanceFactory aspectInstanceFactory;
private final Method method;
private final boolean lazy;
private final AspectJAdvisorFactory atAspectJAdvisorFactory;
private Advice instantiatedAdvice;
private int declarationOrder;
private String aspectName;
private Boolean isBeforeAdvice;
private Boolean isAfterAdvice;
public InstantiationModelAwarePointcutAdvisorImpl(AspectJAdvisorFactory af, AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif, Method method, int declarationOrderInAspect, String aspectName) {
this.declaredPointcut = ajexp;
this.method = method;
this.atAspectJAdvisorFactory = af;
this.aspectInstanceFactory = aif;
this.declarationOrder = declarationOrderInAspect;
this.aspectName = aspectName;
if (aif.getAspectMetadata().isLazilyInstantiated()) {
// Static part of the pointcut is a lazy type.
Pointcut preInstantiationPointcut =
Pointcuts.union(aif.getAspectMetadata().getPerClausePointcut(), this.declaredPointcut);
// Make it dynamic: must mutate from pre-instantiation to post-instantiation state.
// If it's not a dynamic pointcut, it may be optimized out
// by the Spring AOP infrastructure after the first evaluation.
this.pointcut = new PerTargetInstantiationModelPointcut(this.declaredPointcut, preInstantiationPointcut, aif);
this.lazy = true;
}
else {
// A singleton aspect.
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
this.pointcut = declaredPointcut;
this.lazy = false;
}
}
/**
* The pointcut for Spring AOP to use. Actual behaviour of the pointcut will change
* depending on the state of the advice.
*/
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
/**
* This is only of interest for Spring AOP: AspectJ instantiation semantics
* are much richer. In AspectJ terminology, all a return of {@code true}
* means here is that the aspect is not a SINGLETON.
*/
@Override
public boolean isPerInstance() {
return (getAspectMetadata().getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON);
}
/**
* Return the AspectJ AspectMetadata for this advisor.
*/
public AspectMetadata getAspectMetadata() {
return this.aspectInstanceFactory.getAspectMetadata();
}
/**
* Lazily instantiate advice if necessary.
*/
@Override
public synchronized Advice getAdvice() {
if (this.instantiatedAdvice == null) {
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
}
return this.instantiatedAdvice;
}
@Override
public boolean isLazy() {
return this.lazy;
}
@Override
public synchronized boolean isAdviceInstantiated() {
return (this.instantiatedAdvice != null);
}
private Advice instantiateAdvice(AspectJExpressionPointcut pcut) {
return this.atAspectJAdvisorFactory.getAdvice(
this.method, pcut, this.aspectInstanceFactory, this.declarationOrder, this.aspectName);
}
public MetadataAwareAspectInstanceFactory getAspectInstanceFactory() {
return this.aspectInstanceFactory;
}
public AspectJExpressionPointcut getDeclaredPointcut() {
return this.declaredPointcut;
}
@Override
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
@Override
public String getAspectName() {
return this.aspectName;
}
@Override
public int getDeclarationOrder() {
return this.declarationOrder;
}
@Override
public boolean isBeforeAdvice() {
if (this.isBeforeAdvice == null) {
determineAdviceType();
}
return this.isBeforeAdvice;
}
@Override
public boolean isAfterAdvice() {
if (this.isAfterAdvice == null) {
determineAdviceType();
}
return this.isAfterAdvice;
}
/**
* Duplicates some logic from getAdvice, but importantly does not force
* creation of the advice.
*/
private void determineAdviceType() {
AspectJAnnotation<?> aspectJAnnotation =
AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(this.method);
if (aspectJAnnotation == null) {
this.isBeforeAdvice = false;
this.isAfterAdvice = false;
}
else {
switch (aspectJAnnotation.getAnnotationType()) {
case AtAfter:
case AtAfterReturning:
case AtAfterThrowing:
this.isAfterAdvice = true;
this.isBeforeAdvice = false;
break;
case AtAround:
case AtPointcut:
this.isAfterAdvice = false;
this.isBeforeAdvice = false;
break;
case AtBefore:
this.isAfterAdvice = false;
this.isBeforeAdvice = true;
}
}
}
@Override
public String toString() {
return "InstantiationModelAwarePointcutAdvisor: expression [" + getDeclaredPointcut().getExpression() +
"]; advice method [" + this.method + "]; perClauseKind=" +
this.aspectInstanceFactory.getAspectMetadata().getAjType().getPerClause().getKind();
}
/**
* Pointcut implementation that changes its behaviour when the advice is instantiated.
* Note that this is a <i>dynamic</i> pointcut. Otherwise it might
* be optimized out if it does not at first match statically.
*/
private class PerTargetInstantiationModelPointcut extends DynamicMethodMatcherPointcut {
private final AspectJExpressionPointcut declaredPointcut;
private final Pointcut preInstantiationPointcut;
private LazySingletonAspectInstanceFactoryDecorator aspectInstanceFactory;
private PerTargetInstantiationModelPointcut(AspectJExpressionPointcut declaredPointcut,
Pointcut preInstantiationPointcut, MetadataAwareAspectInstanceFactory aspectInstanceFactory) {
this.declaredPointcut = declaredPointcut;
this.preInstantiationPointcut = preInstantiationPointcut;
if (aspectInstanceFactory instanceof LazySingletonAspectInstanceFactoryDecorator) {
this.aspectInstanceFactory = (LazySingletonAspectInstanceFactoryDecorator) aspectInstanceFactory;
}
}
@Override
public boolean matches(Method method, Class<?> targetClass) {
// We're either instantiated and matching on declared pointcut, or uninstantiated matching on either pointcut
return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass)) ||
this.preInstantiationPointcut.getMethodMatcher().matches(method, targetClass);
}
@Override
public boolean matches(Method method, Class<?> targetClass, Object[] args) {
// This can match only on declared pointcut.
return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass));
}
private boolean isAspectMaterialized() {
return (this.aspectInstanceFactory == null || this.aspectInstanceFactory.isMaterialized());
}
}
}
@@ -0,0 +1,82 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import org.springframework.util.Assert;
/**
* Decorator to cause a {@link MetadataAwareAspectInstanceFactory} to instantiate only once.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
*/
public class LazySingletonAspectInstanceFactoryDecorator implements MetadataAwareAspectInstanceFactory {
private final MetadataAwareAspectInstanceFactory maaif;
private volatile Object materialized;
/**
* Create a new lazily initializing decorator for the given AspectInstanceFactory.
* @param maaif the MetadataAwareAspectInstanceFactory to decorate
*/
public LazySingletonAspectInstanceFactoryDecorator(MetadataAwareAspectInstanceFactory maaif) {
Assert.notNull(maaif, "AspectInstanceFactory must not be null");
this.maaif = maaif;
}
@Override
public synchronized Object getAspectInstance() {
if (this.materialized == null) {
synchronized (this) {
if (this.materialized == null) {
this.materialized = this.maaif.getAspectInstance();
}
}
}
return this.materialized;
}
public boolean isMaterialized() {
return (this.materialized != null);
}
@Override
public ClassLoader getAspectClassLoader() {
return this.maaif.getAspectClassLoader();
}
@Override
public AspectMetadata getAspectMetadata() {
return this.maaif.getAspectMetadata();
}
@Override
public int getOrder() {
return this.maaif.getOrder();
}
@Override
public String toString() {
return "LazySingletonAspectInstanceFactoryDecorator: decorating " + this.maaif;
}
}
@@ -0,0 +1,42 @@
/*
* Copyright 2002-2007 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import org.springframework.aop.aspectj.AspectInstanceFactory;
/**
* Subinterface of {@link org.springframework.aop.aspectj.AspectInstanceFactory}
* that returns {@link AspectMetadata} associated with AspectJ-annotated classes.
*
* <p>Ideally, AspectInstanceFactory would include this method itself, but because
* AspectMetadata uses Java-5-only {@link org.aspectj.lang.reflect.AjType},
* we need to split out this subinterface.
*
* @author Rod Johnson
* @since 2.0
* @see AspectMetadata
* @see org.aspectj.lang.reflect.AjType
*/
public interface MetadataAwareAspectInstanceFactory extends AspectInstanceFactory {
/**
* Return the AspectJ AspectMetadata for this factory's aspect.
* @return the aspect metadata
*/
AspectMetadata getAspectMetadata();
}
@@ -0,0 +1,51 @@
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.aspectj.annotation;
import org.springframework.aop.framework.AopConfigException;
/**
* Extension of AopConfigException thrown when trying to perform
* an advisor generation operation on a class that is not an
* AspectJ annotation-style aspect.
*
* @author Rod Johnson
* @since 2.0
*/
@SuppressWarnings("serial")
public class NotAnAtAspectException extends AopConfigException {
private Class<?> nonAspectClass;
/**
* Create a new NotAnAtAspectException for the given class.
* @param nonAspectClass the offending class
*/
public NotAnAtAspectException(Class<?> nonAspectClass) {
super(nonAspectClass.getName() + " is not an @AspectJ aspect");
this.nonAspectClass = nonAspectClass;
}
/**
* Returns the offending class.
*/
public Class<?> getNonAspectClass() {
return this.nonAspectClass;
}
}

Some files were not shown because too many files have changed in this diff Show More