Polishing

This commit is contained in:
Juergen Hoeller
2017-03-21 17:44:47 +01:00
parent 85f64706a8
commit e892e02f41
19 changed files with 162 additions and 137 deletions

View File

@@ -41,10 +41,17 @@ public class BindingContext {
private final Model model = new BindingAwareConcurrentModel();
/**
* Create a new {@code BindingContext}.
*/
public BindingContext() {
this(null);
}
/**
* Create a new {@code BindingContext} with the given initializer.
* @param initializer the binding initializer to apply (may be {@code null})
*/
public BindingContext(WebBindingInitializer initializer) {
this.initializer = initializer;
}
@@ -61,11 +68,9 @@ public class BindingContext {
/**
* Create a {@link WebExchangeDataBinder} to apply data binding and
* validation with on the target, command object.
*
* @param exchange the current exchange
* @param target the object to create a data binder for
* @param name the name of the target object
*
* @return the created data binder
*/
public WebExchangeDataBinder createDataBinder(ServerWebExchange exchange, Object target, String name) {
@@ -86,10 +91,8 @@ public class BindingContext {
/**
* Create a {@link WebExchangeDataBinder} without a target object for type
* conversion of request values to simple types.
*
* @param exchange the current exchange
* @param name the name of the target object
*
* @return the created data binder
*/
public WebExchangeDataBinder createDataBinder(ServerWebExchange exchange, String name) {

View File

@@ -49,10 +49,10 @@ import reactor.core.publisher.Mono
* }
* ```
*
* @author Sebastien Deleuze
* @author Yevhenii Melnyk
* @since 5.0
* @see <a href="https://youtrack.jetbrains.com/issue/KT-15667">Kotlin issue about supporting ::foo for member functions</a>
* @author Sebastien De leuze
* @author Yevhenii Melnyk
*/
typealias Routes = RouterDsl.() -> Unit
@@ -177,7 +177,6 @@ class RouterDsl {
fun pathExtension(predicate: (String) -> Boolean) = RequestPredicates.pathExtension(predicate)
fun queryParam(name: String, predicate: (String) -> Boolean, f: (ServerRequest) -> Mono<ServerResponse>) {
routes += RouterFunctions.route(RequestPredicates.queryParam(name, predicate), HandlerFunction { f(it) })
}