Commit Graph

19930 Commits

Author SHA1 Message Date
Sebastien Deleuze
a8693bf947 Improve Kotlin ref doc
This commit add a section about annotations and provides
various update and enhancements to the Kotlin reference
documentation.

Issue: SPR-15659
2017-09-07 17:30:52 +02:00
Arjen Poutsma
ec6475a24c Expose scheme in ReactorServerHttpRequest URI
This commit determines fixes ReactorServerHttpRequest.getUri() so that
it includes a URL scheme.

Issue: SPR-15931
2017-09-07 12:29:28 +02:00
Sam Brannen
15ab0ad6e2 Clean up warnings in Gradle build output 2017-09-07 12:25:10 +02:00
Sam Brannen
8acb8aef1f Exclude commons-logging from spring-test dependencies
Prior to this commit, various dependencies in the spring-test module
pulled in commons-logging as a transitive dependency. Consequently,
the presence of commons-logging in the generated Eclipse classpath
overrode the intended use of the spring-jcl module causing JUL to be
used instead of log4j for tests executed within Eclipse, thereby
ignoring the configuration in src/test/resources/log4j2-test.xml.

This commit addresses this issue by excluding commons-logging in
spring-test.gradle for all Selenium dependencies.

Issue: SPR-15930
2017-09-07 12:16:53 +02:00
Rossen Stoyanchev
dff0e7923c Merge pull request #1507 from rwinch/websessionmanager 2017-09-06 11:48:17 -04:00
Rossen Stoyanchev
2fc2dab230 Fold DefaultWebSession within InMemoryWebSessionStore
InMemoryWebSessionStore is very closely associated to DefaultWebSession
passing it to it several fields and functions. Now that the store also
creates the session, it makes sense to bring the latter in as an inner,
nested class.

Issue: SPR-15875, 15876
2017-09-06 11:47:43 -04:00
Rossen Stoyanchev
c7d54c8b52 Polish 2017-09-06 11:47:43 -04:00
Rob Winch
8ad14ae95c DefaultWebSessionManager decoupled from DefaultWebSession
DefaultWebSessionManager no longer requires the WebSessionStore
to use DefaultWebSession.

Removed explicit start() in save(). This seemed unnecessary since at
that point isStarted is guaranteed to return true. The status can
be updated through the copy constructor.

DefaultWebSessionTests added.

Issue: SPR-15875
2017-09-06 11:47:43 -04:00
Rob Winch
86912475af Refactor WebSessionStore
- Add WebSessionStore.createWebSession.

- Remove remove WebSessionStore.changeSessionId

- Add WebSessionStore updateLastAccessTime which allows updating the
WebSession lastAccessTime without exposing a method on WebSession in
an implementation independent way.

- Remove WebSessionStore.storeSession. This method is not necessary
since the WebSession that is returned allows saving the WebSession.
Additionally, it is error prone since the wrong type might be passed
into it.

Issue: SPR-15875, 15876
2017-09-06 11:47:43 -04:00
Rob Winch
b7280472d6 Improve WebSession related tests
Add missing DefaultWebSessionManagerTests .block(). Previously
session.save() was invoked, but we did not ensure it was completed.
This commit makes it block on session.save()

Fix existingSessionIsExpired. This test is actually broken and is
testing a new session is created because the session id returned
by the idResolver does not match the existing WebSession.
This commit ensures that the id of the WebSession found by idResolver
matches the existing WebSession.

DefaultWebSessionManagerTests use Mockito. To ensure we test with
independence from InMemoryWebSessionStore we use Mockito for the
DefaultWebessionManager collaborators.

Add test for response.setComplete(). We want to ensure that when the
response is completed, it saves the WebSession and writes it to the
response using idResolver
2017-09-06 11:47:43 -04:00
Rob Winch
167ddc7cfc Polish HeaderWebSessionIdResolver
Use constant for default header name and make getHeaderName private.

Also switch HeaderWebSessionIdResolverTests to unit tests rather than
testing with DefaultWebSessionManager.

