Commit Graph

21624 Commits

Author SHA1 Message Date
Phillip Webb
e5bef10d85 Fix ResolvableType raw class isAssignable checks
Fix `isAssignable` for `ResolvableType.forRawClass` so that it can be
used with types backed by a `TypeVarible`. Prior to this commit the
rawClass value was used, which wouldn't always work.

Closes gh-23321
2019-07-20 13:23:21 +01:00
Sam Brannen
9110a56e11 Merge branch '5.1.x' 2019-07-20 13:33:43 +02:00
zheng.ren01@mljr.com
f92b60c08f Only invoke getInterfaceMethodIfPossible() when security manager is used
Prior to this commit, AbstractAutowireCapableBeanFactory's
invokeCustomInitMethod() method invoked
ClassUtils.getInterfaceMethodIfPossible() even if the security manager
was not being used.

This commit ensures that getInterfaceMethodIfPossible() is only invoked
if the security manager is used.

Closes gh-23323
2019-07-20 13:30:57 +02:00
Arjen Poutsma
090bfa63a1 Add DataBuffer::toString(Charset)
Closes gh-23317
2019-07-19 12:45:24 +02:00
Arjen Poutsma
c8704ce473 Introduce DataBufferWrapper
This commit introduces the DataBufferWrapper, a wrapper for DataBuffers,
and uses it in applicable use cases.
2019-07-19 12:45:24 +02:00
Rossen Stoyanchev
24e96b6c79 Merge branch '5.1.x' 2019-07-19 10:52:30 +01:00
Rossen Stoyanchev
a244675630 Merge pull request #23305' from AndreasKl/fowarded-prefix-causes-invalid-path into 5.1.x 2019-07-19 10:44:42 +01:00
Rossen Stoyanchev
153ac82380 Polish 2019-07-19 10:44:23 +01:00
Andreas Kluth
4973e110ee An empty X-Forwarded-Prefix with a path containing escape sequences leads to exceptions. 2019-07-19 10:44:23 +01:00
Rossen Stoyanchev
2b94205ba9 Update docs on multipart with RestTemplate
Replace docs on using MultipartBodyBuilder for the RestTemplate with
examples that show MultiValueMap. Originally the idea was to make
MultipartBodyBuilder accessible to the RestTemplate too, but with
support for async parts that's no longer a good fit.

Closes gh-23295
2019-07-19 10:43:50 +01:00
Sebastien Deleuze
095fd5bcb3 Use Kotlin BOM
Close gh-23316
2019-07-19 10:43:54 +02:00
Sam Brannen
8db73c80e2 Polish MockRestServiceServer internals regarding "effectively final" 2019-07-18 15:45:44 +02:00
Sam Brannen
42f033e439 Polish MockMvc internals regarding "effectively final" 2019-07-18 15:45:44 +02:00
Arjen Poutsma
8b7ed5f45e Added since tag 2019-07-18 15:37:33 +02:00
Arjen Poutsma
d8838152b3 Copy ClientResponseEntity::toEntity* methods to ResponseSpec
This commit copies the toEntity and toEntityList methods from
ClientResponse to ResponseSpec, so that it is possible to retrieve
a ResponseEntity when using retrieve().

Closes gh-22368
2019-07-18 12:28:22 +02:00
Sam Brannen
38f6d270f8 Delete dead code in tests 2019-07-18 12:20:26 +02:00
Sam Brannen
b774147db4 Polish Javadoc for @Autowired
See gh-23263
2019-07-18 12:07:39 +02:00
Sam Brannen
817f689584 Improve Javadoc for AutowiredAnnotationBeanPostProcessor
See gh-23263
2019-07-18 11:55:18 +02:00
Rossen Stoyanchev
d2a7d9fa88 Introduce RSocketClientFactoryConfigurer
The new interface supersedes ClientResponderFactory and is more general,
for any RSocketFactory customization.

DefaultClientResponderFactory implements the new interface and is
renamed to AnnotationClientResponderConfigurer.

See gh-23170
2019-07-18 10:21:51 +01:00
Rossen Stoyanchev
1e9ccdd8b8 Pass RSocketStrategies to MetadataExtractor
Simplify the creation of MetadataExtractor by not requiring
RSocketStrategies up front. The strategies are already configured in higher
level places like RSocketMessageHandler that invoke the MetadataExtractor.
The strategies are now passed in as an argument to the extract method.
2019-07-18 10:21:51 +01:00
Rossen Stoyanchev
d33e4878a0 Move MetadataExtractor to the rsocket package
The move up the hierarchy reflects the fact that MetadataExtractor
is more generally useful and not tied to annotations.
2019-07-18 10:18:28 +01:00
Juergen Hoeller
aa9f840938 Merge branch '5.1.x' 2019-07-17 23:35:48 +02:00
Juergen Hoeller
46e5b6f7af Upgrade to Tomcat 9.0.22, Checkstyle 8.22, Mockito 2.28.2 2019-07-17 23:26:07 +02:00
Juergen Hoeller
f5daa657f4 Polishing 2019-07-17 23:25:50 +02:00
Juergen Hoeller
9ffdf05d77 Explicit javadoc note on publishEvent hand-off semantics
See gh-21025
2019-07-17 23:25:21 +02:00
Juergen Hoeller
18bfa6b003 Consider Hibernate Query.list() as query-terminating method
Closes gh-23248
2019-07-17 23:24:52 +02:00
Juergen Hoeller
ffc1f242ca Introduce evictIfPresent/invalidate operations on Cache abstraction
@CacheEvict.beforeInvocation suggests immediate execution even in case of transactional caches. The cache interceptor delegates to the new evictIfPresent/invalidate operations now which imply immediate execution semantics (and also provide an indication for whether any corresponding entries where present when programmatically called).

