Commit Graph

12151 Commits

Author SHA1 Message Date
Juergen Hoeller
2dae4d8134 Deprecated FormTag's "commandName" in favor of "modelAttribute"
Issue: SPR-14094
2016-03-29 12:09:16 +02:00
Sam Brannen
26bbb6e767 Polishing 2016-03-28 16:17:47 +02:00
Juergen Hoeller
b2a17ba537 RequestHeaderMapMethodArgumentResolver defensively checks for non-existing header values
Issue: SPR-14091
2016-03-27 14:07:25 +02:00
Sam Brannen
4fa11e334f Test @ManagedNotification as a merged, composed annotation
Issue: SPR-13973
2016-03-26 20:10:20 +01:00
Juergen Hoeller
54aeb7a5d6 Cache key classes implement Comparable and consistently provide a toString representation
Issue: SPR-14017
2016-03-26 14:32:10 +01:00
Sam Brannen
a8b5ea1c51 Polishing 2016-03-26 01:27:37 +01:00
Sam Brannen
4742aa0bfe Test @JmsListener as a merged composed annotation
Issue: SPR-13973
2016-03-26 01:09:35 +01:00
Sam Brannen
2353f39ee4 Clean up warnings 2016-03-26 01:08:58 +01:00
Sam Brannen
4836d06704 Test @Scheduled as a merged composable annotation
Issue: SPR-13973
2016-03-26 00:47:02 +01:00
Juergen Hoeller
c6ff0951fc Polishing 2016-03-25 23:46:18 +01:00
Juergen Hoeller
94cb7786c8 Polishing 2016-03-25 23:28:45 +01:00
Brian Clozel
862d10c128 Support new default values in WebDataBinder
Prior to this commit, binding a `@ModelAttribute` object as a Controller
handler paramater would instantiate the object and set all its
properties, fetching data from the request. When no data is available,
the WebDataBinder tries to bind default "empty" values:
* Boolean.FALSE for boolean types
* empty arrays for array types
* null by default

This commit adds the new default empty values:
* empty Collections for Collection types
* empty Maps for Map types

Rather than using empty implementations provided by `Collections.empty`
(which are not mutable), we're using the closest possible target type
and real implementations, provided by the `CollectionFactory`.

Issue: SPR-13502
2016-03-25 21:37:08 +01:00
Sam Brannen
b0c6357540 Test @Sql as a merged composed annotation
Issue: SPR-13973
2016-03-25 20:47:16 +01:00
Phillip Webb
fc839331a7 Refine TestPropertySourceUtils for direct use
Update methods in TestPropertySourceUtils to accept var-args and allow
addInlinedProperties to be called more than once.

Issue: SPR-14088
2016-03-25 11:12:27 -07:00
Sam Brannen
fee056a1b1 Simplify search algorithms in AnnotatedElementUtils
This commit introduces a boolean alwaysProcesses() method in the
Processor API which allows for simplification across all search
algorithms within AnnotatedElementUtils.

Specifically, it is no longer necessary for process() methods to verify
that the supplied annotation is actually the sought target annotation.

In addition, duplicated code has been extracted into common methods
(e.g., hasMetaAnnotationTypes()) and common Processor implementations
(e.g., AlwaysTrueBooleanAnnotationProcessor).
2016-03-25 15:59:54 +01:00
Sam Brannen
c6f6e192c0 Support @Sql as a merged composed annotation
Issue: SPR-13973
2016-03-25 00:51:42 +01:00
Sam Brannen
d572b022cc Support @JmsListener as a merged composed annotation
Issue: SPR-13973
2016-03-25 00:51:24 +01:00
Sam Brannen
c6b1f38651 Support @Scheduled as a merged composable annotation
Issue: SPR-13973
2016-03-25 00:49:59 +01:00
Sam Brannen
b6d9fd39e6 Support @ManagedNotification & @ManagedOperationParameter as merged annotations
Issue: SPR-13973
2016-03-25 00:49:21 +01:00
Sam Brannen
6b7731cc89 Cross reference getMergedRepeatableAnnotations() in AnnotationUtils 2016-03-25 00:47:44 +01:00
Juergen Hoeller
775bcccd10 Polishing 2016-03-24 21:44:16 +01:00
Juergen Hoeller
852212d0c5 Polishing 2016-03-24 19:57:54 +01:00
Sam Brannen
46e0484bf8 Support searches for merged repeatable annotations with "get" semantics
This commit picks up where 2535469099 left off with added support for
"get" search semantics for merged repeatable annotations.

Specifically, this commit introduces a new
getMergedRepeatableAnnotations() method in AnnotatedElementUtils.

Issue: SPR-13973
2016-03-24 19:27:32 +01:00
Sam Brannen
8d0083ca96 Polishing 2016-03-24 19:27:32 +01:00
Juergen Hoeller
517ebd1d3e Consistent formatting 2016-03-24 19:22:50 +01:00
Brian Clozel
2cdb0cf690 Temporarily comment quartz-scheduler external API 2016-03-24 17:52:54 +01:00
Juergen Hoeller
06db5aa43f Polishing 2016-03-24 15:34:17 +01:00
Juergen Hoeller
9a52c81443 UriComponentsBuilder allows more efficient (and less restrictive) CORS origin comparison
Also introduces a specifically narrowed cloneBuilder() method for UriComponentsBuilders.

