Commit Graph

1176 Commits

Author SHA1 Message Date
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
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
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