Commit Graph

2251 Commits

Author SHA1 Message Date
Rossen Stoyanchev 445c0def0c Update docs on heartbeats with simple broker
Closes gh-27746
2021-11-29 17:13:57 +00:00
Brian Clozel fab9abd7fe Polish
Closes gh-1581
2021-11-25 19:21:08 +01:00
Stephane Nicoll ac46338fdb Merge branch '5.3.x' 2021-11-22 13:28:09 +01:00
julianladisch 1e0bdf95d0 Fix simple data format in appendix
See gh-1025
2021-11-22 13:26:57 +01:00
Rossen Stoyanchev dcc7154641 Polishing contribution
See gh-23432
2021-11-22 12:20:30 +00:00
Julien Eyraud d930617442 JDK HttpClient connector for WebClient
See gh-21014
2021-11-22 12:20:30 +00:00
Stephane Nicoll ab2b3d91fc Merge branch '5.3.x' 2021-11-22 12:55:56 +01:00
Thomas Darimont 767299c6dd Document @Bean definitions via default methods
See gh-767

Co-authored-by: Stephane Nicoll <snicoll@vmware.com>
2021-11-22 12:55:22 +01:00
Stephane Nicoll aa80c4873a Merge branch '5.3.x' 2021-11-22 10:31:27 +01:00
Yanming Zhou b4b3c2ead6 Fix typo
See gh-27699
2021-11-22 10:30:45 +01:00
Juergen Hoeller b88ed7f4bb Update API version and package references for Jakarta EE 9
Closes gh-27689
See gh-25354
2021-11-17 12:39:23 +01:00
xixingya 5593e1e406
Fix javax.servlet doc to jakarta.servlet (#27692) 2021-11-17 11:29:54 +01:00
Juergen Hoeller 75036fa0ad Merge branch '5.3.x' 2021-11-10 14:22:58 +01:00
Juergen Hoeller 2a268701c4 Introduce optimizeLocations flag for resource location filtering on startup
This flag is off by default since it requires jar files with directory entries.

Closes gh-27624
2021-11-10 14:21:48 +01:00
Juergen Hoeller 0e1ba7aae5 Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-context/src/main/java/org/springframework/context/annotation/Lazy.java
2021-11-09 22:39:58 +01:00
Juergen Hoeller 9bc09631d6 Recommend ObjectProvider as alternative to @Lazy for optional dependencies
Closes gh-27649
2021-11-09 22:29:56 +01:00
Sam Brannen 8de58f4f32 Merge branch '5.3.x' 2021-11-09 14:23:36 +01:00
Abdullah Khan 6ac780d595 Fix grammar in webflux-webclient.adoc
Closes gh-27657
2021-11-09 14:22:50 +01:00
Sam Brannen fe8518dcb2 Merge branch '5.3.x' 2021-10-19 16:46:25 +02:00
Sam Brannen 6fa6bfe421 Fix link to Spring Framework project page in Javadoc overview 2021-10-19 16:46:01 +02:00
Rossen Stoyanchev e3b48c23dd Remove AsyncRestTemplate and related types 2021-10-08 17:59:53 +01:00
Sam Brannen 359661df9d Merge branch '5.3.x' 2021-10-06 15:43:09 +02:00
Sam Brannen 5d3b16cd3a Indent with tabs instead of spaces 2021-10-06 15:42:52 +02:00
Sam Brannen 2c583517cb Change Eclipse project source/target/compliance to JDK 17
See gh-27407
2021-10-06 12:51:44 +02:00
Sam Brannen 2d1e0d5e38 Merge branch '5.3.x' 2021-10-06 12:13:21 +02:00
Sam Brannen 41ae9632d1 Upgrade to Checkstyle 9.0 and spring-javaformat 0.0.29
This commit upgrades the Gradle build to use Checkstyle 9.0 and
spring-javaformat 0.0.29 (which internally uses Checkstyle 8.45.1).

Closes gh-27520
2021-10-06 12:11:19 +02:00
Sam Brannen 545b1a33c6 Merge branch '5.3.x' 2021-10-01 14:39:15 +02:00
Sam Brannen 678fd8344e Polishing 2021-10-01 14:37:07 +02:00
Sam Brannen b452d1b41d Remove obsolete references to Ehcache 2.x from ref docs 2021-10-01 13:06:57 +02:00
Sam Brannen 543738ca58 Merge branch '5.3.x' 2021-10-01 12:52:25 +02:00
Sam Brannen fd11789db9 Polish JSR-107 caching ref docs 2021-10-01 12:51:52 +02:00
Jens Schauder d6ec6f0fe9 Remove remark about missing caching API. 2021-10-01 11:56:36 +02:00
Juergen Hoeller 4d7fa9a632 Merge branch '5.3.x'
# Conflicts:
#	spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java
2021-09-28 18:18:23 +02:00
Juergen Hoeller 2feedb98cc Remove lineSeparator LF requirement (accept LF/CR/CRLF by default)
See gh-27481
2021-09-28 18:15:00 +02:00
Sam Brannen 16bf39ea1b Merge branch '5.3.x' 2021-09-28 10:35:18 +02:00
Sam Brannen 2567b20949 Upgrade to spring-javaformat 0.0.28 and downgrade to Checkstyle 8.41
In order to be able to use text blocks and other new Java language
features, we are upgrading to a recent version of Checkstyle.

The latest version of spring-javaformat-checkstyle (0.0.28) is built
against Checkstyle 8.32 which does not include support for language
features such as text blocks. Support for text blocks was added in
Checkstyle 8.36.

In addition, there is a binary compatibility issue between
spring-javaformat-checkstyle 0.0.28 and Checkstyle 8.42. Thus we cannot
use Checkstyle 8.42 or higher.

In this commit, we therefore upgrade to spring-javaformat-checkstyle
0.0.28 and downgrade to Checkstyle 8.41.

This change is being applied to `5.3.x` as well as `main` in order to
benefit from the enhanced checking provided in more recent versions of
Checkstyle.

Closes gh-27481
2021-09-28 10:29:31 +02:00
Juergen Hoeller b0c424b376 Deprecate RxJava 2 in favor of RxJava 3
Closes gh-27474
2021-09-27 16:56:28 +02:00
Juergen Hoeller e6112344d2 Remove support for RxJava 2.x as well
Includes realignment of Reactor adapter registration.

Closes gh-27443
2021-09-27 13:01:32 +02:00
Rossen Stoyanchev 693ab84347 Merge branch '5.3.x' into main 2021-09-24 15:59:26 +01:00
Rossen Stoyanchev 93f8706dd3 Update docs for ControllerAdvice
In 5.3 it became possible to handle exceptions from any handler through
ExceptionHandler's in a ControllerAdvice class, but this is not
mentioned in the docs

See gh-22619, gh-27338
2021-09-24 15:57:15 +01:00
Sam Brannen d6570fa2ac Merge branch '5.3.x' 2021-09-21 12:39:38 +02:00
Sam Brannen b0dceb484a Remove Eclipse Web Tools Platform (WTP) configuration
Since the team no longer needs the ability to treat Eclipse projects as
WTP modules, this commit removes the obsolete custom WTP configuration
for importing projects into Eclipse IDE.

See gh-27407
2021-09-21 12:37:51 +02:00
Sam Brannen e0a4b05142 Merge branch '5.3.x' 2021-09-16 14:11:44 +02:00
Sam Brannen 008aa48d5c Fix formatting for SQL `IN` clause example in ref docs
See gh-27388
2021-09-16 14:10:54 +02:00
Sam Brannen 350d3e8b22 Update @since tag in code template to 6.0 2021-09-15 14:24:14 +02:00
Sam Brannen 4322ee1944 Polish Eclipse IDE support 2021-09-14 21:42:00 +02:00
Sam Brannen 813dbbce58 Polish contribution
See gh-27388
2021-09-14 15:06:37 +02:00
Dmitriy Bogdanov c46cc666d6 Fix some typos and mistakes in ref docs
Closes gh-27388
2021-09-14 15:06:19 +02:00
Radek Crlik 78dd219787 Fix misplaced comma in AOP doc
See gh-27387
2021-09-12 08:52:07 +02:00
Grant Fleming 8f33450df2
Fix typo in core-beans.adoc
Closes gh-27377
2021-09-09 13:26:44 +02:00
Rossen Stoyanchev a3655c4858 Add tip related to user destinations in STOMP
See gh-26986
2021-09-07 16:33:54 +01:00
Manish 9cf8cca96d Minor language corrections. 2021-09-06 09:57:35 +01:00
Sam Brannen 310bdbb1b2 Fix error in ApplicationEvents example 2021-09-01 10:34:16 +02:00
Georgi Ushev e5a5f8b20b
Remove unnecessary brace in websocket documenation
Closes gh-#27339
2021-08-31 09:37:29 +02:00
Steve Wei b120e0b8f4
Fix Kotlin example for filtering handler functions
Closes gh-#27337
2021-08-30 16:47:31 +02:00
Sam Brannen bd72e4498b Revise and document TimeUnit support in @Scheduled
This commit also fixes a bug introduced in commit e99b43b91e, where
java.time.Duration strings were converted to milliseconds and then
converted again using the configured TimeUnit.

See gh-27309
2021-08-25 20:55:55 +02:00
Sam Brannen 3c2dfebf4e Polish soft assertion support for WebTestClient
See gh-26969
2021-08-23 19:09:34 +02:00
Sam Brannen dd9b99e13d Introduce ResultActions.andExpectAll() for soft assertions in MockMvc
Closes gh-26917
2021-08-23 15:27:07 +02:00
Sam Brannen 7da7a976e6 Document when prepareTestInstance() is invoked by the SpringMethodRule
Closes gh-27305
2021-08-22 15:56:58 +02:00
Sam Brannen 161c9dc3bd Improve @Cacheable documentation regarding java.util.Optional
This commit improves the documentation for @Cacheable to point out that
`null` will be stored in the cache for an empty `Optional` return value.

Closes gh-27184
2021-07-27 15:05:43 +02:00
Sam Brannen 9c0825629b Reintroduce left-hand side navigation in ref docs
A side effect of 71995a9087 caused the
dynamic table of contents in the left-hand side navigation to no longer
be displayed, likely due to the missing "details" DIV.

This commit addresses this issue by applying the custom header only to
index.adoc.

Consequently, the TOC is now displayed again on all pages except the
index page, but the customized header is no longer applied to those
pages.

We may revisit this issue if we decide that we want the custom header
on all pages (and not just the index page).

Closes gh-27177
2021-07-17 17:53:43 +03:00
Sam Brannen e0c0e7f878 Fix typo in ref docs 2021-07-17 17:03:51 +03:00
Arjen Poutsma bf2790498b Document ResourceBundle limitations
This commit adds a note to the documentation saying that ResourceBundle
does not support multiple bundles with the same base name.

Closes gh-27038
2021-07-13 13:45:03 +02:00
Rossen Stoyanchev 95d7f883ae Deprecate LastModified
See gh-27075
2021-07-13 12:11:20 +01:00
Juergen Hoeller 1ff8da3635 StandardServletMultipartResolver provides strict Servlet compliance option
Closes gh-26826
2021-07-12 23:18:54 +02:00
Sviatoslav Hryb f3f0bd22c5 Fix content negotiation description 2021-07-12 15:23:35 +01:00
Stephane Nicoll 98685e8be7 Fix link to Javadoc API
See gh-27151
2021-07-11 09:09:46 +02:00
Hubert Wo e719bc2cda Fix link to Javadoc API
See gh-27151
2021-07-11 09:05:20 +02:00
Rossen Stoyanchev 39442143b7 Fix and improve docs on {*var} pattern
Closes gh-27132
2021-07-09 20:09:06 +01:00
devorio 6427a4b5c0 Fix typo in core-beans.adoc
See gh-27113
2021-06-30 20:27:55 +02:00
Sam Brannen 3214786757 Define global Asciidoc attributes once
This commit defines the doc-root and api-spring-framework attributes
once in docs.gradle instead of duplicating them in each *.adoc file.

This commit also introduces a new docs-spring-framework global
attribute.
2021-06-22 18:39:33 +02:00
Rossen Stoyanchev eb964542b4 Add doc-root to index.adoc
See gh-27015
2021-06-21 18:09:53 +01:00
Sam Brannen 71995a9087 Introduce custom header for HTML5 ref docs
This commit disables the automatic header generation from Asciidoc's
default template and replaces it with a custom header that omits the
"Version" label before the revision number. The revision number is also
displayed in a simple span tag in order to reduce the amount of
vertical space taken by the header.
2021-06-21 17:52:18 +02:00
Rossen Stoyanchev f9bcb99040 Minor layout refactoring of index asciidoc page
Closes gh-27015
2021-06-21 16:19:17 +01:00
Jay Bryant 791134c53c Link the HTML to the PDF docs and vice-versa
See gh-27015
2021-06-21 16:19:08 +01:00
Brian Clozel c7c35aff42 Fix missing attribute in reference documentation
This commit adds the missing `spring-framework-main-code` asciidoctor
attribute in the reference documentation.

Fixes gh-27041
2021-06-09 09:21:28 +02:00
Sébastien Deleuze 5420d7113b Polish Kotlin reference documentation 2021-06-08 11:44:03 +02:00
Sébastien Deleuze 6251222a23 Remove jackson-module-kotlin warning
Closes gh-26962
2021-06-08 11:44:03 +02:00
jbotuck 491d1c4c78 issue-26994 add missing ) to kotlin example 2021-06-02 12:51:37 +01:00
Sam Brannen da9ee06e05 Improve @Transactional docs regarding method visibility
Closes gh-27003
2021-05-30 17:10:01 +02:00
Sviatoslav Hryb 4c28266eb6
Fix @Transactional docs regarding method visibility
Closes gh-27001
2021-05-30 13:48:31 +02:00
hunjipo f45a852aca Fix typo in code example
See gh-26980
2021-05-27 08:37:44 +02:00
Johnny Lim a2e5d9a14f
Polishing
Closes gh-26960
2021-05-20 15:49:13 +02:00
Qimiao Chen cab20d1202
Fix punctuation in Custom Cache Resolution section of ref docs
Closes gh-26938
2021-05-13 15:30:58 +02:00
Rossen Stoyanchev 29790d5bb1 Update docs on how a `@ModelAttribute` is sourced
Closes gh-26873
2021-05-10 07:19:17 +01:00
Sviatoslav Hryb 3b247a9c19
Fix MethodMatcher API doc description
Closes gh-26893
2021-05-05 12:21:46 +02:00
Brian Clozel 85eb589c2e Fix Gradle Java Toolchain configuration
This commit fixes various issues with the configuration of the Gradle
Java toolchain in the build.

