Commit Graph

19088 Commits

Author SHA1 Message Date
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
Arjen Poutsma
dae4509152 Make sure built ClientResponses have HttpRequest 2019-07-15 09:40:02 +02:00
Sam Brannen
0aa5533dea Execute test suite in Gradle using JUnit Platform
Closes gh-23286
2019-07-13 19:13:33 +02:00
Sam Brannen
480b1e0a0d Run JUnit 4 tests in spring-test on the JUnit Platform
This commit simplifies the build for spring-test by running JUnit 4
tests and JUnit Jupiter tests together in the standard Gradle `test`
task.

As an added bonus, the ignored tests in SpringJUnit4ConcurrencyTests
and ClassLevelDisabledSpringRuleTests are now reported in the test
results.

See gh-23286
2019-07-13 18:24:37 +02:00
Sebastien Deleuze
a3222476ad Use proxyBeanMethods in ProxyTransactionManagementConfiguration
Closes gh-23166
2019-07-13 12:19:33 +02:00
Rossen Stoyanchev
2eba010c1b Merge branch '5.1.x' 2019-07-13 11:00:57 +01:00
Rossen Stoyanchev
235858e4e5 Exposes supported mime types in Jaxb2Decoder
Closes gh-23278
2019-07-13 11:00:43 +01:00
Rossen Stoyanchev
c32299f734 Use HttpMessageNotWritableException instead of ISE
As a follow-up to the recent commit #37f9ce, this change replaces the
raised IllegalStateException with HttpMessageNotWritableException.

See gh-23205
2019-07-13 10:56:12 +01:00
Rossen Stoyanchev
68c99dafcf Rename {client|server}Acceptor to Responder
See gh-23170
2019-07-13 10:23:46 +01:00
Sam Brannen
3cf5db6317 Exclude ParallelExecutionSpringExtensionTests.TestCase from build
Prior to this commit, ParallelExecutionSpringExtensionTests.TestCase
was accidentally included in the build which skewed the number of tests
in spring-test by 1000.
2019-07-12 18:21:45 +02:00
Stephane Nicoll
9a71a8d357 Fix checkstyle violation
Closes gh-23276
2019-07-12 15:57:16 +02:00
Stephane Nicoll
4f8b347aa0 Do not trigger transactional event listener if no transaction is active
This commit fixes the behaviour of not triggering a transactional event
listener if no transaction is active. Previously, a transaction boundary
was all that was necessary to trigger the listener regardless of the fact
there was an active transaction.

This commit now prevents `Propagation.NOT_SUPPORTED` and
`Propagation.SUPPORTS` without an active transaction to trigger the
listener.

Closes gh-23276
2019-07-12 15:39:14 +02:00
Arjen Poutsma
b4207823af Add ClientResponse::createException
This commit adds the createException() method to ClientResponse,
returning a delayed WebClientResponseException based on the status code,
headers, and body as well as the corresponding request.

Closes gh-22825
2019-07-12 14:51:54 +02:00
Rob Winch
5e9a22d118 Add nohttp to build
See gh-22839
2019-07-12 13:21:22 +02:00
Sam Brannen
09c10232a4 Polishing
See gh-23224
2019-07-12 13:08:33 +02:00
Sam Brannen
699d3f15e8 Simplify LocalVariableTableParameterNameDiscoverer implementation
This commit refactors the internals of
LocalVariableTableParameterNameDiscoverer to use
java.lang.reflect.Executable in order to simplify the implementation.
2019-07-12 12:02:49 +02:00
mfeng-ya
309b328719 Use computeIfAbsent in LocalVariableTableParameterNameDiscoverer
Closes gh-23281
2019-07-12 11:44:10 +02:00
Stephane Nicoll
5b341f620a Merge pull request #22839 from rwinch
* pr/22839:
  Polish "Add nohttp to build"
  Add nohttp to build
  BeanDefinitionParserDelegate uses http://www.springframework.org/schema/
  Fix http URLs

