Commit Graph

1176 Commits

Author SHA1 Message Date
Sam Brannen a924677b49 Document @NestedTestConfiguration support in reference manual
See gh-25912
2020-10-14 11:04:46 +02:00
Sam Brannen e5ae2cb0fe Support Propagation.NEVER for disabling test-managed transactions
Prior to this commit only Propagation.NOT_SUPPORTED was supported for
disabling test-managed transactions via the `propagation` attribute of
`@Transactional`.

This commit allows users to specify Propagation.NOT_SUPPORTED or
Propagation.NEVER to disable test-managed transactions.

Closes gh-25909
2020-10-13 18:30:50 +02:00
Sébastien Deleuze 3ed8813bbf Upgrade to Coroutines 1.4.0-M1 and use awaitSingle()
This commit raises the minimum Coroutines version supported
to 1.4.0-M1 and above, and changes usages of awaitFirst() or
awaitFirstOrNull() to awaitSingle() or awaitSingleOrNull()
to fix gh-25007.

Closes gh-25914
Closes gh-25007
2020-10-13 15:26:39 +02:00
xuxiang 66138f0dce
Fix a few typos in the web reference docs
Closes gh-25893

Co-authored-by: zhiyi.xx <zhiyi.xx@antfin.com>
2020-10-10 16:35:56 +02:00
Sébastien Deleuze 94a42a3086 Support suspending handler methods in Spring MVC
This commit adds support for Kotlin Coroutines suspending functions to
Spring MVC, by converting those to a Mono that can then be handled by
the asynchronous request processing feature.

It also optimizes Coroutines detection with the introduction of an
optimized KotlinDetector.isSuspendingFunction() method that does not
require kotlin-reflect.

Closes gh-23611
2020-10-09 12:25:32 +02:00
Sébastien Deleuze 7d7ed88739 Provide WebClient#exchange() alternative for Coroutines
This commit adds awaitExchange { } and
exchangeToFlow { } extensions as Coroutines variants for
exchangeToMono() and exchangeToFlux().

Closes gh-25751
2020-10-07 11:09:12 +02:00
Sébastien Deleuze 92b2c45281 Add kotlinx.serialization JSON support to Spring WebFlux
Flow decoding is not supported yet since it depends on
kotlin/kotlinx.serialization#1073, but it will be
enabled when this issue will be fixed.

Closes gh-25771
2020-10-06 23:02:33 +02:00
Brian Clozel a0af552d0f Add option for ignoring last-modified for static resources
Prior to this commit, the resource handler serving static resources for
Spring MVC and Spring WebFlux would always look at the
`Resource#lastModified` information, derive the `"Last-Modified"` HTTP
response header and support HTTP conditional requests with that
information.

In some cases, builds or packaging tools choose to set this last
modification date to a static date in the past. This allows tools to
have reproducible builds or to leverage caching given the static
resources content didn't change.

This can lead to problems where this static date (e.g. "1980-01-01") is
used literally in HTTP responses and will make the HTTP caching
mechanism counter-productive: the content of the resources changed, but
the application insists on saying it didn't change since the 80s...

This commit adds a new configuration option to disable this support -
there is no way to automatically discard those dates: there is no
standard for that and many don't use he "EPOCH 0 date" as it can lead to
compatibility issues with different OSes.

Closes gh-25845
2020-10-06 16:30:35 +02:00
Juergen Hoeller b7e1553c9d Merge branch '5.2.x'
# Conflicts:
#	build.gradle
#	spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
2020-10-06 15:37:54 +02:00
Juergen Hoeller e417318915 Revise native Hibernate 5 bootstrapping with JTA transaction manager
Closes gh-25858
2020-10-06 15:31:19 +02:00
Arjen Poutsma 200b33b26a Add no path HTTP method variants for route builder
This commit adds two overloaded methods for each HTTP method in the
WebFlux.fn and WebMvc.fn route builders: one method taking just a
handler function, the other a request predicate and handler function.

After this commit, it is no longer required to provide a String path,
which is particularly useful when nesting routes, and the path would be
"".

Closes gh-25752
2020-10-06 11:00:17 +02:00
Arjen Poutsma 444c8185b6 Add document on async support in WebMvc.fn
This commit adds reference documentation about the support for
asynchronous types in WebMvc.fn.
2020-10-02 15:04:25 +02:00
Arjen Poutsma 8057fb38b2 DefaultPartHttpMessageReader reference docs
This commit changes the WebFlux reference documentation from the
SynchronossPartHttpMessageReader to the DefaultPartHttpMessageReader.

Closes gh-25827
2020-09-28 10:19:49 +02:00
Sam Brannen b34778d220 Polishing 2020-09-26 15:02:15 +02:00
Rossen Stoyanchev 52084ed954 Update WebFlux docs on logging with async appenders
Closes gh-25547
2020-09-25 21:44:35 +01:00
Rossen Stoyanchev 10c5f85a9f WebTestClient documentation updates
See gh-25751
2020-09-25 21:17:07 +01:00
Juergen Hoeller f89bd47188 Merge branch '5.2.x' 2020-09-25 12:52:56 +02:00
Juergen Hoeller d022fcf32f Explicit note on TransactionalEventListener versus reactive transactions
Closes gh-25805
2020-09-25 12:49:45 +02:00
Brian Clozel 687c3985d5 Fix merge-forward 2020-09-24 19:54:04 +02:00
Brian Clozel 6f04c7b60e Merge branch '5.2.x' 2020-09-24 18:11:32 +02:00
Sam Brannen a5a4960859 Do not generate reference docs for include-files
Prior to this commit, the Asciidoctor Gradle tasks generated top-level
HTML and PDF documents for AsciiDoc files that are included in other
top-level documents. This causes slower builds and results in each
include-file being published twice:

1) inline in the including document (as intended)
2) as a top-level document but missing surrounding context (unintended)

The reason these include-files are generated as top-level documents is
that the asciidoctor and asciidoctorPdf Gradle tasks are configured to
use '*.adoc' as the input source files.

This commit addresses this issue by moving the following include-files
to new subdirectories. Locating the include-files in the subdirectories
causes them to be ignored in the '*.adoc' pattern used to identify
input source files.

- data-access-appendix.adoc -> data-access/data-access-appendix.adoc
- integration-appendix.adoc -> integration/integration-appendix.adoc
- testing-webtestclient.adoc -> testing/testing-webtestclient.adoc

Closes gh-25783
2020-09-21 11:51:50 +02:00
Sam Brannen 87399aedf7 Do not generate reference docs for include-files
Prior to this commit, the Asciidoctor Gradle tasks generated top-level
HTML and PDF documents for AsciiDoc files that are included in other
top-level documents. This causes slower builds and results in each
include-file being published twice:

1) inline in the including document (as intended)
2) as a top-level document but missing surrounding context (unintended)

The reason these include-files are generated as top-level documents is
that the asciidoctor and asciidoctorPdf Gradle tasks are configured to
use '*.adoc' as the input source files.

This commit addresses this issue by moving the following include-files
to new subdirectories. Locating the include-files in the subdirectories
causes them to be ignored in the '*.adoc' pattern used to identify
input source files.

