Commit Graph

12151 Commits

Author SHA1 Message Date
Sam Brannen
59c88eb3c0 Support @Cache* as merged composed annotations
Prior to this commit, @Cacheable, @CacheEvict, @CachePut, and @Caching
could be used to create custom stereotype annotations with hardcoded
values for their attributes; however, it was not possible to create
composed annotations with attribute overrides.

This commit addresses this issue by refactoring
SpringCacheAnnotationParser to use the newly introduced
findAllMergedAnnotations() method in AnnotatedElementUtils. As a
result, @Cacheable, @CacheEvict, @CachePut, and @Caching can now be
used to create custom composed annotations with attribute overrides
configured via @AliasFor.

Issue: SPR-13475
2016-03-21 12:54:09 +01:00
Stephane Nicoll
2a715e9c61 Fix escaping of #
This commit disables the "quotes" substitutions on specific XML
examples that require to use the reserved `#` character.

Issue: SPR-14074
2016-03-21 12:51:14 +01:00
Sam Brannen
532ed0a4cf Clean up warnings in the spring-test module 2016-03-20 19:37:54 +01:00
Sam Brannen
a5139f3c66 Support searches for multiple merged composed annotations
Prior to this commit it was possible to search for the 1st merged
annotation above an annotated element. It was also possible to search
for annotation attributes aggregated from all annotations above an
annotated element; however, it was impossible to search for all
composed annotations above an annotated element and have the results as
synthesized merged annotations instead of a multi-map of attributes.

This commit introduces a new findAllMergedAnnotations() method in
AnnotatedElementUtils that finds all annotations of the specified type
within the annotation hierarchy above the supplied element. For each
such annotation found, it merges that annotation's attributes with
matching attributes from annotations in lower levels of the annotation
hierarchy and synthesizes the results back into an annotation of the
specified type. All such merged annotations are collected and returned
as a set.

Issue: SPR-13486
2016-03-20 19:18:11 +01:00
Sam Brannen
799736c571 Fix typos in Javadoc for AutowireCapableBeanFactory 2016-03-20 15:26:37 +01:00
Sam Brannen
f1378aa376 Test status quo for finding multiple composed annotations
This commit introduces tests that verify the status quo for finding
multiple merged composed annotations on a single annotated element.

Issue: SPR-13486
2016-03-19 20:22:04 +01:00
Sam Brannen
744350a262 Polishing 2016-03-19 18:28:05 +01:00
Sam Brannen
d22480b0eb Ensure all aliased attributes in target annotation are overridden
Prior to this commit, it was possible that implicit aliases and
transitive implicit aliases (configured via @AliasFor) might not be
honored in certain circumstances, in particular if implicit aliases
were declared to override different attributes within an alias pair in
the target meta-annotation.

This commit addresses this issue by ensuring that all aliased
attributes in the target meta-annotation are overridden during the
merge process in AnnotatedElementUtils.

In addition, concrete default values for attributes in a
meta-annotation declaration can now be effectively shadowed by
transitive implicit aliases in composed annotations.