Issue: SPR-14080
2016-03-24 15:33:44 +01:00
Juergen Hoeller
abe7345008 DefaultCorsProcessor checks for existing CORS response before attempting to compare origin
Issue: SPR-14080
2016-03-24 15:08:19 +01:00
Juergen Hoeller
55f1c98c39 Consistent alphabetical sorting of directory content
Issue: SPR-14085
2016-03-24 15:00:17 +01:00
Sam Brannen
1ec35e9c62 Support searches for multiple merged annotations with "get" semantics
This commit picks up where a5139f3c66 left off with added support for
"get" search semantics for multiple merged annotations.

Specifically, this commit introduces a new getAllMergedAnnotations()
method in AnnotatedElementUtils.

Issue: SPR-13486
2016-03-24 14:46:56 +01:00
Juergen Hoeller
3eff478c45 RequestMethodsRequestCondition uses common HttpMethod resolution
Issue: SPR-13776
2016-03-24 13:54:00 +01:00
Juergen Hoeller
86d5c5c0f7 Avoid putIfAbsent call in HttpEntityMethodProcessor
Issue: SPR-14086
2016-03-24 13:51:48 +01:00
Juergen Hoeller
7e4563a825 Upgrade to XStream 1.4.9
Issue: SPR-14084
2016-03-24 13:51:03 +01:00
Sam Brannen
2453edbb10 Reorganize methods in AnnotatedElementUtils 2016-03-24 13:18:54 +01:00
Brian Clozel
38714b35e7 Update Javadoc external links 2016-03-24 11:40:27 +01:00
Brian Clozel
20bb25647f Polish 2016-03-24 10:56:46 +01:00
Sam Brannen
2535469099 Support repeatable annotations as composed annotations
Prior to this commit, AnnotationUtils supported searching for
repeatable annotations even if the repeatable annotation was declared
on a custom stereotype annotation. However, there was no support for
merging of attributes in composed repeatable annotations. In other
words, it was not possible for a custom annotation to override
attributes in a repeatable annotation.

This commit addresses this by introducing
findMergedRepeatableAnnotations() methods in AnnotatedElementUtils.
These new methods provide full support for explicit annotation
attribute overrides configured via @AliasFor (as well as
convention-based overrides) with "find semantics".

Issue: SPR-13973
2016-03-23 21:58:34 +01:00
Juergen Hoeller
63115ed6eb Do not use annotation detection shortcuts on Class
Issue: SPR-13440
2016-03-23 19:27:30 +01:00
Juergen Hoeller
c5b318a4cc Revised 4.3 signatures for MethodParameter/DependencyDescriptor
Issue: SPR-13440
2016-03-23 18:52:27 +01:00
Juergen Hoeller
9af12d290e Polishing 2016-03-23 18:39:29 +01:00
Juergen Hoeller
5025c615b1 Consistent use of AnnotatedElementUtils.findMergedAnnotation/hasAnnotation
Issue: SPR-13440
2016-03-23 18:39:20 +01:00
Juergen Hoeller
311d4c95a3 Revised newline handling tests pass on Windows now
Issue: SPR-13503
2016-03-23 18:35:26 +01:00
Juergen Hoeller
3c18a4533a Ignored test removed (not intended to work)
Issue: SPR-14058
2016-03-23 18:15:29 +01:00
Brian Clozel
e079a726f8 Polish 2016-03-23 16:40:12 +01:00
Brian Clozel
c7bd3b8440 Support HTTP range requests in Controllers
Prior to this commit, HTTP Range requests were only supported by the
ResourceHttpRequestHandler when serving static resources.

This commit improves the ResourceHttpMessageConverter that
now supports partial writes of Resources.
For this, the `HttpEntityMethodProcessor` and
`RequestResponseBodyMethodProcessor` now wrap resources with HTTP
range information in a `HttpRangeResource`, if necessary. The
message converter handle those types and knows how to handle partial
writes.

Controller methods can now handle Range requests for
return types that extend Resource or HttpEntity:

    @RequestMapping("/example/video.mp4")
    public Resource handler() { }

    @RequestMapping("/example/video.mp4")
    public HttpEntity<Resource> handler() { }

Issue: SPR-13834
2016-03-23 16:40:12 +01:00
Brian Clozel
15fe8279e6 Reset Expires HTTP header when caching configured
Just like SPR-13252 addressed this issue for the "Pragma" header, this
issue resets the HTTP 1.0 "Expires" header.
When such a header has been set (by a filter, for example) and HTTP
caching has been configured at the WebContentGenerator, this header
value is reset to "". In this case, "Cache-Control" and "Expires" might
have inconsistent values and we consider that the HTTP caching
configuration should take precedence.

Depending on the servlet container chosen to deploy the application,
this might result in empty "" header values or no header set at all.

Issue: SPR-14053
2016-03-23 16:35:13 +01:00
Kazuki Shimizu
9b2023111d Add newline at the beginning of textarea macro for FreeMarker and Velocity
Issue: SPR-13503
2016-03-23 11:31:16 +01:00
Rossen Stoyanchev
7a5e93ff16 Add support for setting the "Vary" response header
Issue: SPR-14070
2016-03-22 21:47:55 -04:00
Rossen Stoyanchev
6bfe0c050d Polish 2016-03-22 20:59:16 -04:00