Commit Graph

1706 Commits

Author SHA1 Message Date
Brian Clozel
decbb9ccf9 Provide default codecs config callback to custom codecs
As a follow-up of gh-23961, this change provides a way for custom codecs
to align with the default codecs' behavior on common features like
buffer size limits and logging request details.

Closes gh-24118
Co-authored-by: Rossen Stoyanchev <rstoyanchev@pivotal.io>
2019-12-02 22:52:55 +01:00
Wang Xuesong
d1ab81587c [*.*] is displayed as [bold .] and needs to be escaped
execution(* com.xyz.service.*.*(..))  ->  execution(* com.xyz.service.\*.*(..))

Closes gh-24108
2019-12-02 19:14:18 +01:00
Rossen Stoyanchev
acfeb77d41 Polishing
See gh-23961
2019-12-02 14:12:59 +00:00
Brian Clozel
d4209392d2 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-12-02 14:12:59 +00:00
Brian Clozel
1560bbd81e Revert "Allow ExchangeStrategies customizations in WebClient"
This reverts commit b3020bc484.
2019-12-02 10:39:53 +01:00
Brian Clozel
b3020bc484 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-11-29 22:26:52 +01:00
Sam Brannen
d7023fd02b Delete unused JdbcTemplate fields in examples
Closes gh-24085
2019-11-29 19:01:42 +01:00
Sam Brannen
52a1fc4329 Polish BatchPreparedStatementSetter example in reference manual
Closes gh-24084
2019-11-29 18:50:42 +01:00
Sam Brannen
5648ef3276 Fix examples for <tx:method/> settings in reference manual
Closes gh-24080
2019-11-29 18:41:59 +01:00
Sam Brannen
093323beeb Introduce Checkstyle rule to prohibit class names ending with "Test" 2019-11-29 17:30:29 +01:00
Rossen Stoyanchev
25f3465f1f Polishing contribution
See gh-24087
2019-11-29 15:53:37 +00:00
ryenus
40331eaca3 Fix consecutive-word duplications in documentation
See gh-24089
2019-11-27 09:42:44 +01:00
Rossen Stoyanchev
5a552f1670 Update links between WebFlux and Web MVC 2019-11-26 21:50:01 +00:00
Rossen Stoyanchev
f4e0288357 Remove mentions of Tomcat async request timeout value
Close gh-24030
2019-11-19 17:08:43 +00:00
Rossen Stoyanchev
842b424acd Use method signature to refine RSocket @MessageMapping
Before this change an @MessageMapping could be matched to any RSocket
interaction type, which is arguably too flexible, makes it difficult to
reason what would happen in case of a significant mismatch of
cardinality, e.g. request for Fire-And-Forget (1-to-0) mapped to a
method that returns Flux, and could result in payloads being ignored,
or not seen unintentionally.

This commit checks @ConnectMapping method on startup and rejects them
if they return any values (sync or async). It also refines each
@MessageMapping to match only the RSocket interaction type it fits
based on the input and output cardinality of the handler method.
Subsequently if a request is not matched, we'll do a second search to
identify partial matches (by route only) and raise a helpful error that
explains which interaction type is actually supported.

The reference docs has been updated to explain the options.

Closes gh-23999
2019-11-18 17:27:41 +00:00
denisgalaybo
9526e39f88 Fix errors in reference manual
Closes gh-24008
2019-11-17 13:50:50 +01:00
Juergen Hoeller
55011e7a0f Note on injecting results from local @Bean methods (self references)
Closes gh-23934
2019-11-13 16:17:01 +01:00
Sam Brannen
a276c667d1 Polishing 2019-11-12 13:48:48 +01:00
Rossen Stoyanchev
fac9ca891a Fix copy-and-paste error in docs 2019-11-11 17:31:51 +00:00
Rossen Stoyanchev
51b43496f4 Update docs for ASYNC dispatch config
Closes gh-23958
2019-11-11 14:31:53 +00:00
Andy Wilkinson
f7bc8c8268 Tidy up classpath pollution caused by resource creation in the tests
Previously, spring-webmvc and spring-webflux both contained tests
that would create gzipped files, write them to the filesystem
alongside the project's compiled test classes, and configure them to
be deleted on JVM exit. The output location placed the files on the
classpath, polluting it for every subsequent test that used the same
ClassLoader. The test-sources plugin combined with Gradle's use of
worker JVMs, broadens the scope of this pollution to other, downstream
projects in the same build. For example, the tests for
spring-websocket will have a different classpath depending on whether
or not the tests for spring-webmvc have already been run on the same
worker as part of the current build.

This commit updates the spring-webmvc and spring-webflux modules to
introduce a new JUnit Jupiter extension, GzipSupport. This extension
allows gzipped files to be created via an injectable GzippedFiles
class and automatically deletes each created file in an after-each
callback. This ensures that a gzipped file only exists on the
classpath for the duration of the test that needs it, avoiding the
pollution of the classpath of any subsequent tests.

