Commit Graph

3958 Commits

Author SHA1 Message Date
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