First, the configuration of build properties is fixed in the CI pipeline
because it wasn't properly checked.
The JMH plugin is also upgraded and we now configure its toolchain
support.
This commit also rewrites the XJC tasks in the spring-oxm module,
leveraging a Gradle plugin that creates actual compile tasks we can
configure.

See gh-25787
2021-05-03 15:02:09 +02:00
Sviatoslav Hryb ae7d5200e5
Fix @Scope documentation in ref docs
Closes gh-26773
2021-04-29 18:08:54 +02:00
K 26ed6d8bce
Fix syntax for RequestEntity headers example in ref docs
Closes gh-26876
2021-04-29 17:34:04 +02:00
Sam Brannen 8456eaca8e Polish SpEL selection/projection in ref docs 2021-04-28 15:54:39 +02:00
Sviatoslav Hryb 59015344a7
Fix SpEL selection description in ref docs
Closes gh-26852
2021-04-28 15:47:16 +02:00
Sam Brannen c03162e616 Polishing
See gh-26862
2021-04-28 15:43:52 +02:00
Sam Brannen 1dde30a7fd Fix grammar in ref docs 2021-04-28 15:39:21 +02:00
Sviatoslav Hryb 35196d3c62
Fix aspect autodetection description
Closes gh-26862
2021-04-28 15:37:59 +02:00
Sviatoslav Hryb 719e7394d6 Fix MessageSource doc description 2021-04-28 11:04:01 +01:00
Stephane Nicoll e4a5d2aaa5 Fix reference to assets on the default branch in ref doc
See gh-26863
2021-04-27 07:18:23 +02:00
Rossen Stoyanchev b595dc1dfa Add advice on Spring MVC path matching for 5.3+
Closes gh-26750
2021-04-26 17:17:14 +01:00
Sam Brannen 01e50fb60a Polish SpEL chapter 2021-04-22 18:55:40 +02:00
Sviatoslav Hryb 3bded7659a
Improve documentation for SpEL constructor support
Closes gh-26846
2021-04-22 18:33:37 +02:00
Rossen Stoyanchev d275a4e28d Asciidoc typo from previous commits 2021-04-21 17:37:06 +01:00
Rossen Stoyanchev 42a23098de Update docs on Principal controller method arguments
Closes gh-26791
2021-04-21 17:28:14 +01:00
Rossen Stoyanchev d25ae4b02c Add advice on using exchange from an ExchangeFilterFunction
Closes gh-26819
2021-04-21 17:04:10 +01:00
Sam Brannen 5740eaf33e Polishing 2021-04-21 14:15:27 +02:00
Sviatoslav Hryb 80d46ba80e
Update FactoryBean generic description in ref docs
Closes gh-26758
2021-04-21 14:06:43 +02:00
Sviatoslav Hryb b153b5e53b
Fix Kotlin code formatting for Inline Maps section of ref docs
Closes gh-26836
2021-04-21 11:13:00 +02:00
Sviatoslav Hryb e03fdeaf8b
Improve ref docs regarding @Bean method visibility constraints
Closes gh-26797
2021-04-20 19:08:27 +02:00
Sviatoslav Hryb 0286549466
Fix formatting for PersonValidator Kotlin example in ref docs
Closes gh-26832
2021-04-20 18:59:50 +02:00
Sam Brannen 5d297c6387 Polishing 2021-04-16 11:44:48 +02:00
Sviatoslav Hryb 320f5836b4
Fix LocaleEditor description & formatting in reference manual
Closes gh-26816
2021-04-16 11:39:45 +02:00
Sviatoslav Hryb af06b80bdf
Update FormatterRegistry interface in reference manual
Closes gh-26812
2021-04-15 18:45:13 +02:00
Sam Brannen 5b1ab31559 Polishing 2021-04-15 11:17:04 +02:00
Sviatoslav Hryb bf05da1f8c Remove unnecessary semicolon in BeanInfo example
Closes gh-26806
2021-04-15 11:10:15 +02:00
Juergen Hoeller c7989c78c8 Polishing 2021-04-13 12:26:31 +02:00
Sam Brannen bcc6171a72 Polish contribution
See gh-26785
2021-04-13 11:21:56 +02:00
Sviatoslav Hryb a80c5fcfaf Improve @EventListener documentation in reference manual
Closes gh-26785
2021-04-13 11:17:09 +02:00
Sviatoslav Hryb f7606ba51b
Update ref docs regarding RequiredAnnotationBPP registration
The RequiredAnnotationBeanPostProcessor is no longer automatically
registered via XML namespace elements.