- data-access-appendix.adoc -> data-access/data-access-appendix.adoc
- integration-appendix.adoc -> integration/integration-appendix.adoc
- testing-webtestclient.adoc -> testing/testing-webtestclient.adoc

Closes gh-25783
2020-09-19 14:54:27 +02:00
Sam Brannen e58e33606a Polish WebTestClient ref docs and fix example 2020-09-18 15:33:54 +02:00
Andreas Ahlenstorf cd6085a310 Add kotlinx.serialization JSON support to Spring MVC
Closes gh-21188

Co-authored-by: Sebastien Deleuze <sdeleuze@vmware.com>
2020-09-14 23:25:16 +02:00
Juergen Hoeller 07b3e92bae Merge branch '5.2.x'
# Conflicts:
#	build.gradle
#	src/docs/asciidoc/core/core-aop-api.adoc
2020-09-14 22:22:02 +02:00
Juergen Hoeller 3c84863271 Polishing 2020-09-14 22:18:30 +02:00
Ruslan Stelmachenko 3b0f14fd2e
Fix typo in Regular Expression Pointcuts docs
Closes gh-25767
2020-09-14 21:01:13 +02:00
Sokrato 4dfecde694 fix core doc English regarding @AspectJ 2020-09-14 10:20:31 +01:00
xuxiang f37e0c6a1b
Fix typo regarding Ordered interface in core-aop.adoc
Closes gh-25759
2020-09-12 13:57:11 +02:00
Brian Clozel 078543ce67 Deprecate Joda time support
This commit deprecates the Joda time support and schedules it for
removal in 6.0.

Closes gh-25736
2020-09-08 14:46:48 +02:00
Rossen Stoyanchev dd011c991c Merge branch '5.2.x' into master 2020-09-07 21:41:30 +01:00
Rossen Stoyanchev 94c91c9e9c Explain how to provide serialization view programmatically
Closes gh-25596
2020-09-07 21:27:52 +01:00
Juergen Hoeller 9d7849c539 Merge branch '5.2.x'
# Conflicts:
#	spring-expression/src/main/java/org/springframework/expression/spel/ast/MethodReference.java
2020-09-05 13:02:01 +02:00
Juergen Hoeller 939c76c4a5 Revise documentation notes on getParameterType performance issues
See gh-25679
2020-09-05 13:00:06 +02:00
Rossen Stoyanchev e34c800467 More updates to Web testing section
See gh-19647
2020-09-01 08:56:57 +01:00
Rossen Stoyanchev c6b87b3ef4 Updates to Web testing sections of reference docs
Closes gh-19647
2020-08-31 21:15:17 +01:00
Rossen Stoyanchev 591ab8a00a @EnableWebFlux setup supports WebSocketHandler
Closes gh-22587
2020-08-31 21:15:17 +01:00
Rossen Stoyanchev 7bc8035989 Replace http with https in docs sample 2020-08-28 22:30:57 +01:00
Rossen Stoyanchev 42aeb6cd93 Update docs on timeouts with WebClient
Closes gh-25115
2020-08-28 22:19:01 +01:00
Oleksii Klochko 7205edac85
Fix typo in websocket.adoc
Closes gh-25630
2020-08-22 22:56:36 +02:00
York Lee 36553264ce Fix document for core-bean.adoc
This is the orginal "A bean is an object that is instantiated, assembled, and otherwise managed by a Spring IoC container". Here's an extra word of "otherwise".
2020-08-14 11:04:27 +01:00
Sam Brannen 2c757399b2 Polish spring-jcl documentation 2020-08-11 11:58:49 +02:00
Vitalii Ananev 890f29e832 Add spring-jcl information to reference doc
Closes gh-22158
2020-08-10 16:52:45 +02:00
Sam Brannen 1dcaa04224 Fix typo in reference manual 2020-08-10 12:22:06 +02:00
diguage 2c274cf0aa Use Groovy syntax highlighting in reference manual
Closes gh-25554
2020-08-10 12:11:03 +02:00
diguage 0501999e43 Fix comment syntax in xml examples
See gh-25537
2020-08-06 14:25:30 +02:00
Stephane Nicoll 6d164b1445 Merge branch '5.2.x' 2020-08-06 09:30:17 +02:00
diguage 5cb2cc2466 Fix asciidoctor syntax for source
See gh-25539
2020-08-06 09:27:09 +02:00
diguage e150a95685 Fix comment syntax in xml examples
See gh-25537
2020-08-06 09:10:10 +02:00
Rossen Stoyanchev 683cc2eb7f Add NDJSON and deprecate application/stream+json
Closes gh-21283
2020-07-28 17:53:37 +03:00
Brian Clozel 9301d7a294 Add application startup metrics support
This commit adds a new `StartupStep` interface and its factory
`ApplicationStartup`. Such steps are created, tagged with metadata and
thir execution time can be recorded - in order to collect metrics about
the application startup.

The default implementation is a "no-op" variant and has no side-effect.
Other implementations can record and collect events in a dedicated
metrics system or profiling tools. We provide here an implementation for
recording and storing steps with Java Flight Recorder.

This commit also instruments the Spring application context to gather
metrics about various phases of the application context, such as:

* context refresh phase
* bean definition registry post-processing
* bean factory post-processing
* beans instantiation and post-processing

Third part libraries involved in the Spring application context can
reuse the same infrastructure to record similar metrics.

Closes gh-24878
2020-07-27 22:37:14 +02:00
Jay Bryant 674bad0c59 Wording changes
Replace potentially insensitive language with more neutral language.

See gh-25314
2020-07-20 20:08:54 +02:00
Sam Brannen 3d64f8162c Merge branch '5.2.x' 2020-07-20 18:38:32 +02:00
Jay Bryant 1c83b3fc22 Wording changes
Replace potentially insensitive language with more neutral language.

Closes gh-25314
2020-07-20 17:14:13 +02:00
Sam Brannen b0570cd3a6 Polish contribution
See gh-25367
2020-07-16 15:56:17 +02:00
Martin Knopf 35c0ae7b0c Allow auto grow for entries w/o default constructor in SpEL
Prior to this commit, The "auto grow" feature in SpEL expressions only
worked for element types with a default constructor. For example, auto
grow did not work for a list of BigDecimal elements.

This commit inserts a null value in the list when no default
constructor can be found for the element type.

Closes gh-25367
2020-07-16 15:31:33 +02:00
Rossen Stoyanchev 7c98251142 Support for making requests via RSocketClient
Closes gh-25332
2020-07-14 12:07:59 +03:00
Brian Clozel d9ccd618ea Deprecate remoting technologies support
Because of security and broader industry support, support for several
remoting technologies is now deprecated and scheduled for removal in
Spring Framework 6.0.

This commit deprecates the following remoting technologies:

* HTTPInvoker
* RMI
* Hessian
* JMS remoting

Other remoting technologies like EJB or JAXWS might be deprecated in the
future depending on industry support.