Closes gh-23192
2019-07-17 22:37:55 +02:00
Juergen Hoeller
2c33c11d4c Introduce TransactionOperations.execute(Runnable) convenience method
Closes gh-23250
2019-07-17 22:35:26 +02:00
Juergen Hoeller
7f33344784 Tracking ASM master
See gh-23156
2019-07-17 22:34:39 +02:00
Juergen Hoeller
94e3210ae7 Fix nullability warnings and javadoc-triggered package cycles 2019-07-17 22:34:07 +02:00
Sam Brannen
56eadff34f Merge branch '5.1.x' 2019-07-17 18:58:08 +02:00
Sam Brannen
74ddf1bee5 Improve documentation for @Autowired constructors
Prior to this commit, there was some ambiguity surrounding semantics
for @Autowired constructors and `required = true`, especially for
multiple @Autowired constructors.

This commit improves the documentation in the Javadoc for @Autowired as
well as in the reference manual.

Closes gh-23263
2019-07-17 18:55:58 +02:00
Sam Brannen
e92cbe1938 Improve failure messages for redirect/forward in MockMvc 2019-07-17 16:53:47 +02:00
Sam Brannen
7779aa3487 Polish contribution
See gh-23297
2019-07-17 16:53:47 +02:00
Scheidter,Ryan
84200f3141 Treat null path as non-matching pattern in AntPathMatcher
Prior to this commit, a null path supplied to the isPattern(), match(),
and matchStart() methods in AntPathMatcher resulted in a
NullPointerException.

This commit addresses this by treating a `null` path as a non-matching
pattern.

Closes gh-23297
2019-07-17 16:53:47 +02:00
Sebastien Deleuze
639a254e0d Polishing 2019-07-17 16:44:34 +02:00
Sebastien Deleuze
4e2b51bedb Improve Kotlin integration testing documentation
Closes gh-22875
2019-07-17 16:37:27 +02:00
Brian Clozel
e7ecb83449 Add client responder configuration
Prior to this commit, the `RSocketRequester.Builder` would allow to
configure directly annotated handlers for processing server requests.
This lead to a package tangle where the `o.s.messaging.rsocket` would
use classes from `o.s.messaging.rsocket.annotation.support` package.

This commit introduces the `ClientResponderFactory` interface for
configuring a responder on the client RSocket factory. Its goal is
to be compatible with future changes with a functional variant for
RSocket handlers.

Closes gh-23170
2019-07-17 12:09:09 +02:00
Sebastien Deleuze
d6e3394b81 Polishing
See gh-23219
2019-07-16 19:23:21 +02:00
Sebastien Deleuze
b4a0e71ccc Polishing
See gh-23219
2019-07-16 18:46:36 +02:00
Arjen Poutsma
7fe0116599 Added since tag 2019-07-16 16:18:31 +02:00
Arjen Poutsma
a9b3d95a14 Interpret empty mono from status handler as normal response
Prior to this commit, returning an empty mono from an exception handler
registered through ResponseSpec::onStatus would result in memory leaks
(since the response was not read) and in an empty response from bodyTo*
methods of the webclient.

As of this commit, that same empty mono is now interpreted to return
the body (and not an exception), offering a way to override the default
status handlers and return a normal response for 4xx and 5xx status
codes.
2019-07-16 15:53:21 +02:00
Sam Brannen
b2b79ae1e6 Polish contribution
See gh-23219
2019-07-16 14:57:32 +02:00
Sebastien Deleuze
adadffe0e1 Improve charset handling in MockHttpServletResponse
This commit adds a getContentAsString(Charset fallbackCharset) method
to MockHttpServletResponse in order to make it easier to get the content
in a specific charset like UTF-8 when the response charset has not been
explicitly set (by default ISO-8859-1 is used).

JsonPathResultMatchers leverages this new feature to support UTF-8
content out of the box.

Closes gh-23219
2019-07-16 11:44:16 +02:00
Sam Brannen
60a7092977 Fix dataMimeType and metadataMimeType mixup in precondition check
Closes gh-23292
2019-07-16 11:13:21 +02:00
Sam Brannen
c788be30fe Polish contribution
See gh-23289
2019-07-15 19:08:20 +02:00
Phillip Webb
b5e4e02337 Polish ScriptUtilsUnitTests 2019-07-15 14:43:03 +02:00
Phillip Webb
17914fc44b Add multi-prefix comment support for SQL scripts
Update `ResourceDatabasePopulator` and `ScriptUtils` so that more than
one comment prefix can be used when processing SQL scripts. This
feature is particularly useful when dealing with scripts provided by
Quartz since they often use a mix `--` and `#`.

Closes gh-23289
2019-07-15 14:43:03 +02:00
Rossen Stoyanchev
1ff29b0f6b Merge branch '5.1.x' 2019-07-15 11:34:35 +01:00
Rossen Stoyanchev
99c4a9eeba Filtering for nested ERROR dispatch
OncePerRequestFilter now has a doFilter method that allows separate
processing of nested ERROR dispatches. This is useful for filters
that wrap the request and response.

Closes gh-23196
2019-07-15 11:23:12 +01:00