Issue: SPR-15917
2017-09-06 11:47:43 -04:00
Sam Brannen
dcdb0b416f Rename SPRING_CLASS_RULE fields to springClassRule 2017-09-06 17:38:22 +02:00
Brian Clozel
16f3f8d28f Add close() method on HTTP client response
Before this commit, there was no way to signal the HTTP client that we
were done consuming the response. Without that, the underlying client
library cannot know when it is safe to release the associated resources
(e.g. the HTTP connection).

This commit adds new `close()` methods on both `ClientHttpResponse`
and `ClientResponse`. This methods is non-blocking and its behavior
depends on the library, its configuration, HTTP version, etc.

At the `WebClient` level, `close()` is called automatically if we
consume the response body through the `ResponseSpec` or the
`ClientResponse` itself.

Note that it is *required* to call `close()` manually otherwise; not
doing so might create resource leaks or connection issues.

Issue: SPR-15920
2017-09-06 17:29:18 +02:00
Sam Brannen
ba6b617bd5 Demo: @Autowired rules not supported with Spring's JUnit rules
This commit introduces a test that demonstrates that custom JUnit 4
rules can be @Autowired into a test instance but that they will not be
applied by JUnit since JUnit only ever sees such fields as null and
therefore ignores them.

Issue: SPR-15927
2017-09-06 17:29:04 +02:00
Sebastien Deleuze
699dfc55a8 Improve Kotlin ref doc structure
Issue: SPR-15659
2017-09-06 17:13:17 +02:00
Sebastien Deleuze
5ae35f606c Leverage kotlin-reflect to determine parameter names
This is especially useful to determine interface parameter names
without requiring Java 8 -parameters compiler flag.

Issue: SPR-15541
2017-09-06 15:56:45 +02:00
Arjen Poutsma
02a2c400c7 Move URL transform methods from ServerHttpResponse to ServerWebExchange
This commit moves `encodeUrl` and `registerUrlEncoder` from
ServerHttpResponse to ServerWebExchange.

It also renames `encodeUrl` to `transformUrl` and `registerUrlEncoder`
to `addUrlTransformer` to make it clearer that these methods do not
perform actual URL encodings (i.e. they do not replaceinvalid
characters).
The `add` prefix (instead of `register`) makes it clearer that each
function is added in addition to the previous one.

Issue: SPR-15924
2017-09-06 14:39:09 +02:00
Sebastien Deleuze
5d4ee09d53 Fix AbstractJackson2Encoder#canEncode
This commit ensures that the Jackson encoder is selected only
with supported mime types.

Issue: SPR-15910
2017-09-06 08:26:15 +02:00
Rossen Stoyanchev
320bfdf413 Polish 2017-09-05 17:47:02 -04:00
Greg Turnquist
c98e01ad1f Create session-based WebSessionIdResolver
Introduces HeaderSessionIdResolver, which reads session ids from a session header and generates a session response header when new session are created.

Related issue: SPR-15917
2017-09-05 17:37:50 -04:00
Rossen Stoyanchev
03eb6f76db Improve check for actual return value type
Issue: SPR-15910
2017-09-05 16:11:35 -04:00
Rossen Stoyanchev
39cefb5bd7 One more instance of modified method name in Mono 2017-09-05 13:59:45 -04:00
Rossen Stoyanchev
fc0841c60f Adapt to method name change in Mono 2017-09-05 13:57:20 -04:00
Sam Brannen
0702898836 Clean up warnings in Gradle build output 2017-09-04 16:26:51 +02:00
Sebastien Deleuze
60f763a0dd Polish Kotlin reference documentation
Issue: SPR-15659
2017-09-04 10:54:48 +02:00
Sebastien Deleuze
8b8a6766de Change BeanDefinitionDsl to implement ApplicationContextInitializer 2017-09-04 10:46:20 +02:00
Sebastien Deleuze
2969af82d2 Fix Reactive Web link in the ref doc 2017-09-04 07:40:18 +02:00
Stephane Nicoll
71182ab54b Provide hierarchy traversal support for getBeanNamesForAnnotation
Issue: SPR-15923
2017-09-03 08:19:34 +02:00
Juergen Hoeller
f0198f3756 Upgrade to Apache Johnzon 1.1.3
Issue: SPR-15590
2017-09-02 00:28:41 +02:00
Brian Clozel
bff54788e8 Enable HTTP compression Reactor ClientHttpConnector
`ReactorClientHttpConnector` provides an adapter layer to `WebClient`
for using Reactor-Netty's `HttpClient`.
This commit enables HTTP compression support by default for this client
Connector.