Closes gh-22839
2019-07-11 18:14:35 +02:00
Stephane Nicoll
d6fdd8e874 Polish "Add nohttp to build"
See gh-22839
2019-07-11 18:14:20 +02:00
Rob Winch
4fa11a5061 Add nohttp to build
See gh-22839
2019-07-11 18:14:20 +02:00
Rob Winch
8c605dd082 BeanDefinitionParserDelegate uses http://www.springframework.org/schema/
See gh-22839
2019-07-11 18:14:20 +02:00
Rob Winch
fde92793b5 Fix http URLs
See gh-22839
2019-07-11 18:14:20 +02:00
Sam Brannen
b5fba14ab8 Fix Checkstyle violation
Eclipse apparently sorts static imports differently.
2019-07-11 18:13:59 +02:00
Sam Brannen
fc38bb4fc6 Change @TestConstructor.autowire attribute into an enum
Prior to this commit, @TestConstructor supported a boolean `autowire`
attribute which naturally limited the configuration to two states: on
or off. Since we may need to support additional autowiring modes in the
future, the use of a boolean is limiting.

This commit address this issue by introducing a new AutowireMode enum
in @TestConstructor with ALL and ANNOTATED constants. In addition, the
attribute has been renamed to `autowireMode`, and the system property
has been renamed to `spring.test.constructor.autowire.mode` for greater
clarity of purpose.

Closes gh-23224
2019-07-11 18:00:52 +02:00
Sebastien Deleuze
c8f8dfa39e Add engineSupplier property to ScriptTemplateConfigurer
This commit adds an engineSupplier property to ScriptTemplateConfigurer
and ScriptTemplateView in order to be able to customize the ScriptEngine
when sharedEngine is set to false.

This can be useful with Graal.js for example.

Closes gh-23258
2019-07-11 15:58:10 +02:00
Sam Brannen
01125a571c Upgrade to Gradle 5.5.1
See gh-23214
2019-07-11 14:11:36 +02:00
Sebastien Deleuze
c08035b674 Remove unused Coroutines extension parameter 2019-07-11 10:11:34 +02:00
Stephane Nicoll
4a5063f4c0 Merge branch '5.1.x' 2019-07-11 09:55:13 +02:00
Stephane Nicoll
5089824245 Merge pull request #23274 from akun2014
* pr/23274:
  Fix typo in UrlPathHelper

Closes gh-23274
2019-07-11 09:54:54 +02:00
桂坤
81eb911c09 Fix typo in UrlPathHelper
See gh-23274
2019-07-11 09:54:03 +02:00
Sam Brannen
af18d71bc2 Clean up warnings in Gradle build 2019-07-10 16:59:08 +02:00
Сергей Цыпанов
1728bf17fc Avoid unnecessary boxing where primitives can be used
Closes gh-23267
2019-07-10 16:51:18 +02:00
Arjen Poutsma
2909de8829 Remove ServerWebExchange::getParts and ServerRequest::parts
Revert to state before DefaultMultipartMessageReader
2019-07-10 16:20:20 +02:00
Arjen Poutsma
09572e7b60 Removed DataBufferUtils::split
DataBuffers::split (and underlying algorithm) should not be returning
a Flux<DataBuffer>, but rather a Flux<Flux<DataBuffer>>. In other words,
it should not join all data buffers that come before a delimiter.

Providing an implementation of a such a fully reactive split method
proved to be beyond the scope of this release, so this commit removes
the method altogether.
2019-07-10 16:00:11 +02:00
Arjen Poutsma
fdcf09dc2f Copied buffering split from DataBufferUtils to StringDecoder
Due to the imminent removal of DataBufferUtils.split, this commit copies
over the buffering split algortihm from DataBufferUtils, as it is still
sutable for the StringDecoder
2019-07-10 16:00:11 +02:00
Arjen Poutsma
ef19a6bf8e Various DataBufferUtils improvements
- Made sure that takeUntilByteCount is usable in multiple subscriptions.
- Added composite Matcher
2019-07-10 16:00:11 +02:00
Arjen Poutsma
77c24aac2f Remove DefaultMultipartMessageReader
The DefaultMultipartMessageReader has been removed for 5.2 and will be
part of a future release. This commit switches back to the
SynchronossPartHttpMessageReader.

gh-21659
2019-07-10 16:00:11 +02:00