Closes gh-26783
2021-04-09 16:59:48 +02:00
Sam Brannen 0f54585f05 Polish contribution
See gh-26782
2021-04-09 16:54:49 +02:00
Sviatoslav Hryb 35ea33e13a
Update documentation for <context:annotation-config/>
Closes gh-26782
2021-04-09 16:32:17 +02:00
nara 2dc203ffdc Polish web docs example 2021-03-29 11:40:56 +01:00
Rossen Stoyanchev 4982b5fcb9 Improve docs on SSE tests for Spring MVC
Closes gh-26687
2021-03-16 17:55:43 +00:00
Sam Brannen f7678cdcdd Polish core-beans.adoc 2021-03-16 13:09:36 +01:00
Stephane Nicoll a3451f9908 Polish "Fix Commons FileUpload URL in reference guide"
See gh-26678
2021-03-15 08:45:51 +01:00
heqiang 5c38b89f4e Fix Commons FileUpload URL in reference guide
See gh-26678
2021-03-15 08:44:48 +01:00
Oleksandr Kravchuk 21d77dd7c7 Fixed typo in ref docs 2021-03-05 14:07:23 +00:00
Oleksandr Kravchuk 0087578469
Fix @EventListener example in reference manual
Closes gh-26622
2021-03-01 20:22:58 +01:00
Sam Brannen a9240e0bac Document all supported SpringProperties keys in the reference manual
Closes gh-26554
2021-02-24 17:18:04 +01:00
Sam Brannen f7cef2ab20 Remove section on RequiredAnnotationBeanPostProcessor in ref docs
In order to reduce the focus on the deprecated @Required support, this
commit removes the RequiredAnnotationBeanPostProcessor section and
replaces it with a TIP and an updated NOTE.

