Commit Graph

18334 Commits

Author SHA1 Message Date
Sam Brannen
d6ba5259d8 Revert "Register EventPublishingTestExecutionListener by default"
This reverts commit 86fb7362b1.
2019-04-04 19:10:58 +02:00
Sam Brannen
a66e6d3231 Revert "Fix tests"
This reverts commit 65365d91c8.
2019-04-04 19:10:58 +02:00
Sam Brannen
f7a5b3013e Revert "Register EventPublishingTestExecutionListener by default"
This reverts commit 13543f5e0f.
2019-04-04 19:10:58 +02:00
Sebastien Deleuze
a8d6ba9965 Add support for Coroutines Flow
Flow is a Kotlin Coroutines related cold asynchronous
stream of the data, that emits from zero to N (where N
can be unbounded) values and completes normally or with
an exception.

It is conceptually the Coroutines equivalent of Flux with
an extension oriented API design, easy custom operator
capabilities and some suspending methods.

This commit leverages Flow <-> Flux interoperability
to support Flow on controller handler method parameters
or return values, and also adds Flow based extensions to
WebFlux.fn. It allows to reach a point when we can consider
Spring Framework officially supports Coroutines even if some
additional work remains to be done like adding
interoperability between Reactor and Coroutines contexts.

Flow is currently an experimental API that is expected to
become final before Spring Framework 5.2 GA.

Close gh-19975
2019-04-04 19:06:32 +02:00
Sam Brannen
a5e297a161 Polishing 2019-04-04 18:41:57 +02:00
Sam Brannen
df15b64e86 Document @Autowired support on parameters
Closes gh-21118
2019-04-04 18:31:04 +02:00
Sam Brannen
e1080f8b5f Polish Javadoc for @Autowired 2019-04-04 18:18:35 +02:00
Sam Brannen
3a9262ca1e Fix Javadoc warnings in Gradle build 2019-04-04 17:49:33 +02:00
Sam Brannen
c0b52d09f5 Require explicit path mappings for @RequestMapping methods
Prior to this commit, handler methods in Spring MVC controllers were
not required to provide explicit path mappings via @RequestMapping (or
any of its specializations such as @GetMapping). Such handler methods
were effectively mapped to all paths. Consequently, developers may have
unwittingly mapped all requests to a single handler method.

This commit addresses this by enforcing that @RequestMapping methods
are mapped to an explicit path. Note, however, that this is enforced
after type-level and method-level @RequestMapping information has been
merged.

Developers wishing to map to all paths should now add an explicit path
mapping to "/**" or "**".

Closes gh-22543
2019-04-04 17:33:59 +02:00
Sam Brannen
de69871354 Removed unused import 2019-04-04 17:13:08 +02:00
Sam Brannen
1a2e372186 Removed unused import 2019-04-04 16:56:03 +02:00
Juergen Hoeller
23b8f471dc Upgrade to Quartz 2.3.1 2019-04-04 16:43:40 +02:00
Juergen Hoeller
1741b6dcd9 Merge branch '5.1.x' 2019-04-04 16:12:07 +02:00
stsypanov
383f18e214 Use StringJoiner where possible to simplify String joining 2019-04-04 16:11:32 +02:00
Juergen Hoeller
95232d5bf8 Upgrade to Apache HttpClient 4.5.8 and Jetty Reactive HttpClient 1.0.3 2019-04-04 16:10:16 +02:00
Juergen Hoeller
97b83a3e4a Revised documentation on constructor autowiring semantics
Closes gh-22735
2019-04-04 16:09:51 +02:00
Sam Brannen
07e9f802f2 Fix tests
See gh-18490
2019-04-04 12:55:55 +02:00
Sam Brannen
86fb7362b1 Register EventPublishingTestExecutionListener by default
See gh-18490
2019-04-04 12:55:06 +02:00
Sebastien Deleuze
40e4c8068d Polishing 2019-04-04 12:16:18 +02:00
Sebastien Deleuze
9217f0b63e Convert CoRouterFunctionDsl indents to tabs 2019-04-04 12:14:27 +02:00
Sebastien Deleuze
2eb631aaad Avoid exposing (Co)RouterFunctionDsl#invoke
WebFlux.fn RouterFunctionDsl#invoke and CoRouterFunctionDsl#invoke
were wrongly exposed on public API and have never been designed to
be used by end users, but rather only invoked from router { } or
coRouter { } builders.

To fix that, avoiding this method being accessible from the DSL and
for the sake of consistency with WebMvc.fn RouterFunctionDsl,
Spring Framework 5.2 turns public fun invoke() method to
an internal fun build() one.

As a consequence RouterFunctionDsl and CoRouterFunctionDsl are not
open anymore, they are expected to be extended via Kotlin
extensions if needed.