Closes gh-25379
2020-07-10 12:04:24 +02:00
Sam Brannen c972d861ed Revert "Use correct link to MaxInMemorySize"
This reverts commit 90467ba568.
2020-07-08 15:25:46 +02:00
Johnny Lim 90467ba568
Use correct link to MaxInMemorySize
Closes gh-25368
2020-07-08 15:05:24 +02:00
Rossen Stoyanchev 0e4e25d227 Updates to CORS patterns contribution
Closes gh-25016
2020-07-08 13:18:46 +03:00
Sam Brannen 882668c1bc Merge branch '5.2.x' 2020-07-06 16:33:01 +02:00
Sam Brannen 8734c64b75 Remove invalid import from Kotlin example 2020-07-06 16:31:33 +02:00
Sam Brannen 8be2a43d52 Rename SystemArchitecture aspect to CommonPointcuts in AOP ref doc
See gh-25357
2020-07-06 16:20:05 +02:00
Sam Brannen 33643593e2 Merge branch '5.2.x' 2020-07-06 14:51:15 +02:00
Sam Brannen 52c2ca610b Polish AOP reference documentation
- fix formatting
- fix syntax
- use consistent example package name
2020-07-06 14:50:44 +02:00
Sam Brannen 85a46882ce Merge branch '5.2.x' 2020-07-02 15:29:32 +02:00
Maksim 008a0a1bdd Fix interface and class names in examples in core-aop doc
Closes gh-25351
2020-07-02 15:28:05 +02:00
Sam Brannen f9331d921f Merge branch '5.2.x' 2020-06-23 17:10:33 +02:00
DK Lee 6419b18bee Fix typo in Java example for handler class
Closes gh-25302
2020-06-23 16:46:14 +02:00
Juergen Hoeller 9e12a20324 Polishing 2020-06-23 11:35:22 +02:00
Kamil Szymanski 23aeba0e46 Fix typos in WebRequest.checkNotModified docs
Closes gh-1035
2020-06-23 09:45:07 +02:00
Sam Brannen bf5033281b Merge branch '5.2.x' 2020-06-22 11:38:50 +02:00
Sam Brannen 80d1aaec0c Add spring-r2dbc and spring-rsocket to Stack Overflow tags 2020-06-22 11:38:04 +02:00
Sam Brannen 01fa923e96 Merge branch '5.2.x' 2020-06-21 19:42:43 +02:00
Sam Brannen 0a208a4941 Fix broken link to Stack Overflow tags 2020-06-21 19:41:56 +02:00
Juergen Hoeller 3a653bd35f Deprecate JCA CCI support
Closes gh-25287
2020-06-19 19:19:14 +02:00
Rossen Stoyanchev ce728a6c4b Update docs for PathPattern support in WebMvc
Closes gh-24945
2020-06-18 21:16:43 +01:00
Sam Brannen dc3801043f Merge branch '5.2.x' 2020-06-18 14:55:02 +02:00
Sam Brannen 46c786167e Replace "blacklist" with alternative words
See gh-25262
2020-06-18 14:54:33 +02:00
Mark Paluch aff601edf1 Add support for R2DBC
This commit introduces support for R2DBC ("Reactive Relational Database
Connectivity") with custom ConnectionFactory implementations, a
functional DatabaseClient for SQL execution, transaction management, a
bind marker abstraction database initialization utilities, and
exception translation.

Closes gh-25065
2020-06-17 19:29:48 +02:00
Mark Paluch 217b6e37a6 Rollback reactive transaction on cancel
This commit introduces a change in reactive transaction semantics for
cancel signals. Canceling a subscription now rolls back a reactive transaction
to achieve a deterministic transaction outcome.

Previously, cancel signals committed a transaction which could
cause partially committed transactions depending on when the cancel happened.
2020-06-17 15:04:54 +02:00
Sam Brannen 775d99ac78 Merge branch '5.2.x' 2020-06-17 14:23:27 +02:00
Sam Brannen 9acb5b1a4a Replace "black box" with alternative term
See gh-25262
2020-06-17 14:22:26 +02:00
Sam Brannen 77dd05853c Polishing 2020-06-17 13:35:14 +02:00
Juergen Hoeller d36407d585 Deprecate rarely used bean definition variants
Closes gh-24875
2020-06-17 10:59:55 +02:00
Sam Brannen bb7e5f0172 Merge branch '5.2.x' 2020-06-15 14:59:30 +02:00
wonwoo fd7e6486de Fix syntax in validation examples
Closes gh-25251
2020-06-15 14:58:27 +02:00
Rossen Stoyanchev 1984cfe9d7 Merge branch '5.2.x' 2020-06-08 21:20:44 +01:00
Rossen Stoyanchev a2d516d526 Replace "whitelist" with alternative words 2020-06-08 21:19:28 +01:00
Sam Brannen edbc54fe78 Merge branch '5.2.x' 2020-06-08 19:17:01 +02:00
Sam Brannen 721fd20708 Document advice precedence in reference manual
This commit documents the precedence for advice declared within the
same @Aspect class or within the same <aop:aspect> element.

See gh-25186
2020-06-08 19:06:46 +02:00
Sam Brannen 0b760c15ea Polish AOP chapter in reference manual 2020-06-08 19:06:46 +02:00
Rossen Stoyanchev 150fe96a98 Merge branch '5.2.x' 2020-06-08 17:44:42 +01:00
Rossen Stoyanchev 9e1121fd8d Document behavior on reactive tx cancellation
Closes gh-25091
2020-06-08 17:43:52 +01:00
Juergen Hoeller 5051d7302d Merge branch '5.2.x'
# Conflicts:
#	build.gradle
#	spring-test/src/main/java/org/springframework/mock/http/server/reactive/MockServerHttpRequest.java
#	spring-web/src/main/java/org/springframework/http/HttpHeaders.java
#	spring-web/src/testFixtures/java/org/springframework/web/testfixture/http/server/reactive/MockServerHttpRequest.java
2020-06-06 15:27:15 +02:00
Juergen Hoeller 196bb6fe32 Support for shared GroovyClassLoader in GroovyScriptFactory
Exposes setClassLoader method in ConfigurableApplicationContext interface as obvious first-class configuration option.

Closes gh-25177
2020-06-06 13:21:20 +02:00
Martin Macko e11da64e9c
Fix obsolete link in Kotlin docs
Closes gh-25192
2020-06-05 14:12:38 +02:00
Sam Brannen cc061ca716 Merge branch '5.2.x' 2020-05-27 16:30:22 +02:00
Sam Brannen 3cbc297fc6 Polish contribution
See gh-25137
2020-05-27 16:29:34 +02:00
limo520 d6cab259c3 Fix URI pattern example in webflux.adoc
Closes gh-25137
2020-05-27 16:14:47 +02:00
Juergen Hoeller 9999414b3b Merge branch '5.2.x' 2020-05-18 14:24:33 +02:00
Juergen Hoeller 28177ad91b Explicit notes on access to standard context beans in SpEL expressions
Closes gh-25037
2020-05-18 14:19:05 +02:00
Yanming Zhou 9d429e30de Fix SpelEvaluationException with example code
org.springframework.expression.spel.SpelEvaluationException: EL1007E: Property or field 'name' cannot be found on null
2020-05-18 14:16:15 +02:00
Rossen Stoyanchev b1224835be Add metadataPush support to RSocketRequester
Closes gh-24322
2020-05-14 15:42:43 +01:00
Rossen Stoyanchev a64e7091e0 Deprecate support for RxJava 1.x
Closes gh-19628
2020-05-11 08:48:48 +01:00
stqp 73e3df5df5
Fix typo in core-beans.adoc
Closes gh-25040
2020-05-09 14:06:45 +02:00
Sam Brannen 8f7debc769 Merge branch '5.2.x' 2020-05-08 19:26:00 +02:00
Sam Brannen 0f22a5e409 Update Javadoc regarding reactive tx mgmt support
See gh-25030
2020-05-08 19:25:22 +02:00
Sam Brannen 1e64ffa7ba Merge branch '5.2.x' 2020-05-08 18:19:17 +02:00
Sam Brannen e1b2cafb33 Polish reactive transaction mgmt documentation in reference manual
See gh-25030
2020-05-08 18:13:31 +02:00
Mark Paluch 7fbdc3ad11 Document ReactiveTransactionManager support in reference manual
See gh-25030.
2020-05-08 16:11:02 +02:00
Sam Brannen 21800a5fa6 Polish @Transactional documentation in reference manual 2020-05-07 18:42:02 +02:00
Yanming Zhou 247662de6b
Fix @Transactional syntax error in reference manual
Closes gh-25021
2020-05-07 18:10:50 +02:00
Mark Paluch 2aa8aef216 Extend transaction attributes with labels
TransactionAttribute now exposes a labels attribute that associates a
descriptive array of labels with a transaction.

Labels may be of a pure descriptive nature or may get evaluated by
transaction managers to associate technology-specific behavior
with the actual transaction.
2020-05-06 16:28:21 +02:00
Rossen Stoyanchev 3e736898a6 Merge branch '5.2.x' 2020-05-06 14:31:58 +01:00
Rossen Stoyanchev 53e018362f Update samples to latest RSocket API
A follow-up fix on the upgrade to 1.0 RC7 in gh-24934,
2020-05-06 14:28:18 +01:00
Rossen Stoyanchev 147b8fb755 Turn off use of path extensions by default
Closes gh-23915
2020-05-05 08:04:40 +01:00
Rossen Stoyanchev 153690e717 Merge branch '5.2.x' 2020-05-04 10:55:25 +01:00
swapy 9288067ea8 Add missing @PathVariable declarations in examples
Closes gh-25006
2020-05-04 11:19:19 +02:00
Sam Brannen 1b4b4c3302 Support @TestConstructor config via JUnit Platform config param
This commit introduces support for setting the
spring.test.constructor.autowire.mode property via a JUnit Platform
configuration parameter -- for example, via the
junit-platform.properties file.

Closes gh-24285
2020-05-03 19:02:44 +02:00
Sam Brannen 69b4f33cfa Move spring-framework.png to src/docs folder
Since the spring-framework.png file is not used in the generated
reference manual, this commit moves the spring-framework.png file from
the src/docs/asciidoc/images folder up to the src/docs folder.
2020-04-29 16:25:02 +02:00
Sam Brannen 48d06a4291 Prune images folder for reference manual
This commit deletes unused files in the asciidoc/images folder.
2020-04-29 16:21:07 +02:00
martin-tarjanyi 3bc1d42dcd Integrate Apache http client with WebClient
This commit introduces a ClientHttpConnector implementation backed by
Apache HttpComponents HttpClient 5.0.

Fixes gh-24700
2020-04-29 15:02:09 +02:00
rahulmlokurte 0e9da17910
Fix typo in webmvc-functional.adoc
Closes gh-24968
2020-04-25 09:24:15 +02:00
Brian Clozel dc4cda1b13 WARN against invalid patterns with PathPatternParser
As of gh-24952, `PathPatternParser` will strictly reject patterns with
`"**"` in the middle of them. `"**"` is only allowed at the end of the
pattern for matching multiple path segments until the end of the path.

Currently, if `"**"` is used in the middle of a pattern it will be
considered as a single `"*"` instead. Rejecting such cases should
clarify the situation.

This commit prepares for that upcoming change and:

* logs a warning message if such a case is used by an application
* expands the MVC and WebFlux documentation about URI matching in
general

Closes gh-24958
2020-04-23 13:03:05 +02:00
Brian Hartung 1658223e58 Fixed typo
Fixed another small documentation typo.
2020-04-15 14:20:35 +01:00
Brian Hartung 89775844ed Fixed typos
Fixed a couple of minor documentation typos
2020-04-15 14:20:35 +01:00
onnadi-sa 75457c440c
Fix typo in webflux-functional.adoc
Closes gh-24906
2020-04-14 15:42:50 +02:00
Sam Brannen 6c26765985 Document default constructor as fallback for non-@Autowired constructors
Prior to this commit, it was unclear in the documentation that a default
constructor will be used by default for autowiring if multiple
constructors are present and none of them is annotated with @Autowired.

This commit improves the documentation in this regard.

Closes gh-24838
2020-04-07 14:35:40 +02:00
Juergen Hoeller 151a18d691 Explicit notes on BeanFactory.getType vs bean class in bean definition
Closes gh-24816
2020-04-03 21:11:07 +02:00
Sam Brannen a842434bff Document precedence for @DynamicPropertySource
Closes gh-24837
2020-04-01 18:09:31 +02:00
Rossen Stoyanchev 99c2b1e242 Add snippet for maxInMemorySize config
See gh-23961
2020-03-31 17:08:12 +01:00
Sam Brannen e26764d249 Remove duplicate words in documentation and polish Javadoc 2020-03-31 12:17:58 +02:00
Taehee Kim 8b3521d2bf
Fix typo in webflux-cors.adoc
Closes gh-24815
2020-03-30 14:00:25 +02:00
Mikael Elm 822ca0130a
Fix typos and improve readability in Webflux documentation
Closes gh-24781
2020-03-26 15:16:22 +01:00
Arjen Poutsma 9fb614a5c6 Clarify the role of views with Spring MVC
This commit adds a section to the reference docs that explains
views live within the trust boundary of the application, and the
security implications thereof.

Closes gh-24777
2020-03-25 15:05:50 +01:00
Sam Brannen c24fa22a1b Polishing 2020-03-24 14:22:42 +01:00
Sam Brannen 4be358e47f Cross reference Dynamic Property Sources section 2020-03-24 14:07:56 +01:00
Sébastien Deleuze 1cd0e720f7 Specify that Kotlin code samples leverage kotlin-allopen 2020-03-24 10:31:57 +01:00
Sébastien Deleuze 60dca027e7 Add Kotlin documentation and tests for @DynamicPropertySource
See gh-24540
2020-03-24 10:08:37 +01:00
Sam Brannen ac0363c94e Document @DynamicPropertySource support in the reference manual
Closes gh-24540
2020-03-23 20:43:38 +01:00
Sam Brannen a90716522c Include Testcontainers in Further Resources section 2020-03-23 20:05:58 +01:00
Juergen Hoeller bb1699a9d3 Revise documentation for autowiring with annotated constructors
Closes gh-24711
2020-03-23 18:01:30 +01:00
Sam Brannen 5be0db9259 Consistently refer to `t_actor` table 2020-03-22 20:32:45 +01:00
Sam Brannen b52136dfa5 Revert renaming of local variable
This commit fixes the example by reverting the renaming of the local
Actor variable to avoid a conflict with a same-named variable already
in the current scope.

See gh-24398
2020-03-22 20:28:59 +01:00
Sam Brannen edb5e73d48 Update Kotlin example based on feedback from @lnhrdt
See gh-24398
2020-03-18 15:34:27 +01:00
Sam Brannen 14f5032e97 Update Kotlin example
See gh-gh-24398
2020-03-17 19:22:26 +01:00
Sam Brannen 7dea2686b8 Polish contribution
See gh-24398
2020-03-17 15:06:10 +01:00
maxxedev 9b827283f1 Use more lambda expressions in data-access code examples
Closes gh-24398
2020-03-17 15:06:03 +01:00
Sviatoslav Hryb 018ba92214 Fix formatting in AOP examples in documentation 2020-03-09 14:44:41 +00:00
Sviatoslav Hryb f5195887c9 Fix ampersands in AOP examples in documentation 2020-03-09 13:27:55 +00:00
Qimiao Chen 7ce22e2f3a
Update IntroductionInfo example in reference manual
Closes gh-24650
2020-03-06 12:34:00 +01:00
Rossen Stoyanchev e1b0296f9e Polishing contribution
See gh-24589
2020-03-03 15:38:47 +00:00
陈其苗 771fbde951 Fix URL to Spring Tool Suite
See gh-24589
2020-03-03 15:38:47 +00:00
Yoo In Keun e706fcba1f
Fix typo in testing.adoc
Closes gh-24627
2020-03-02 16:25:28 +01:00
Sviatoslav Hryb 60fd95a354
Fix formatting for pointcut expression examples in documentation
Closes gh-24621
2020-03-02 13:42:09 +01:00
Andreas Volkmann b30f9a1308 Fix typo in core-aop.adoc
Closes gh-24602
2020-02-26 18:33:25 +00:00
Florian Berger d4de3396f7 Fix typo about URI Encoding in docs
Closes gh-24603
2020-02-26 18:28:52 +00:00
wonwoo 5c2d65b8ef
Fix typo in reference manual
Closes gh-24597
2020-02-26 14:34:25 +01:00
Qimiao Chen 8cf70fe509
Improve documentation for @Autowired/@Value in @Configuration classes
Closes gh-24585
2020-02-25 11:01:19 +01:00
Rossen Stoyanchev 7e402ba4fe Improve docs on date and time formatting
Closes gh-24370
2020-02-24 19:05:09 +00:00
Qimiao Chen 1de2e0a4a7
Fix formatting in webflux-webclient.adoc
Closes gh-24578
2020-02-24 15:00:11 +01:00
Rossen Stoyanchev 96e77d417b Update WebFlux section on HTTP/2
Closes gh-24558
2020-02-20 16:28:22 +00:00
Sviatoslav Hryb 2ad4602ca0
Correct Ant-style Patterns example in documentation
Closes gh-24552
2020-02-19 10:51:16 +01:00
Rossen Stoyanchev df1145b797 Correct documentation error in section on BeanWrapper
Closes gh-24510
2020-02-18 09:44:04 +00:00
Sviatoslav Hryb 9e7ab4d308
Correct formatting of MessageSource example in documentation
Closes gh-24531
2020-02-17 15:25:17 +01:00
Rossen Stoyanchev e35d3b8bb5 Update advice on RestTemplate
Closes gh-24503
2020-02-11 14:02:50 +00:00
Andy Wilkinson 02e90a8645
Upgrade to Spring Asciidoctor Extensions 0.4.0.RELEASE
0.4.0 provides built-in support for remembering a user's selections
using local storage. This replaces the custom switch language
JavaScript.

The selection is stored using a key derived from the
options that were available. Concretely, when the options are Java or
Kotlin, the local storage key is java-kotlin. Similarly, if the
choices were Java, Kotlin, and XML, the key would be java-kotlin-xml.

Given local storage's domain and protocol scoping, the nature of the
key that's used for storage will allow a user's selections to be
applied across all documentation hosted on https://docs.spring.io that
offer the same options.

Closes gh-24481
2020-02-07 12:16:02 +01:00
Christoph Dreis 15b651cdfe Polish documentation format
See gh-24460
2020-01-31 08:55:52 +01:00
Sam Brannen 2c86d6ded2 Polishing 2020-01-28 10:50:15 +01:00
Sviatoslav eeaae16b17 Remove dated mention of "local" bean attribute
Closes gh-24430
2020-01-27 17:47:48 +00:00
Anton c1218615df Update integration.adoc
Fix typo
2020-01-27 16:21:16 +00:00
Rob Winch ab70acb325 Fix Additional Asciidoctor Warnings
Fix "unknown style for example block: INFO"

Issue gh-24427
2020-01-24 09:29:13 -06:00
Sam Brannen 75a1395226 Link to BeanShell homepage 2020-01-24 16:20:02 +01:00
Rob Winch 754a8ca05a Fix Asciidoctor Warnings
- Fix "possible invalid reference" errors
  - Add <filename>.adoc where necessary
  - Remove invalid link to beans-servicelocator This section no longer exists
- Fix "skipping reference to missing attribute" errors
  - Add pass macro to escape literals interpreted as attributes
  - Add missing :api-spring-framework: attribute
  - Remove invalid {JB} attribute

Closes gh-24427
2020-01-24 09:14:07 -06:00
Juergen Hoeller 60c7af3625 Mention HikariCP next to DBCP and C3P0 in connection pool notes
Closes gh-24405
2020-01-24 14:54:02 +01:00
Rossen Stoyanchev c69703ffdb Deprecate path extension strategies
This commit deprecates PathExtensionContentNegotiationStrategy and
ServletPathExtensionContentNegotiationStrategy and also updates code
that depends on them internally to remove that dependence.

See gh-24179
2020-01-22 13:35:09 +00:00
Rossen Stoyanchev 3d33cf3764 Updates to Validation section in reference
Closes gh-24338
2020-01-16 15:42:28 +00:00
Sam Brannen 152254ab0a Document supported characters for identifiers in SpEL expressions
Closes gh-24359
2020-01-15 13:53:22 +01:00
Rossen Stoyanchev 8740c2dc18 Warning against split URL handling in docs
Closes gh-24304
2020-01-13 21:33:11 +00:00
Sam Brannen e3e7d90415 Improve documentation for FullyQualifiedAnnotationBeanNameGenerator
See gh-24114
2020-01-08 16:47:39 +01:00
Rossen Stoyanchev 68f9f8116c Fix typo in RSocket reference
See gh-24245
2020-01-03 08:11:14 +00:00
Honnix 8082b338e2 Document that SpEL supports symbolic logical operators
Make it clear that symbolic logical operators are supported.

Closes gh-24276
2019-12-31 18:58:48 +01:00
Ferdinand Jacobs 0b5ad09394 Fix example in RSocket docs
Closes gh-24245
2019-12-22 16:48:58 +01:00
Rossen Stoyanchev dd9b6287b4 Expose ClientCodecConfigurer in WebClient.Builder
Using Consumer<ClientCodecConfigurer> instead of
Consumer<ExchangeStrategies> eliminates one level of nesting that is
also unnecessary since codecs are the only strategy at present.

Closes gh-24124
2019-12-12 21:58:14 +00:00
Rossen Stoyanchev 70a0c93d69 Correct WebFlux docs on BindingResult with @RequestBody
Closes gh-22997
2019-12-10 16:01:33 +00:00
Sam Brannen de8a6c8c57 Polishing 2019-12-06 19:08:54 +01:00
Eric Helgeson d4d940e6e3 Add missing backtick in WebSocket documentation
Closes gh-24155
2019-12-06 19:02:22 +01:00
Johnny Lim 14ce84cebb Fix status code in webflux.adoc 2019-12-05 12:25:04 +00:00
Rossen Stoyanchev 828fe39523 Consistently use releaseBody in DefaultWebClient
See gh-24125
2019-12-04 18:19:52 +00:00
Rossen Stoyanchev 797f618f2b Remove mismatched marker in core-beans.adoc
Closes gh-24132
2019-12-04 16:14:14 +00:00
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
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
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 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
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
Sebastien Deleuze fc6480631e Improve Coroutines transaction API
As a follow-up of gh-22915, the purpose of this commit is to improve
Coroutines programmatic transaction API to make it more consistent with
the Java one and more idiomatic.

For suspending functions, this commit changes the
TransactionalOperator.transactional extension with a suspending lambda
parameter to a TransactionalOperator.executeAndAwait one which is
conceptually closer to TransactionalOperator.execute Java API so more
consistent.

For Flow, the TransactionalOperator.transactional extension is correct
but would be more idiomatic as a Flow extension.

This commit also adds code samples to the reference documentation.

Closes gh-23627
2019-09-12 14:45:03 +02:00
Sam Brannen 99d88ba14e Document minimum JDK 8 update version
Closes gh-23563
2019-09-05 14:04:43 +02:00
Sebastien Deleuze 40a55b412d Rename BodyBuilder#bodyAndAwait to bodyValueAndAwait 2019-09-05 13:34:11 +02:00
Sebastien Deleuze 2b4eb610a7 Add support for Coroutines transactions
This commit adds Coroutines extensions for
TransactionalOperator.transactional that accept suspending lambda or
Kotlin Flow parameters.

@Transactional on suspending functions is not supported yet, gh-23575
has been created for that purpose.

Closes gh-22915
2019-09-03 23:41:42 +02:00
Sebastien Deleuze f8516c69bf Add Kotlin code snippets to data access refdoc
See gh-21778
2019-09-03 16:03:41 +02:00
Arjen Poutsma 4c863f3f83 Revise documentation on using WebClient::exchange
This commit revised the paragraph regarding the need to consume or
release the ClientResponse body when using WebClient::exchange.

Closes gh-23498
2019-09-03 15:44:02 +02:00
康智冬 a6f4862f13 Fix typos related to indefinite articles
Closes gh-23555
2019-09-01 15:45:49 +02:00
Sam Brannen f05f993cc6 Fix formatting in Testing chapter in Reference Manual 2019-08-31 15:07:12 +02:00
Sam Brannen 794e2e328d Polish Testing chapter in Reference Manual 2019-08-31 14:47:49 +02:00
Sebastien Deleuze 3dfd0a24dc Add Kotlin code snippets to WebTestClient testing refdoc
Closes gh-21778
2019-08-31 11:36:57 +02:00
Udo Kohlmeyer b20a8c9d98 Add Kotlin code snippets to testing refdoc
See gh-21778
2019-08-31 11:31:03 +02:00
Sam Brannen ff1f8aa5a8 Add missing parentheses in Testing chapter 2019-08-30 17:19:46 +02:00
Sam Brannen 489193dfa6 Add missing parentheses in Testing chapter 2019-08-30 17:12:23 +02:00
Sebastien Deleuze 52976246ac Remove bodyWithType extension from WebFlux
Since there is no more clash with the new bodyValue
method name.

Closes gh-23523
2019-08-28 13:30:16 +02:00
Sebastien Deleuze 14558844bc Add Kotlin code snippets to WebFlux refdoc
See gh-21778
2019-08-28 11:18:43 +02:00
Sebastien Deleuze 0d3fb0ee0f Add Kotlin code snippets to WebMvc refdoc
See gh-21778
2019-08-22 16:58:00 +02:00
Sam Brannen 53f523001e Focus examples in Testing chapter on JUnit Jupiter 2019-08-21 15:56:15 +02:00
Sam Brannen 3dc4d01b53 Fix heading for Streaming Responses section of Testing chapter 2019-08-21 15:56:15 +02:00
Sam Brannen 6ce5f9da06 Fix unmatched parentheses in @ContextHierarchy example in reference manual
See gh-23487
2019-08-21 14:18:21 +02:00
부종민 18eed79d73 Fix typo
See gh-23480
2019-08-18 08:09:56 +02:00
Sebastien Deleuze 76645644b1 Polishing
See gh-21778
2019-08-14 10:06:04 +02:00
Sebastien Deleuze db02d38c89 Restore annotated code samples
See gh-21778
2019-08-14 10:00:16 +02:00
Sebastien Deleuze ec740559ed Store refdoc preferred language
See gh-21778
2019-08-14 10:00:16 +02:00
Sebastien Deleuze eff9cae314 Add global language switch capabilities to the refdoc
See gh-21778
2019-08-13 16:29:47 +02:00
Sebastien Deleuze 32a942fda9 Polishing 2019-08-13 16:29:47 +02:00
Sebastien Deleuze a2b8ea5173 Remove the black border from code samples
See gh-21778
2019-08-13 16:29:47 +02:00
Lars Grefer c863b8994a Improve language-switch CSS
Closes gh-23454
2019-08-13 09:42:08 +02:00
Sebastien Deleuze b52a50a7e0 Use Kotlin extensions for ClassPathXmlApplicationContext refdoc
Closes gh-23456
2019-08-13 09:42:08 +02:00
Sebastien Deleuze f3c7879831 Add missing css file
See gh-21778
2019-08-12 16:23:49 +02:00
Sebastien Deleuze 96658235c8 Add Kotlin code snippets to core refdoc
This commit introduces Kotlin code snippets, for now
in the core reference documentation. Other sections
will follow, as well as improvements like global
language switch.

See gh-21778
2019-08-12 15:45:18 +02:00
Michał Rowicki ee47bc3a25 Fix typo in data access reference documentation
Closes gh-23450
2019-08-12 11:21:54 +02:00
Sam Brannen 1925526df5 Improve reference documentation for ContextClosedEvent
Closes gh-23436
2019-08-09 13:58:31 +02:00
Sam Brannen 0cdf992433 Fix grammar in Integration chapter regarding MDPs 2019-08-09 13:14:46 +02:00
Sam Brannen e4fec9364c Improve reference documentation for @Autowired's required attribute
Prior to this commit, the corresponding documentation was misleading.

Closes gh-23428
2019-08-09 11:37:46 +02:00
Stephane Nicoll 977451064a Merge branch '5.1.x' 2019-08-09 09:37:36 +02:00
Michał Rowicki 806fcb3839 Fix typo
See gh-23437
2019-08-09 09:36:46 +02:00
Rossen Stoyanchev 63bf1bff23 Merge branch '5.1.x' 2019-08-02 16:33:02 +01:00
Rossen Stoyanchev 70be7117f3 Fix link to Spring AMQP and polish
Optimize section headings for dispaly in left hand navigation.
2019-08-02 16:32:01 +01:00
Sam Brannen f53cdb8bd2 Introduce common SimpleUrlHandlerMapping constructors
Prior to this commit, the SimpleUrlHandlerMapping classes in Spring MVC
and Spring Webflux only had default constructors. This lead to the fact
that users often had to explicitly invoke setUrlMap() and setOrder() on
the newly instantiated SimpleUrlHandlerMapping.

In order to simplify the programmatic setup of a SimpleUrlHandlerMapping
in common scenarios, this commit introduces the following constructors.

- SimpleUrlHandlerMapping()
- SimpleUrlHandlerMapping(Map<String, ?> urlMap)
- SimpleUrlHandlerMapping(Map<String, ?> urlMap, int order)

Closes gh-23362
2019-07-28 17:59:19 +02:00
Sam Brannen 0a822ddf2d Fix typo in reference manual 2019-07-28 16:36:12 +02:00
Sam Brannen 1075bae280 Document repeatable @TestPropertySource support in reference manual
See gh-23320
2019-07-27 23:02:43 +02:00
Sam Brannen c3c152f806 Add multi-prefix comment support for @SqlConfig
gh-23289 introduced support for multiple single-line comment prefixes
for ScriptUtils, ResourceDatabasePopulator, and EmbeddedDatabaseBuilder.

This commit adds the same support for @SqlConfig in the TestContext
Framework. Specifically, @SqlConfig has a new `commentPrefixes`
attribute for setting multiple single-line comment prefixes.

Closes gh-23331
2019-07-24 12:01:14 +02:00
Sam Brannen 5190eaf503 Merge branch '5.1.x' 2019-07-22 18:37:02 +02:00
Ryan Burke 78802d4277 Fix typo in webflux.adoc 2019-07-22 18:35:53 +02:00
Sam Brannen ccdf04e925 Document @SqlMergeMode support in reference manual
See gh-1835
2019-07-21 15:37:51 +02:00
Rossen Stoyanchev 24e96b6c79 Merge branch '5.1.x' 2019-07-19 10:52:30 +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
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
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
Rob Winch fde92793b5 Fix http URLs
See gh-22839
2019-07-11 18:14:20 +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 2b4d6ce354 Add body methods with Object parameter to WebFlux
The commit deprecates syncBody(Object) in favor of body(Object)
which has the same behavior in ServerResponse, WebClient and
WebTestClient. It also adds body(Object, Class) and
body(Object, ParameterizedTypeReference) methods in order to support
any reactive type that can be adapted to a Publisher via
ReactiveAdapterRegistry. Related BodyInserters#fromProducer
methods are provided as well.

Shadowed Kotlin body<T>() extensions are deprecated in favor of
bodyWithType<T>() ones, including dedicated Publisher<T> and
Flow<T> variants. Coroutines extensions are adapted as well, and
body(Object) can now be used with suspending functions.

Closes gh-23212
2019-07-07 22:27:57 +02:00
Lonre Wang 8bfc920ac5 Fix typo in data-access.adoc
Closes gh-23247
2019-07-07 19:11:50 +02:00
Rossen Stoyanchev 97d020c509 Merge branch '5.1.x' 2019-07-05 10:55:49 +01:00
Rossen Stoyanchev 2088a3d57b Document async requests with Spring MVC Test
Closes gh-19666
2019-07-05 10:30:02 +01:00
Sam Brannen 5008423408 Support multipart/* MediaTypes in RestTemplate
Prior to this commit, RestTemplate posted multipart with Content-Type
"multipart/form-data" even if the FormHttpMessageConverter configured
in the RestTemplate had been configured to support additional multipart
subtypes. This made it impossible to POST form data using a content
type such as "multipart/mixed" or "multipart/related".

This commit addresses this issue by updating FormHttpMessageConverter
to support custom multipart subtypes for writing form data.

For example, the following use case is now supported.

MediaType multipartMixed = new MediaType("multipart", "mixed");

restTemplate.getMessageConverters().stream()
    .filter(FormHttpMessageConverter.class::isInstance)
    .map(FormHttpMessageConverter.class::cast)
    .findFirst()
    .orElseThrow(() ->
        new IllegalStateException("Failed to find FormHttpMessageConverter"))
    .addSupportedMediaTypes(multipartMixed);

MultiValueMap<String, Object> parts = new LinkedMultiValueMap<>();
parts.add("field 1", "value 1");
parts.add("file", new ClassPathResource("myFile.jpg"));

HttpHeaders requestHeaders = new HttpHeaders();
requestHeaders.setContentType(multipartMixed);
HttpEntity<MultiValueMap<String, Object>> requestEntity =
    new HttpEntity<>(parts, requestHeaders);

restTemplate.postForLocation("https://example.com/myFileUpload", requestEntity);

Closes gh-23159
2019-06-28 17:13:18 +03:00
Sam Brannen beb454a299 Use HTTPS links in documentation where possible 2019-06-21 16:51:44 +03:00
Sam Brannen 2f4c97cbdb Merge branch '5.1.x' 2019-06-21 12:46:21 +03:00
Sam Brannen 97bfb75fbc Polish documentation for @ControllerAdvice in reference manual 2019-06-21 12:45:08 +03:00
Sebastien Deleuze da582dad7c Add documentation for Coroutines dependencies 2019-06-20 16:11:20 +02:00
Sebastien Deleuze e86b937f8c Leverage new Kotlin script templating support
As of 1.3.40, Kotlin now provides a kotlin-scripting-jsr223-embeddable
dependency which:
 - Fixes classloading related issues
 - Provides out of the box JSR 223 support
 - Is compatible with Spring Boot Fat Jar mechanism

This commit updates Spring Framework tests and documentation accordingly.

Closes gh-23165
2019-06-20 10:17:02 +02:00
Sebastien Deleuze 341385acfc Merge branch '5.1.x' 2019-06-19 13:59:59 +02:00
Sebastien Deleuze bcad276adb Fix Jackson documentation broken links
Closes gh-23153
2019-06-19 13:59:36 +02:00
Sebastien Deleuze ea97fefa98 Merge branch '5.1.x' 2019-06-18 16:52:29 +02:00
Sebastien Deleuze bd568ea2f1 Document how to specify Jackson JSON view serialization hints
Closes gh-23150
2019-06-18 16:50:54 +02:00
Sam Brannen 8ceac9c015 Document supported @Transactional attributes in the TCF
This commit documents which attributes in @Transactional are supported
for test-managed transactions in the Spring TestContext Framework (TCF).

Closes gh-23149
2019-06-18 14:34:28 +03:00
Sam Brannen c4075cf216 Document WebFlux FreeMarker macro support in Reference Manual
Closes gh-23133
2019-06-13 17:40:18 +03:00
Sam Brannen 74d520fbfa Polish @Value documentation in the Reference Manual
See gh-23052
2019-06-11 23:07:23 +03:00
Sebastien Deleuze 1af43d7164 Rework @Value documentation
See gh-23052
2019-06-11 17:54:43 +02:00
Sylvain Lemoine 74fcb0c5e8 Add proper @Value documentation
Closes gh-23052
2019-06-11 12:06:42 +02:00
Rossen Stoyanchev 69eba32284 Improved Part support in MultipartBodyBuilder
1. Add contentType and filename options to PartBuilder.

2. Revert recently committed #44659f since asyncPart can't properly
support Publisher of Part (only Mono, can't support filename), and
replace that with support for Part in the regular part method.

Closes gh-23083
2019-06-04 17:21:39 -04:00
Sam Brannen 3a8388ec8d Merge branch '5.1.x' 2019-06-04 12:01:58 +03:00
Jay Bryant 68333171b6 Reintroduce author list and copyright notice
Closes gh-23049
2019-06-04 11:54:58 +03:00
Sebastien Deleuze e0bb712bfc Update Kotlin documentation 2019-05-31 14:15:44 +02:00
zyan f492e37370 Fix typo
provices -> provides

See gh-23046
2019-05-28 16:00:35 +02:00
Sebastien Deleuze 9905200f69 Merge branch '5.1.x' 2019-05-28 08:01:23 +02:00
Artsiom Chapialiou 0267bcb404 Fix broken asciidoc link to declarative transaction management
Closes gh-23041
2019-05-28 08:00:00 +02:00
Diego Castro 2f8aa368fe Fix code example for validation on functional endpoints
Closes gh-23020
2019-05-24 09:41:17 +02:00
Rossen Stoyanchev 013249757a Merge branch '5.1.x' 2019-05-15 16:44:05 -04:00
Rossen Stoyanchev e0b9ed6d72 Fix typo in reference
Closes gh-22975
2019-05-15 16:13:02 -04:00
Juergen Hoeller e0654a5b3d Merge branch '5.1.x' 2019-05-13 19:22:07 +02:00
Juergen Hoeller d3110c452e SpEL documentation refinements 2019-05-13 19:15:45 +02:00
Stephane Nicoll 6d69a4e03a Merge branch '5.1.x' 2019-05-10 09:57:25 +02:00
Andrew McCallum 9294b1d7eb Fix typo
Closes gh-22938
2019-05-10 09:56:47 +02:00
Sam Brannen 1be29d5933 Document automatic constructor injection in JUnit Jupiter
Closes gh-22928
2019-05-09 16:16:32 +02:00
Juergen Hoeller 0b50d1eff3 Merge branch '5.1.x' 2019-05-09 14:29:37 +02:00
Denis Zavedeev 484ec64305 Minor integration doc refinements 2019-05-09 14:27:22 +02:00
Denis Zavedeev c80028b71e Fix trivial errors in `integration.adoc` 2019-05-09 13:50:26 +02:00
Juergen Hoeller e3fa4e1350 Merge branch '5.1.x' 2019-05-07 14:24:28 +02:00
Juergen Hoeller ecc165a94f Consistent spelling on index page 2019-05-07 13:46:27 +02:00
Nicofisi 0e980324e6 Add a space in the documentation index file 2019-05-07 13:29:59 +02:00
Sebastien Deleuze 89454e69c3 Deprecate MediaType.APPLICATION_JSON_UTF8
This commit deprecates MediaType.APPLICATION_JSON_UTF8 and
MediaType.APPLICATION_PROBLEM_JSON_UTF8 in favor of
MediaType.APPLICATION_JSON and MediaType.APPLICATION_PROBLEM_JSON since
UTF-8 encoding is now handled correctly by most browsers
(related bug has been fixed in Chrome since September 2017).

MediaType.APPLICATION_JSON is now used as the default JSON content type.

Closes gh-22788
2019-04-30 16:11:50 +02:00
Sebastien Deleuze 2e6059f6b0 Add coroutines support to RSocket @MessageMapping
Closes gh-22780
2019-04-30 15:48:18 +02:00
Sam Brannen 3d0ec509ab Document mock JNDI support deprecation in the Reference Manual
See gh-22779
2019-04-11 16:46:50 +02:00
Sebastien Deleuze 849a848f23 Polishing 2019-04-10 00:32:20 +02:00
Sebastien Deleuze ff1f368751 Improve Kotlin documentation 2019-04-09 23:54:22 +02:00
Sebastien Deleuze cd0b517abf Improve Kotlin documentation 2019-04-09 12:28:00 +02:00
Juergen Hoeller 43cb1af26a Polishing 2019-04-08 15:33:26 +02:00
Sam Brannen 353e092bf6 Register EventPublishingTestExecutionListener by default (round 2)
This commit registers the EventPublishingTestExecutionListener as a
default TestExecutionListener with an order of 10,000. This registers
the EventPublishingTestExecutionListener as the last listener provided
by the Spring Framework.

With EventPublishingTestExecutionListener registered with an order of
10,000, it is effectively wrapped by all other Spring listeners,
including support for @DirtiesContext and test-managed transactions.

Furthermore, this commit revises the implementation of
EventPublishingTestExecutionListener to take advantage of the new
TestContext#hasApplicationContext() support which allows the
EventPublishingTestExecutionListener to publish events only if the
test's ApplicationContext is currently available. This avoids
undesirable side-effects such as eager loading of the
ApplicationContext before it is needed or re-loading of the
ApplicationContext after it has been intentionally closed.

Closes gh-18490
2019-04-06 16:39:26 +02:00
Tadaya Tsuyukubo dacda5859a Fix broken asciidoc heading 2019-04-06 11:02:45 +02:00
Sam Brannen f7a5b3013e Revert "Register EventPublishingTestExecutionListener by default"
This reverts commit 13543f5e0f.
2019-04-04 19:10:58 +02:00
Sam Brannen a5e297a161 Polishing 2019-04-04 18:41:57 +02:00
Juergen Hoeller 1741b6dcd9 Merge branch '5.1.x' 2019-04-04 16:12:07 +02:00
Juergen Hoeller 97b83a3e4a Revised documentation on constructor autowiring semantics
Closes gh-22735
2019-04-04 16:09:51 +02:00
Sam Brannen 13543f5e0f Register EventPublishingTestExecutionListener by default
Closes gh-18490
2019-04-03 18:31:16 +02:00
Sam Brannen d6173512fe Document test execution event support in the Reference Manual
Closes gh-18490
2019-04-03 18:18:39 +02:00
Stephane Nicoll 8714710170 Merge branch '5.1.x' 2019-04-01 14:02:23 +02:00
Stephane Nicoll de2a01eee4 Polish
Closes gh-22717
2019-04-01 14:01:41 +02:00
Juergen Hoeller 76e5a2a53b Remove superfluous empty lines 2019-03-30 00:26:58 +01:00
Juergen Hoeller 2e832c03ae Merge branch '5.1.x' 2019-03-30 00:25:10 +01:00
Juergen Hoeller c6619006eb Polishing 2019-03-30 00:20:32 +01:00