See gh-26578
2021-02-23 16:21:07 +01:00
Sam Brannen 6d2fec383b Reduce focus on RequiredAnnotationBeanPostProcessor in ref docs
See gh-26578
2021-02-22 18:41:50 +01:00
Oleksandr Kravchuk 90ee22f2af Update reference manual regarding deprecated @Required annotation
Closes gh-26578
2021-02-22 17:54:53 +01:00
Sam Brannen 87761397b0 Document @Value support for Resource/Resource[] injection in ref docs
See gh-26447
2021-02-17 12:55:53 +01:00
Sam Brannen ac58614be8 Polish Resources section of the reference manual
See gh-26447
2021-02-16 18:56:29 +01:00
Sam Brannen efc335e198 Remove remaining Kotlin "translations" of Java APIs in the reference manual 2021-02-16 11:16:14 +01:00
Sam Brannen 1e57e572dd Link to all built-in `Resource` implementations
See gh-26447
2021-02-16 10:29:41 +01:00
Sam Brannen 829000d511 Remove Kotlin "translations" of Java APIs in the reference manual
See gh-26447
2021-02-16 10:24:24 +01:00
Sam Brannen a315abfd32 Polish ResourcePatternResolver docuementation in the reference manual
See gh-26447
2021-02-16 10:18:13 +01:00
Sam Brannen 36d133ce53 Escape URLs in literals in reference manual
This prevents the URLs from being rendered as clickable links in the
generated HTML.
2021-02-16 09:59:44 +01:00
Juergen Hoeller ed9ec58caa Document ASM version as 9.1 in license file 2021-02-16 00:18:14 +01:00
Sam Brannen 6b705443a6 Document ResourcePatternResolver in the reference manual
Closes gh-26447
2021-02-15 22:09:33 +01:00
Sam Brannen c26087e848 Document PathResource as a built-in Resource in the reference manual
See gh-26447
2021-02-15 21:04:37 +01:00
Sam Brannen 7225238ad5 Update Resource interface in the reference manual
See gh-26447
2021-02-15 20:40:40 +01:00
Sam Brannen ff43731347 Polish Resources section of the reference manual
See gh-26447
2021-02-15 20:20:21 +01:00
Taemin Shin 29fb3f27be
Fix typo in @Configurable example in reference manual
Closes gh-26551
2021-02-15 19:40:45 +01:00
Sam Brannen 566ff54782 Polishing
See gh-26540
2021-02-12 11:29:00 +01:00
Oleksandr Kravchuk 77b7e49fb2 Update ref docs for Inner class names
This commit updates the reference manual to point out that one may use
`.` instead of `$` as the nested class separator when providing a fully
qualified class name for a nested class in XML configuration.