Closes gh-22736
2019-04-04 12:14:27 +02:00
Sebastien Deleuze
e6171fb47d Add Kotlin router DSL and extensions for WebMvc.fn
Closes gh-22697
2019-04-04 12:14:27 +02:00
Sebastien Deleuze
92d5f6395e Rename awaitPrincipal to awaitPrincipalOrNull
See gh-19975
2019-04-04 12:14:27 +02:00
Arjen Poutsma
b3d3778269 Do not resolve DTDs in Stax Tests 2019-04-04 12:10:10 +02:00
Brian Clozel
65365d91c8 Fix tests
See gh-18490
2019-04-04 11:19:31 +02:00
Juergen Hoeller
52f90c303e Rename LogMessage.lazy(Supplier) to LogMessage.of(Supplier)
See gh-22726
2019-04-04 10:39:42 +02:00
Juergen Hoeller
9080ae24f9 First-class support for printf-style format strings in LogMessage
LogMessage is an abstract class now: with internal subclasses for Supplier bindings as well as printf-style format strings with a variable number of arguments (some fixed for efficiency, varargs array as fallback), created through corresponding static factory methods.

Closes gh-22726
2019-04-04 01:52:51 +02:00
Rossen Stoyanchev
5616eb2e8e Merge branch '5.1.x' 2019-04-03 19:38:21 -04:00
Rossen Stoyanchev
325fb5d97e Unwrap CompletionException in return value handler
See gh-22476
2019-04-03 19:37:13 -04:00
Rossen Stoyanchev
88a7a68a71 Revert to Californium-SR6 for M1 release 2019-04-03 19:25:34 -04:00
Rossen Stoyanchev
2c28e4e972 Merge branch '5.1.x' 2019-04-03 16:29:28 -04:00
Rossen Stoyanchev
b3bc2d9253 Remove workaround for reactor-core issue 2019-04-03 16:27:02 -04:00
Rossen Stoyanchev
1c5aa6a8d3 Merge changes for 22644 2019-04-03 14:56:39 -04:00
Rossen Stoyanchev
72119ac076 ProducesRequestCondition caches accepted media types
Closes gh-22644
2019-04-03 14:56:30 -04:00
Rossen Stoyanchev
254f06e1a1 Request attribute cache for resolved lookupPath
See gh-22644
2019-04-03 14:56:30 -04:00
Rossen Stoyanchev
bb9fcad58a RequestCondition implementations minor refactoring
Reduce object creation by pre-computing instances that can be re-used,
and eliminating collection copying and sorting where not needed.

See gh-22644
2019-04-03 14:56:30 -04:00
Juergen Hoeller
8f967129b9 Merge branch '5.1.x' 2019-04-03 19:05:42 +02:00
Sam Brannen
13543f5e0f Register EventPublishingTestExecutionListener by default
Closes gh-18490
2019-04-03 18:31:16 +02:00
Juergen Hoeller
0cc6a9ef11 Avoid getDeclaredMethod check in ReflectionUtils.isObjectMethod
Closes gh-22730
2019-04-03 18:21:26 +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
Sebastien Deleuze
a63d23492a Optimize Jackson2Tokenizer
See gh-22727
2019-04-03 18:02:27 +02:00
Sam Brannen
807828b2b7 Polish Javadoc for MergedAnnotation support
See gh-21697
2019-04-03 16:55:34 +02:00
Sam Brannen
a4279c5d00 Rename MergedAnnotations.SearchStrategy.SUPER_CLASS to SUPERCLASS
For consistency within the framework, this commit renames the SUPER_CLASS enum constant
to SUPERCLASS.

See gh-21697
2019-04-03 16:44:36 +02:00
Juergen Hoeller
d39e3cc0ba Merge branch '5.1.x' 2019-04-03 14:43:22 +02:00
Juergen Hoeller
9ea02c6dfa Revised javadoc 2019-04-03 14:34:11 +02:00
Juergen Hoeller
abbe61b9f8 Consistent internal use of getMergedLocalBeanDefinition 2019-04-03 14:33:57 +02:00
Juergen Hoeller
e0fe32af05 Detect factory method annotations in getBeanNamesForAnnotation and co
As of 5.2, ListableBeanFactory.findAnnotationOnBean and its retrieval companions getBeanNamesForAnnotation and getBeansWithAnnotation detect annotations on @Bean methods as well.

Closes gh-22541
2019-04-03 13:07:47 +02:00
Juergen Hoeller
dee88d931a Common constant for DefaultBeanNameGenerator as well
Closes gh-22591
2019-04-03 12:58:13 +02:00
Brian Clozel
47c8d1de7b Avoid calling other bean methods in web config
This commit changes the main configuration classes for Spring MVC and
Spring WebFlux to not call other bean methods when setting up the web
infrastructure. This allows configuration classes extending
`DelegatingWebFluxConfiguration` and `DelegatingWebMvcConfiguration`
to opt-in the lite-mode, as introduced in gh-22461.
2019-04-03 10:16:41 +02:00
Brian Clozel
83ce8ad79a Fix checkstyle 2019-04-03 10:16:11 +02:00