Commit Graph

14848 Commits

Author SHA1 Message Date
Arjen Poutsma
52e87cb425 Rename WebClientOperations to WebClient
This commit makes the following changes:

 - Merge WebClient into ExchangeFunction. Static methods on WebClient
have been moved to the utility class ExchangeFunctions, similar to
RouterFunctions operates on the server side.

 - Renamed WebClientOperations to WebClient.

 - Renamed WebClientStrategies to ExchangeStrategies
2017-02-01 09:59:15 +01:00
Rossen Stoyanchev
60517b23e2 StompSession supports custom headers for UNSUBSCRIBE
Issue: SPR-15131
2017-01-31 17:55:53 -05:00
Rossen Stoyanchev
949bb55ef5 Refactor random port in spring-websocket
Remove the use of SocketUtils#findAvailableTcpPort in favor of letting
servers pick a dynamic port by specifying port 0.
2017-01-31 16:49:57 -05:00
Rossen Stoyanchev
c79092f0f9 Refactor random port in reactive module tests
This commit removes the use of SocketUtils#findAvailableTcpPort in
favor of letting servers pick a dynamic port by specifying port 0.

This should make integration tests more stable because the port is
chosen at the place where it needs to be used. It gives servers a
chance to try to open a socket on some port and start using the socket
if successful.
2017-01-31 16:19:19 -05:00
Rossen Stoyanchev
1fb0b0b786 Expose remoteAddress from ServerHttpRequest
Issue: SPR-15200
2017-01-31 15:04:24 -05:00
Rossen Stoyanchev
9142427c4d Add committed flag to ReactiveHttpOutputMessage
Issue: SPR-15135
2017-01-31 12:50:27 -05:00
Mario Arias
c33ad15b28 Add Kotlin JDBC extensions
Issue: SPR-15158
2017-01-31 16:44:35 +01:00
Juergen Hoeller
9666fcc41d SettableListenableFuture consistently tracks cancellation state
Issue: SPR-15202
2017-01-31 15:57:52 +01:00
Juergen Hoeller
9b26fcd7d2 Refined assertion messages
Issue: SPR-15196
2017-01-31 15:56:39 +01:00
Juergen Hoeller
f84907a1fc Polishing 2017-01-31 12:00:13 +01:00
Juergen Hoeller
9243a14794 Test for correct handling of multiple header values
Issue: SPR-15166
2017-01-31 11:59:41 +01:00
Juergen Hoeller
23aac2de8c Retain single-arg assert methods in deprecated form
Issue: SPR-15196
2017-01-31 09:27:55 +01:00
Juergen Hoeller
1b2dc3638f Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
2017-01-30 22:15:55 +01:00
Juergen Hoeller
768802fa96 ResourceHttpMessageConverter reads Content-Disposition header to expose filename through Resource
Issue: SPR-15191
2017-01-30 22:15:30 +01:00
Juergen Hoeller
f51b896bd9 Latest dependency updates (OkHttp 3.6, Apache HttpClient 4.5.3, Log4J 2.8) 2017-01-30 22:13:54 +01:00
Toshiaki Maki
f2fa74055e Fix missing uriVariables 2017-01-30 12:10:51 -05:00
Rossen Stoyanchev
cd476832cc Add check for Long.MAX_VALUE
Issue: SPR-15203
2017-01-30 10:03:20 -05:00
Rossen Stoyanchev
74a3013174 Replace use of deprecated Reactor Operators#getAndAdd 2017-01-30 09:14:05 -05:00
Arjen Poutsma
69c16f3821 Add headers in InterceptingClientHttpRequest
This commit *adds* the "intercepted" headers to the ClientHttpRequest,
as opposed to replacing them, which is what happened before this commit.

Issue: SPR-15166
2017-01-30 14:18:50 +01:00
Rossen Stoyanchev
b487ed6748 Fix trailing slash issue
Issue: SPR-15201
2017-01-28 12:38:44 -05:00
Rossen Stoyanchev
ee861e8001 Fix compiler deprecation-related errors 2017-01-27 17:26:14 -05:00
Rossen Stoyanchev
ecb2e97ab4 Merge changes for SPR-15124 2017-01-27 16:46:51 -05:00
Rossen Stoyanchev
d057c3d981 Deprecate DefaultUriTemplate handler
Following on the introduction of the UriBuilderFactory and its
DefaultUriBuilderFactory implementation, this commit deprecates
DefaultUriTemplate (and AbstractUriTemplateHandler).

The new DefaultUriBuilderFactory has comparable functionality and is
more flexible but cannot be merged  into the existing hierarchy and
be backwards compatible with regards to protected methods.

Issue: SPR-15124
2017-01-27 16:38:16 -05:00
Rossen Stoyanchev
8edc680957 Scale back static factory methods in ClientRequest
Following on the introduction of WebClientOperations in the last commit
this commit removes the HTTP method specific factory methods and also
scales back the builder options in ClientRequest.

ClientRequest is now expected to be used mainly from an
ExchangeFilterFunction which may modify the ClientRequest using the
from(ClientRequest) entry point rather creating from scratch.