This commit also updates the test for ClassUtils#forName to assert
support for `.` instead of `$`.

Closes gh-26540
2021-02-12 10:54:55 +01:00
Rossen Stoyanchev 8791928f61 Update variable detection in UriComponentsBuilder#encode
This commit better aligns how URI variable placeholders are detected
in UriComponentsBuilder#encode (i.e. the pre-encoding of the literal
parts of a URI template) and how they are expanded later on.
The latter relies on a pattern that stops at the first closing '}'
which excludes the possibility for well-formed, nested placeholders
other than variables with regex syntax, e.g. "{year:\d{1,4}}".

UriComponentsBuilder#encode now also stops at the first closing '}' and
further ensures the placeholder is not empty and that it has '{' before
deciding to treat it as a URI variable.

Closes gh-26466
2021-02-11 08:34:06 +00:00
Rossen Stoyanchev c9147c4281 Add RSocket to "Web Reactive" subtext
Closes gh-26534
2021-02-11 08:31:20 +00:00
Sam Brannen c36b80bd75 Update copyright date in reference manual 2021-02-10 17:56:22 +01:00
Sam Brannen 59818ceca9 Fix StoredProcedure documentation in reference manual
This commit aligns the documentation in the reference manual with the
actual source code for StoredProcedure with regard to public execute()
methods.