Another constructor is still available for providing a custom
`HttpOptions` configuration.

Issue: SPR-15908
2017-09-01 23:14:58 +02:00
Rossen Stoyanchev
edb70b4f55 Merge pull request #1504 from bbohl/stringindexoutofbounds_resttemplate_fix 2017-09-01 16:58:09 -04:00
Rossen Stoyanchev
3d61f7ba60 Polish 2017-09-01 16:57:35 -04:00
Brian Bohl
81dfadcb16 Fix StringIndexOutOfBoundsException in RestTemplate.doExecute IOException handler when query string is an empty string 2017-09-01 16:48:53 -04:00
Juergen Hoeller
26284cac4f Hibernate Validator 5 compatible support for element constraints
Issue: SPR-15916
Issue: SPR-15839
2017-09-01 16:40:24 +02:00
Juergen Hoeller
b6cae219d8 Upgrade to Log4J 2.9 (and Undertow 1.4.20) 2017-09-01 14:08:19 +02:00
Juergen Hoeller
97ded1dcc7 Polishing 2017-09-01 14:05:35 +02:00
Juergen Hoeller
30bd5827b0 ConfigurationClassEnhancer leniently allows for null bean references
Issue: SPR-15829
2017-09-01 14:05:14 +02:00
Juergen Hoeller
204ddebd68 SimpleAsyncTaskExecutor properly respects NO_CONCURRENCY
Issue: SPR-15895
2017-09-01 13:44:49 +02:00
Stephane Nicoll
678a786076 Merge pull request #1512 from Buzzardo:CONTRIBUTING-DOCUMENTATION-edit
* pr/1512:
  CONTRIBUTING-DOCUMENTATION.adoc edit
2017-09-01 09:28:28 +02:00
Jay Bryant
3736b049d0 CONTRIBUTING-DOCUMENTATION.adoc edit
I made it be more formal and be easier to read.

Closes gh-1512
2017-09-01 09:28:09 +02:00
Stephane Nicoll
3a006439ee Merge pull request #1511 from arend-von-reinersdorff:patch-1
* pr/1511:
  Minor fix in example code: No quotes for boolean
2017-09-01 09:27:05 +02:00
Arend v. Reinersdorff
ba50581961 Minor fix in example code: No quotes for boolean
Closes gh-1511
2017-09-01 09:26:47 +02:00
Arjen Poutsma
14af5d941a Javadoc
Issue: SPR-15912
2017-08-31 13:55:19 +02:00
Sebastien Deleuze
2f812112c2 Update Kotlin Slack URL
Issue: SPR-15659
2017-08-31 10:23:25 +02:00
Sebastien Deleuze
466699ba63 Polishing
Issue: SPR-15659
2017-08-31 09:57:11 +02:00
Stephane Nicoll
a8f10280ff Merge pull request #1509 from Buzzardo:master
* pr/1509:
  Polish contribution
  Polish
2017-08-30 18:14:08 +02:00
Stephane Nicoll
8bd45cdec4 Polish contribution
Closes gh-1509
2017-08-30 18:13:10 +02:00
Jay Bryant
ea0e22218f Polish
See gh-1509
2017-08-30 18:12:50 +02:00
Sebastien Deleuze
44e8cdcd89 Polishing
Issue: SPR-15659
2017-08-30 17:28:36 +02:00
Sebastien Deleuze
884fc40c3c Add "Injecting configuration properties" to Kotlin ref doc
Issue: SPR-15659
2017-08-30 16:36:55 +02:00