Closes gh-23970
2019-11-11 15:11:10 +01:00
Rossen Stoyanchev
1403603b05 Doc update for ForwardedHeaderFilter
Closes gh-23954
2019-11-11 11:44:44 +00:00
Sam Brannen
29185505b1 Polishing 2019-11-09 13:51:28 +01:00
Muhammad Hewedy
f638bfc6a9 Fix status code in webmvc.adoc
Closes gh-22396
2019-11-08 17:50:48 +00:00
denisgalaybo
b0b6423714 Fixed error in webflux.adoc
Closes gh-23957
2019-11-08 17:19:53 +00:00
방성범 (Bang Seongbeom)
89fc0f2713 Fix typo in docs
Closes gh-23788
2019-11-01 11:57:03 +00:00
Rossen Stoyanchev
5abf24e7d7 Expose maxInMemorySize via CodecConfigurer
Centralized maxInMemorySize exposed via CodecConfigurer along with
ability to plug in an instance of MultipartHttpMessageWrite.

Closes gh-23884
2019-10-29 12:33:16 +00:00
Tomasz Letachowicz
9bbf22a1c9 Typos in WebSocket section
Closes gh-23777
2019-10-23 16:55:00 +01:00
Philippe De Neve
ca77342407 Update Spring Boot references in testing documentation
See gh-23848
2019-10-23 09:53:41 +02:00
Minho Hwang
d1aee0e869 Fix typo in RSocket reference documentation
This commit fixes a typo in a Java code snippet of
the RSocket reference documentation.

Closes gh-23762
2019-10-06 16:34:27 +02:00
Sam Brannen
f16e29892e Add note regarding proxyTargetClass for Java config and web controllers
See gh-23744
2019-10-02 13:11:06 +02:00
Martin Macko
96930924b2 Fixes broken links to dev.java.net
Closes gh-23746
2019-10-02 12:48:34 +02:00
Drummond Dawson
b7f819c9e1 Fix URI typo in Java code snippet of web-uris.adoc
Closes gh-23739
2019-10-01 15:10:44 +02:00
Sebastien Deleuze
6080449d03 Polishing 2019-09-27 18:17:23 +02:00
Sam Brannen
4dc966b04b Include @Inject TCK tests in the build again
Commit 979508a7f3 removed the JUnit 4
dependency from all modules except spring-test. Unfortunately, the
@Inject TCK tests (SpringAtInjectTckTests) are still based on JUnit 3.
Thus, that commit accidentally excluded those tests from the build.

This commit includes SpringAtInjectTckTests in the build again by
introducing a test runtime dependency on the JUnit Vintage TestEngine
in spring-context.

See gh-23451
2019-09-27 13:57:31 +02:00
Sam Brannen
6186239287 Remove obsolete references to specific release versions in testing docs 2019-09-26 15:02:30 +02:00
Sam Brannen
f05b4625de Merge branch '5.1.x' 2019-09-26 10:55:55 +02:00
Sam Brannen
7d126d3288 Improve documentation regarding "annotated classes"
See gh-23638
2019-09-26 10:26:36 +02:00
Sebastien Deleuze
f79cebd53d Add Kotlin samples to RSocket documentation
See gh-23147
2019-09-25 17:04:40 +02:00
Johnny Lim
d6d3a9e232 Polish ImportOrderCheck Checkstyle rule
Closes gh-23685
2019-09-24 12:36:51 +02:00
Sebastien Deleuze
840249778a Polish Kotlin reference documentation for WebMvc.fn
See gh-23657
2019-09-24 10:14:16 +02:00
Rossen Stoyanchev
2888b032a1 Polish rsocket.adoc 2019-09-24 06:08:06 +01:00
Rossen Stoyanchev
93371cc2ac Polish 2019-09-23 16:35:08 +01:00
Arjen Poutsma
9ffecc5059 Polish reference documentation for WebMvc.fn 2019-09-23 16:08:50 +02:00
Arjen Poutsma
652bbdad2a Add reference documentation for WebMvc.fn
This commit introduces reference documentation for WebMvc.fn, the
functional web framework.

Closes gh-23657
2019-09-23 15:27:49 +02:00
Rossen Stoyanchev
0ae7154518 Fix checkstyle violation 2019-09-23 13:09:06 +01:00
Rossen Stoyanchev
88bb2aabbf RSocket reference documentation
Closes: gh-23147
2019-09-23 12:18:03 +01:00
Sebastien Deleuze
02d70424ad Mention Kotlin code samples in the Kotlin refdoc 2019-09-19 10:44:50 +02:00
Sebastien Deleuze
1dfe304da4 Improve parity between Java and Kotlin router DSL
This commit adds following functions to the Kotlin DSL:
add, filter, before, after and onError.

Closes gh-23524
2019-09-17 12:42:48 +02:00
Sebastien Deleuze
5a0216d657 Improve parity between Java and Kotlin router DSL
This commit adds variants with pattern + predicate to
Kotlin router DSLs, and vararg where necessary.

Closes gh-23524
2019-09-16 22:14:55 +02:00