Closes gh-26505
2021-02-04 11:10:50 +01:00
Sam Brannen c649b74235 Use api-spring-framework attribute for links to SpringProperties
See gh-26492
2021-02-02 14:01:51 +01:00
Sam Brannen bef5d59e43 Link to SpringProperties Javadoc from the Testing chapter
Closes gh-26492
2021-02-02 13:48:11 +01:00
Sam Brannen c5284009a1 Fix UriComponentsBuilder examples in ref docs
Closes gh-26453
2021-01-27 15:16:15 +01:00
daisuzz d96448fde9
Fix typo in URI Encoding section of reference docs
Closes gh-26436
2021-01-24 14:38:33 +01:00
Arjen Poutsma d80b08084e Document ordering of RouterFunction beans
Closes gh-26283
2021-01-14 16:18:22 +01:00
Rossen Stoyanchev a7413ea76b Add recommendation for original multipart filename
See gh-26299
2021-01-12 17:28:44 +00:00
Rossen Stoyanchev c3c36ab498 Document choices for async ResponseEntity return values
Closes gh-22614
2021-01-12 14:37:01 +00:00
Juergen Hoeller be5eb7037f Explicit notes on non-null enforcement and deep cause support in 5.3
Closes gh-26296
See gh-26317
2021-01-11 19:04:12 +01:00
Sam Brannen fff2291f2a Document context lifecycle & logging semantics for the TestContext framework
This commit documents ApplicationContext initialization and shutdown
logging semantics for console output triggered in conjunction with the
Spring TestContext Framework.

Closes gh-25385
2021-01-11 17:48:33 +01:00
Rossen Stoyanchev d50375da8e Add more static imports to MockMvc snippets
Closes gh-26311
2021-01-06 21:56:14 +00:00
diguage eab61f692f Merge source and substitution configuration in reference docs
Closes gh-25545
2020-12-28 20:49:36 +01:00
Sam Brannen 1565f4b83e Introduce ApplicationEvents to assert events published during tests
This commit introduces a new feature in the Spring TestContext
Framework (TCF) that provides support for recording application events
published in the ApplicationContext so that assertions can be performed
against those events within tests. All events published during the
execution of a single test are made available via the ApplicationEvents
API which allows one to process the events as a java.util.Stream.

The following example demonstrates usage of this new feature.