Issue: SPR-15124
2017-01-27 15:59:03 -05:00
Rossen Stoyanchev
f6ec35394f Introduce WebClientOperations
Issue: SPR-15124
2017-01-27 15:04:10 -05:00
Rossen Stoyanchev
7b67b5bc2a Introduce UriBuilderFactory and UriBuilder
Issue: SPR-15124
2017-01-27 14:07:55 -05:00
Rossen Stoyanchev
cb0d992303 Refactor test HttpServer implementations
Due to the static nature of JUnit parameterized test inputs, an
HttpServer instance is re-used for all tests per test class.

This commit adds lifecycle handling to AbstractHttpServer with a
lifecycle monitor to ensure test server fields are properly
initialized and reset after each test .
2017-01-27 10:31:08 -05:00
Stephane Nicoll
33f0995b42 Merge pull request #1307 from Shredder121:assert-message
* pr/1307:
  Polish contribution
  Check for null on the argument instead of the message
2017-01-27 14:17:33 +01:00
Stephane Nicoll
d550eb152c Polish contribution
Closes gh-1307
2017-01-27 14:17:13 +01:00
Ruben Dijkstra
f1c7e0f5b2 Check for null on the argument instead of the message
See gh-1307
Issue: SPR-15196
2017-01-27 14:15:24 +01:00
Brian Clozel
944d17f237 Harmonize Tomcat dependencies
Use `tomcat-embed-core` instead of `tomcat-catalina`
for tomcat internal classes.
2017-01-26 18:31:11 +01:00
Sebastien Deleuze
7ff257c0ea Prevent NPE in ScriptTemplateView when no view is found
Issue: SPR-15064
2017-01-26 15:29:55 +01:00
Sebastien Deleuze
2a5d1b086f Fix Spring MVC ScriptTemplateView locale support
The locale should be set in resolveViewName() instead of
createView() in order to be taken in account with cached
views.

Issue: SPR-15064
2017-01-26 14:33:21 +01:00
Rossen Stoyanchev
4aac7c2ee2 Minor refactoring in Tomcat/Jetty adapters 2017-01-26 07:37:46 -05:00
Rossen Stoyanchev
a2aaa05592 Polish 2017-01-26 07:25:22 -05:00
Violeta Georgieva
383375c35f Use separate reactive HttpHandler for Tomcat/Jetty
Introduce separate adapters TomcatHttpHandlerAdapter/JettyHttpHandlerAdapter
so that each adapter can use the Tomcat/Jetty APIs for reading/writing
with ByteBuffer.
2017-01-26 06:21:44 -05:00
Rossen Stoyanchev
ea67a637ae Align setup of SockJS and WebSocket integration tests
Failures in JettySockJsIntegrationTests after the upgrade to 9.4 were
hidden due to the PERFORMANCE test group but were failing on the CI
performance build with IllegalStateException inside Jetty on
"Failure find the required ServletContext attribute
org.eclipse.jetty.util.DecoratedObjectFactory".
2017-01-26 06:17:03 -05:00
Sam Brannen
871f5efeaa Clean up warnings in spring-test 2017-01-26 01:27:15 +01:00
Rossen Stoyanchev
ae034e9afe Polish content disposition 2017-01-25 17:19:30 -05:00
Rossen Stoyanchev
eabd8a2964 Support Servlet Part in Spring MVC Test
Issue: SPR-14253
2017-01-25 17:05:30 -05:00
Rossen Stoyanchev
c8f98ecd8d Add MockPart to spring-test
Issue: SPR-14252
2017-01-25 17:05:25 -05:00
Sam Brannen
3bc819799b Polishing 2017-01-25 19:40:08 +01:00
Rossen Stoyanchev
f5d2b88e3f "sharedHttpSession" shortcut for MockMvc builders
Issue: SPR-13820
2017-01-25 12:33:11 -05:00
Rossen Stoyanchev
1d35c7c55a Polish MockMvc setup classes 2017-01-25 12:33:11 -05:00
Sebastien Deleuze
2d95199466 Support i18n and nested templates in ScriptTemplateView
This commit changes the 3rd parameter passed to the rendering
function from String url to RenderingContext renderingContext.

RenderingContext contains 4 properties:
 - ApplicationContext applicationContext
 - Locale locale
 - Function<String, String> templateLoader
 - String url

Issue: SPR-15064
2017-01-25 17:23:20 +01:00
Juergen Hoeller
8038fb9c8b HandlerMethod pre-resolves parameter types at construction time
Issue: SPR-15186
2017-01-25 11:09:43 +01:00
Sam Brannen
4e65c10272 Fix broken test in SpringJUnit4ConcurrencyTests
Prior to this commit, SpringJUnit4ConcurrencyTests was broken due to
recent additions of test methods in SampleTests.

This commit fixes the broken test by removing hard coded constants and
replacing them with dynamic lookups for JUnit 4 @Test methods.
2017-01-25 05:56:02 +01:00
Violeta Georgieva
1443c0808d Enable suspend/resume on reactive JettyWebsocketSession
Issue: SPR-15130
2017-01-24 19:49:18 -05:00
Juergen Hoeller
4a57d4512e Reset cached ResolvableType on increaseNestingLevel/setContainingClass
Issue: SPR-15160
2017-01-25 00:30:05 +01:00
Juergen Hoeller
5e946c2700 Consistent type variable resolution for arrays/collections (in particular at field level)
Dropping GenericCollectionTypeResolver in favor of direct ResolvableType usage.

Issue: SPR-15160
2017-01-24 18:00:17 +01:00