Commit Graph

5006 Commits

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