@SpringJUnitConfig(/* ... */)
@RecordApplicationEvents
class OrderServiceTests {

    @Autowired
    OrderService orderService;

    @Autowired
    ApplicationEvents events;

    @Test
    void submitOrder() {
        // Invoke method in OrderService that publishes an event
        orderService.submitOrder(new Order(/* ... */));
        // Verify that an OrderSubmitted event was published
        int numEvents = events.stream(OrderSubmitted.class).count();
        assertThat(numEvents).isEqualTo(1);
    }
}

To enable the feature, a test class must be annotated or meta-annotated
with @RecordApplicationEvents. Behind the scenes, a new
ApplicationEventsTestExecutionListener manages the registration of
ApplicationEvents for the current thread at various points within the
test execution lifecycle and makes the current instance of
ApplicationEvents available to tests via an @Autowired field in the
test class. The latter is made possible by a custom ObjectFactory that
is registered as a "resolvable dependency". Thanks to the magic of
ObjectFactoryDelegatingInvocationHandler in the spring-beans module,
the ApplicationEvents instance injected into test classes is
effectively a scoped-proxy that always accesses the ApplicationEvents
managed for the current test.

The current ApplicationEvents instance is stored in a ThreadLocal
variable which is made available in the ApplicationEventsHolder.
Although this class is public, it is only intended for use within the
TCF or in the implementation of third-party extensions.

ApplicationEventsApplicationListener is responsible for listening to
all application events and recording them in the current
ApplicationEvents instance. A single
ApplicationEventsApplicationListener is registered with the test's
ApplicationContext by the ApplicationEventsTestExecutionListener.

The SpringExtension has also been updated to support parameters of type
ApplicationEvents via the JUnit Jupiter ParameterResolver extension
API. This allows JUnit Jupiter based tests to receive access to the
current ApplicationEvents via test and lifecycle method parameters as
an alternative to @Autowired fields in the test class.

Closes gh-25616
2020-12-20 23:46:19 +01:00
Sam Brannen 65a395ef0e Fix syntax in Kotlin example 2020-12-19 15:29:40 +01:00
Juergen Hoeller 834032df1f Clarify intended advice execution behavior (includes related polishing)
Closes gh-26202
2020-12-07 22:06:22 +01:00
Brian Clozel 4337d8465c Remove spring.event.invoke-listener startup event
Prior to this commit, the `SimpleApplicationEventMulticaster` would be
instrumented with the `ApplicationStartup` and start/stop events for
invoking event listeners (`spring.event.invoke-listener`).

This feature was already limited to single-threaded event publishers,
but is still flawed since several types of events can happen
concurrently. Due to the single-threaded nature of the startup sequence,
our implementation should not produce startup events concurrently.

This can cause issues like gh-26057, where concurrent events lead to
inconcistencies when tracking parent/child relationships.

This commit removes the `spring.event.invoke-listener` startup event as
a result.

Fixes gh-26057
2020-12-03 15:40:31 +01:00
Arjen Poutsma a1320cd450 Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.

Closes gh-25920
2020-12-02 15:14:47 +01:00
Rossen Stoyanchev 1e19e51c9c Fix exchangeToMono sample in reference
Closes gh-26189
2020-12-01 17:46:12 +00:00
Sébastien Deleuze 43faa439ab Refine kotlinx.serialization support
This commit introduces the following changes:
 - Converters/codecs are now used based on generic type info.
 - On WebMvc and WebFlux, kotlinx.serialization is enabled along
   to Jackson because it only serializes Kotlin @Serializable classes
   which is not enough for error or actuator endpoints in Boot as
   described on spring-projects/spring-boot#24238.

TODO: leverage Kotlin/kotlinx.serialization#1164 when fixed.

Closes gh-26147
2020-11-26 12:36:35 +01:00
Rossen Stoyanchev 23006d417b Deprecate context method in WebClient
See gh-25710
2020-11-23 21:46:14 +00:00
Sam Brannen 4ed645e710 Fix broken links to XSD schemas in ref docs
Closes gh-26129
2020-11-23 14:49:43 +01:00
Brian Clozel de0b5bc5a1 Polish Kotlin code snippet in reference docs 2020-11-17 15:21:10 +01:00
Juergen Hoeller 2ee231dee2 Document that @Transactional does not propagate to new threads
Closes gh-25439
2020-11-17 14:43:17 +01:00
Juergen Hoeller b56dbd2aa8 Explicitly mention Jakarta Mail 1.6 next to JavaMail
See gh-25855
2020-11-17 14:42:41 +01:00
thanus 9139cb85bd Update javax.mail reference to jakarta.mail 2020-11-17 11:49:01 +01:00
Juergen Hoeller bc5a10c70d Document that Hibernate Search 5.11.6 is required for Spring JPA compatibility
Closes gh-26090
2020-11-16 19:51:50 +01:00
Rossen Stoyanchev c22a483c3d Update section on type conversion for web method arguments
Closes gh-26088
2020-11-16 17:01:57 +00:00
Sam Brannen 0819a9fcc9 Discover @DynamicPropertySource methods on enclosing test classes
gh-19930 introduced support for finding class-level test configuration
annotations on enclosing classes when using JUnit Jupiter @Nested test
classes, but support for @DynamicPropertySource methods got overlooked
since they are method-level annotations.

