Commit Graph

3906 Commits

Author SHA1 Message Date
Arjen Poutsma adc5aa7a69 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4196 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-08 11:12:54 +00:00
Arjen Poutsma 7717b8cb5a SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4195 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-08 10:50:45 +00:00
Arjen Poutsma 16bae7e143 SPR-7354 - Added equivalent of JAX-RS @Consumes to Spring MVC
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4194 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-08 09:26:17 +00:00
Rossen Stoyanchev bdc1544091 Javadoc updates
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4193 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-07 22:16:41 +00:00
Rossen Stoyanchev c0692e2ddf ModelAndViewContainer related refinements
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4192 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-07 18:09:28 +00:00
Sam Brannen 8ce2377066 fixed typo
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4191 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-07 08:00:23 +00:00
Rossen Stoyanchev cf6046e2dc SPR-8217 adding one class missed on last checkin
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4190 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 20:33:10 +00:00
Rossen Stoyanchev 64fbd3740d SPR-8217 update MVC namespace to use HandlerMethod infrastructure
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4189 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 20:28:47 +00:00
Rossen Stoyanchev 5338b4f012 Configurable arg resolvers and return value handlers
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4188 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 16:55:21 +00:00
Rossen Stoyanchev bc794c1304 Replace ModelAndViewContainer parameter with Object
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4187 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 15:30:19 +00:00
Rossen Stoyanchev 26f332b600 SPR-8216 Replicate ServletAnnotationControllerTests for HandlerMethod infrastructure
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4186 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 15:30:01 +00:00
Rossen Stoyanchev 674fd869b5 SPR-8215 Fix issue with tests compiling
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4185 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 11:52:18 +00:00
Rossen Stoyanchev cd93c27598 SPR-8215 Move HandlerMethod code into trunk
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4184 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-06 11:30:59 +00:00
Arjen Poutsma ed38afc3dd Allow for customization of the media type for forms.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4180 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-05 09:48:09 +00:00
Chris Beams 8dedf111bc 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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4178 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-05 03:45:38 +00:00
Sam Brannen 772aee728b polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4177 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-04 22:06:05 +00:00
Sam Brannen b953ffc0be polishing
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4176 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-04 22:05:49 +00:00
Chris Beams 30fc529379 Touch up ApplicationContextInitializer Javadoc
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4172 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-04 14:57:51 +00:00
Chris Beams 1dd763da18 Make ConfigurationClassBeanDefinitionReader public
Issue: SPR-8200

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4171 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-04 14:14:17 +00:00
Arjen Poutsma 0dd43ab107 SPR-7805 - Add support for package binding in the JibxMashaller
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4169 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-04 08:50:15 +00:00
Sam Brannen 190da51082 [SPR-6184] Implemented recursive search for configuration classes; introduced LocationsResolver strategy in ContextLoaderUtils with ResourcePathLocationsResolver and ClassNameLocationsResolver implementations.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4168 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 23:10:28 +00:00
Sam Brannen 29c33bcd7d [SPR-6184] Refactored internals of ContextLoaderUtils; @Ignore'd broken test.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4166 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 17:45:20 +00:00
Sam Brannen d63dba327d [SPR-6184] Updated TODOs.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4165 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 17:23:57 +00:00
Sam Brannen 9d601f8504 [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.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4164 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 17:22:43 +00:00
Sam Brannen 619ac47b00 Removed unnecessary declaration of @TestExecutionListeners.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4163 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 17:20:02 +00:00
Sam Brannen 7d88c46caa [SPR-6184] Extracted ContextLoader resolution functionality from TestContext into a new ContextLoaderUtils utility class.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4162 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 17:00:45 +00:00
Sam Brannen f4d500dfeb [SPR-6184] Introduced ResourceTypeAwareContextLoader interface and removed dependency on AnnotationConfigContextLoader in TestContext.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4161 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 16:37:24 +00:00
Sam Brannen caad437248 polishing JavaDoc
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4160 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 15:26:13 +00:00
Sam Brannen dac8a4087c [SPR-6184] Simplified AnnotationConfigContextLoader in TestContext.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4159 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 15:16:13 +00:00
Sam Brannen f2c2fed6e1 [SPR-6184] AnnotationConfigContextLoader now generates a default configuration class name; fleshed out documentation of AnnotationConfigContextLoader; introduced sub-package and suite for configuration class tests.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4158 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-03 14:37:29 +00:00
Andy Clement 3b666f9897 SPR-8174: varargs and primitive handling in SpEL
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4157 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-01 21:59:25 +00:00
Andy Clement 5b07305e7d SPR-7840: comparator dealing with nulls
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4156 50f2f4bb-b051-0410-bef5-90022cba6387
2011-04-01 18:51:35 +00:00
Chris Beams 0e2ce565c9 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.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4151 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 14:28:30 +00:00
Chris Beams 63fdcbc1dc Fix obscure STS error
Remove all bean configuration files from .springBeans to avoid cryptic
STS error.

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4150 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 14:28:08 +00:00
Rossen Stoyanchev 3473219bad Predictable index position for BindingResult keys and parameter annotation convenience methods in MethodParameter
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4149 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 14:16:37 +00:00
Chris Beams 2de526d31e Increase visibility of MapPropertySource constructor
Was protected due to oversight, now public.

Issue: SPR-8107

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4148 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 12:29:32 +00:00
Chris Beams 9e8259198f 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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4147 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 12:29:12 +00:00
Chris Beams 48089d0925 Propagate wrapped exception in SessionFactoryUtils
Improve stack traces in certain Hibernate failure cases by properly
chaining the cause exception.

Issue: SPR-7933

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4146 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 12:07:30 +00:00
Chris Beams 54a5a39de9 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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4145 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 12:06:58 +00:00
Chris Beams 1271acb8eb 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

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4144 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 12:06:36 +00:00
Sam Brannen 3c25a17ddf [SPR-6184] AnnotationConfigContextLoader now calls AnnotationConfigApplicationContext's register(Class<?>...) method in one go, via var-args.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4142 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-31 00:00:31 +00:00
Sam Brannen d20150b0d5 [SPR-6184] AnnotationConfigContextLoader now extends AbstractGenericContextLoader; added new extension points to AbstractGenericContextLoader.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4141 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-30 23:50:19 +00:00
Sam Brannen 8c4a19caf8 [SPR-6184] Initial draft of the new AnnotationConfigContextLoader.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4132 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-29 23:42:59 +00:00
Sam Brannen 80e0a5b8a5 [SPR-6184] Initial draft of the new AnnotationConfigContextLoader.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4131 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-29 23:38:37 +00:00
Sam Brannen c9ae95c578 [SPR-6184] Work in Progress
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4129 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-28 21:45:14 +00:00
Sam Brannen e3526bde80 Updating JUnit and TestNG versions for IDEs and Maven.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4128 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-28 19:59:09 +00:00
Sam Brannen 2c90cdf8e6 org.springframework.spring-parent can now be imported into Eclipse
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4127 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-28 19:58:03 +00:00
Sam Brannen 2bee329d1e [SPR-8089] Added TODOs.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4126 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-28 19:01:33 +00:00
Sam Brannen 956905a88d [SPR-8089] re-ignoring JMX tests that require the presence of jmxremote_optional.jar.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4124 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-28 18:38:34 +00:00
Sam Brannen 607d73b161 [SPR-8089] re-ignoring JMX tests that require the presence of jmxremote_optional.jar.
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@4123 50f2f4bb-b051-0410-bef5-90022cba6387
2011-03-28 18:26:30 +00:00