提交 eeed20d8 编写于 作者: J Juergen Hoeller

Polishing

上级 c0b6488e
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -59,6 +59,7 @@ import static org.springframework.tests.TestResourceUtils.*;
* @since 02.10.2003
* @see PropertyPlaceholderConfigurerTests
*/
@SuppressWarnings("deprecation")
public class PropertyResourceConfigurerTests {
static {
......
......@@ -555,10 +555,10 @@ available to you:
==== Using `<property-placeholder/>`
This element activates the replacement of `${...}` placeholders, which are resolved against a
specified properties file (as a <<core.adoc#resources, Spring resource location>>). This element is
a convenience mechanism that sets up a <<core.adoc#beans-factory-placeholderconfigurer,
`PropertyPlaceholderConfigurer`>> for you. If you need more control over the
`PropertyPlaceholderConfigurer`, you can explicitly define one yourself.
specified properties file (as a <<core.adoc#resources, Spring resource location>>). This element
is a convenience mechanism that sets up a <<core.adoc#beans-factory-placeholderconfigurer,
`PropertySourcesPlaceholderConfigurer`>> for you. If you need more control over the specific
`PropertySourcesPlaceholderConfigurer` setup, you can explicitly define it as a bean yourself.
[[xsd-schemas-context-ac]]
......
......@@ -262,15 +262,16 @@ for more details and up-to-date information.
== Web
=== WebFlux Router DSL
Spring Framework comes with a Kotlin router DSL available in 2 flavors:
Spring Framework comes with a Kotlin router DSL available in two flavors:
- Reactive with {doc-root}/spring-framework/docs/{spring-version}/kdoc-api/spring-framework/org.springframework.web.reactive.function.server/-router-function-dsl/[router { }]
- <<Coroutines>>
These DSL let you use the <<web-reactive#webflux-fn,WebFlux functional API>> to write clean and idiomatic Kotlin code
to build a `RouterFunction` instance as the following example shows:
These DSL let you use the <<web-reactive#webflux-fn, WebFlux functional API>> to write clean
and idiomatic Kotlin code to build a `RouterFunction` instance as the following example shows:
[source,kotlin,indent=0]
----
......@@ -293,8 +294,8 @@ to build a `RouterFunction` instance as the following example shows:
----
NOTE: This DSL is programmatic, meaning that it allows custom registration logic of beans
through an `if` expression, a `for` loop, or any other Kotlin constructs. That can be useful when you need to register routes
depending on dynamic data (for example, from a database).
through an `if` expression, a `for` loop, or any other Kotlin constructs. That can be useful
when you need to register routes depending on dynamic data (for example, from a database).
See https://github.com/mixitconf/mixit/tree/dafd5ccc92dfab6d9c306fcb60b28921a1ccbf79/src/main/kotlin/mixit/web/routes[MiXiT project routes]
for a concrete example.
......@@ -308,8 +309,9 @@ is provided via extensions for WebFlux client and server functional API. A dedic
{doc-root}/spring-framework/docs/{spring-version}/kdoc-api/spring-framework/org.springframework.web.reactive.function.server/-co-router-function-dsl/[`coRouter { }`]
router DSL is also available.
Coroutines extensions use `await` prefix or `AndAwait` suffix, and most are using similar names to their Reactive
counterparts, except `exchange` in `WebClient.RequestHeadersSpec` which translates to `awaitResponse`.
Coroutines extensions use `await` prefix or `AndAwait` suffix, and most are using similar
names to their reactive counterparts, except `exchange` in `WebClient.RequestHeadersSpec`
which translates to `awaitResponse`.
[source,kotlin,indent=0]
----
......@@ -339,8 +341,8 @@ to understand how to run code concurrently with Coroutines.
=== MockMvc DSL
A Kotlin DSL is provided via `MockMvc` Kotlin extensions in order to provide a more idiomatic Kotlin API and to allow
better discoverability (no usage of static methods).
A Kotlin DSL is provided via `MockMvc` Kotlin extensions in order to provide a more
idiomatic Kotlin API and to allow better discoverability (no usage of static methods).
[source,kotlin,indent=0]
----
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册