Issue: SPR-14069
2016-03-19 16:42:56 +01:00
Sam Brannen
4cd7ba12bb Polishing 2016-03-19 14:39:01 +01:00
Juergen Hoeller
5f6406430f LocalSessionFactoryBuilder/Bean supports setMultiTenantConnectionProvider
Issue: SPR-14072
2016-03-19 13:48:54 +01:00
Juergen Hoeller
a1a06cd665 @EnableScheduling tests do not expect exception in case of scheduler ambiguity anymore
Issue: SPR-14030
2016-03-19 13:18:24 +01:00
Sam Brannen
5045579028 Revise EnableSchedulingTests
- Fast tests now always run (i.e., are no longer limited to the
  performance build
- Failing tests have been @Ignore'd

Issue: SPR-14030
2016-03-19 12:38:47 +01:00
Juergen Hoeller
a905412514 Allow @Autowired to be declared on parameters
Issue: SPR-14057
2016-03-18 22:12:22 +01:00
Juergen Hoeller
6e3fac85f3 AnnotationAwareOrderComparator uses DecoratingProxy interface for target class introspection
Issue: SPR-13884
2016-03-18 22:12:10 +01:00
Rossen Stoyanchev
9ac9135c24 Update reference on StompClient
Issue: SPR-13664
2016-03-18 16:59:24 -04:00
Sam Brannen
c5200978b0 Polishing 2016-03-18 19:44:20 +01:00
Sam Brannen
11221f5ccb Fix Javadoc errors in AnnotatedElementUtils 2016-03-18 19:31:05 +01:00
Rob Winch
411ff8450f Refine tests for SPR-14066
Explicitly define the response type as text/plain to avoid content type
confusion.

Issue SPR-14066
2016-03-18 13:24:10 -05:00
Sam Brannen
e2ba477405 Upgrade Gradle Wrapper version to Gradle 2.12
Issue: SPR-14048
2016-03-18 19:06:10 +01:00
Juergen Hoeller
1ca4340271 NumberUtils consistently raises overflow exception for BigInteger/BigDecimal input
Issue: SPR-14041
2016-03-18 18:51:41 +01:00
Juergen Hoeller
431ca9314a Leniently allow constructor argument matches if required name is not resolvable
Issue: SPR-13987
2016-03-18 18:51:33 +01:00
Sam Brannen
455bf45fa4 Fix test that failed due to upgrade to HtmlUnit 2.20 2016-03-18 18:43:46 +01:00
Markus Malkusch
160410c148 Be explicit about the time unit in WebRequest
This commit adds the timeunit to the interface documentation
of WebRequest.checkNotModified().
2016-03-18 18:23:15 +01:00
Brian Clozel
7ae44c2565 Allow skipping JSON prefix in MockMvc result matchers
JSON payloads are sometimes prepended with a static string prefix
to prevent Cross Site Scripting Inclusion attacks (XSSI).
Prior to this commit, doing so would fail the MockMvc
`JsonPathResultMatchers` since they're considering the whole response as
the JSON payload.

This commit adds a new `JsonPathResultMatchers.prefix` method that
configures the matchers to check for the presence of that string (i.e.
fail if it's not there) and only consider the rest of the response body
as the JSON payload for other assertions.

Issue: SPR-13577
2016-03-18 18:13:42 +01:00
Rossen Stoyanchev
4a6c2dbb15 Merge pull request #1009 from rwinch/SPR-14066 2016-03-18 12:01:55 -04:00
Rossen Stoyanchev
d3822c8d19 Polish 2016-03-18 12:01:09 -04:00
Rob Winch
7d96ad1f6e MockMvc HtmlUnit support shares CookieManager
Previously MockMvc builders failed to share the WebConnection used for
managing cookies in the MockMvcWebConnection. This meant that the various
CookieManagers would have different states.

This commit ensures that the WebConnection is set on the
MockMvcWebConnection.

Fixes SPR-14066
2016-03-18 12:01:09 -04:00
Juergen Hoeller
8246fe4534 Latest dependency updates: EhCache 3.0 RC1, HtmlUnit 2.20, Apache HttpClient 4.5.2, Jackson 2.7.3, JasperReports 6.2.1, Jetty 9.3.8, JRuby 1.7.24, JsonAssert 1.3, JsonPath 2.2, POI 3.14, Selenium 2.52, SLF4J 1.7.19, Animal Sniffer 1.15, Undertow 1.3.19, H2 1.4.191 2016-03-18 16:16:54 +01:00
Juergen Hoeller
ec7c3aa349 Correct RFC 4648 references in method-level javadoc
Issue: SPR-14067
2016-03-18 15:30:33 +01:00
Juergen Hoeller
a95bf6e0fc Current InjectionPoint/DependencyDescriptor as factory method argument
Issue: SPR-14033
2016-03-18 15:30:33 +01:00
Sam Brannen
2153d88706 Add TODO in AnnotatedElementUtilsTests
Issue: SPR-14069
2016-03-18 15:29:25 +01:00
Sam Brannen
43661ededb Verify inlined props override files in @TestPropertySource
This commit introduces a test to demonstrate that inlined properties
override properties loaded from Properties files in
@TestPropertySource.

Issue: SPR-14068
2016-03-18 15:04:14 +01:00
Sam Brannen
856da8e395 Introduce tests for transitive aliases with implied attribute names 2016-03-17 20:53:52 +01:00
Sam Brannen
7a3bc2e473 Polishing 2016-03-17 14:08:13 +01:00
Rossen Stoyanchev
f5a5a81e95 Support response cookies in HtmlUnit integration
Issue: SPR-14051
2016-03-16 15:26:06 -04:00
Rossen Stoyanchev
92dd4eb3ef Fix NPE in ResponseBodyEmitterReturnValueHandler
The possibility of NPE was introduced in the previous commit:
971ccab038

Issue: SPR-14046
2016-03-16 13:40:35 -04:00
Sam Brannen
9439a008d7 Merge pull request #1006 from mdeinum/SPR-14050
* SPR-14050:
  Fully test proxy support in ReflectionTestUtils
  Polishing
  Document proxy support in ReflectionTestUtils
  Fix bugs in ReflectionTestUtils related to proxies
  Polishing
  Support proxied objects in ReflectionTestUtils
2016-03-16 18:34:14 +01:00
Sam Brannen
d9025ddaa7 Fully test proxy support in ReflectionTestUtils
This commit adds a test for JDK dynamic proxies and fleshes out the
test for CGLIB proxies.

Issue: SPR-14050
2016-03-16 18:34:07 +01:00
Sam Brannen
7beff7b40a Polishing 2016-03-16 18:34:07 +01:00
Sam Brannen
b1ca18e0dc Document proxy support in ReflectionTestUtils
Issue: SPR-14050
2016-03-16 18:34:07 +01:00
Sam Brannen
2d565c7944 Fix bugs in ReflectionTestUtils related to proxies
Issue: SPR-14050
2016-03-16 18:34:07 +01:00
Sam Brannen
7c7e7865bf Polishing 2016-03-16 18:34:07 +01:00
Marten Deinum
8d3ec50e87 Support proxied objects in ReflectionTestUtils
This commit adds support for unwrapping proxies in the setField() and
getField() methods in ReflectionTestUtils.

Instead of always accessing fields directly on the supplied
targetObject (which may be a proxy), AopTestUtils is now used to obtain
the potential ultimateTargetObject which is then used for accessing
fields.

Issue: SPR-14050
2016-03-16 18:34:07 +01:00
Juergen Hoeller
d2c0885e29 StandardServletEnvironment supports "spring.jndi.ignore" flag for efficient property lookups
Issue: SPR-14026
2016-03-16 18:14:44 +01:00
Juergen Hoeller
35eb52e558 Abstract(Stax)XMLReader recognizes standard features as not supported
Issue: SPR-14056
2016-03-16 18:04:02 +01:00
Stephane Nicoll
b1121fba70 Polish 2016-03-16 17:14:03 +01:00
Stephane Nicoll
30d457c622 Deprecate addCache 2016-03-16 17:13:06 +01:00
Stephane Nicoll
1c3c88f81e Merge pull request #998 from quaff/SPR-14039
* pr/998:
  Polish contribution
  Add converters between Enum and Integer
2016-03-16 17:01:02 +01:00
Stephane Nicoll
f422e490b0 Polish contribution
Issue: SPR-14039 - Closes gh-998
2016-03-16 17:00:00 +01:00
Yanming Zhou
1a302e1fac Add converters between Enum and Integer 2016-03-16 17:00:00 +01:00