This commit addresses this shortcoming by introducing full support for
@NestedTestConfiguration semantics for @DynamicPropertySource methods
on enclosing classes.

Closes gh-26091
2020-11-15 20:59:15 +01:00
Arjen Poutsma 5338d8b5e9 Add cron expression documentation
This commit adds a section about the cron expression format supported by
 Spring.

Closes gh-26067
2020-11-12 15:57:14 +01:00
Rossen Stoyanchev 79f79e9306 WebClient method to populate the Reactor Context
The alternative is to use a filter but this makes it a little easier
and also guarantees that it will be downstream from all filters
regardless of their order, and therefore the Context will be visible
to all of them.

Closes gh-25710
2020-11-09 22:07:31 +00:00
Rüdiger Schulz 2214ff8ce0 Fix Kotlin example code which does not compile
This kotlin code does not compile:
Overload resolution ambiguity. All these functions match.
default <R> RowsFetchSpec<R> map(Function<Row, R> mappingFunction)
<R> RowsFetchSpec<R> map(BiFunction<Row, RowMetadata, R> mappingFunction);

Closes gh-26016
2020-11-08 15:43:30 +01:00
izeye b89b37729c Fix a broken Asciidoctor syntax in core-resources.adoc
See gh-25999
2020-10-30 09:32:42 +01:00
Aakarshit Uppal 44239b2d7b Remove rogue semicolon 2020-10-29 12:32:20 +00:00
Sam Brannen 9c2fd0bd05 Document @DynamicPropertySource use cases that require @DirtiesContext
Closes gh-25850
2020-10-27 14:26:40 +01:00
Sébastien Deleuze b2d337c527 Fix Coroutines minimal version in the refdoc
See gh-25969
2020-10-27 12:48:29 +01:00
Sam Brannen b01adadf60 Improve documentation for SpEL property reference syntax
See gh-25538
2020-10-27 11:48:44 +01:00
Yanming Zhou 9c11887fe8 Use lowercase property names in SpEL examples
Closes gh-25538
2020-10-27 11:48:44 +01:00
Sébastien Deleuze 3f01af6f7c Add kotlinx.serialization JSON support to Spring Messaging
Closes gh-25883
2020-10-26 20:10:54 +01:00
Juergen Hoeller d7f1813cd7 R2DBC and Hibernate documentation revision
Closes gh-25860
Closes gh-25533
2020-10-26 17:33:00 +01:00
Rossen Stoyanchev 1676470729 Merge branch '5.2.x' into master 2020-10-26 07:49:51 +00:00
Rossen Stoyanchev 4726663f81 Correct Javadoc link core-resources.adoc
Closes gh-25970
2020-10-26 07:43:30 +00:00
Rossen Stoyanchev 86af93a504 Correct sample in webmvc.adoc
Closes gh-25965
2020-10-26 07:40:33 +00:00
Sam Brannen b8b854db8c Discover @Sql annotations on enclosing class for nested test class
This commit introduces support for discovering @Sql, @SqlGroup,
@SqlConfig, and @SqlMergeMode on enclosing classes for @Nested test
classes in JUnit Jupiter.

Closes gh-25913
2020-10-22 17:08:10 +02:00
Jupiter 43f595f80e Wording changes. Fixed typo 'CorsConfiguraiton' 2020-10-19 14:17:23 +01:00
Rossen Stoyanchev d18fbab7a8 Heartbeat in lieu of non-broker destination message
Closes gh-22822
2020-10-19 13:06:30 +01:00
Rossen Stoyanchev a2ff139edd Resolve UriComponentsBuilder argument with contextPath
Closes gh-25822
2020-10-15 22:08:32 +01:00
Sam Brannen b79548d12e Add notes regarding enclosing test configuration inheritance
See gh-25912
2020-10-15 16:23:29 +02:00
Sam Brannen f9e11593a6 Document @NestedTestConfiguration support in reference manual
See gh-25912
2020-10-15 16:04:59 +02:00
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