Commit Graph

5024 Commits

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