Polishing
This commit is contained in:
parent
6a2939a4d4
commit
596936f18c
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2016 the original author or authors.
|
* Copyright 2002-2020 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -57,7 +57,7 @@ final class NumberToNumberConverterFactory implements ConverterFactory<Number, N
|
||||||
|
|
||||||
private final Class<T> targetType;
|
private final Class<T> targetType;
|
||||||
|
|
||||||
public NumberToNumber(Class<T> targetType) {
|
NumberToNumber(Class<T> targetType) {
|
||||||
this.targetType = targetType;
|
this.targetType = targetType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2017 the original author or authors.
|
* Copyright 2002-2020 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -39,7 +39,7 @@ final class StringToEnumConverterFactory implements ConverterFactory<String, Enu
|
||||||
|
|
||||||
private final Class<T> enumType;
|
private final Class<T> enumType;
|
||||||
|
|
||||||
public StringToEnum(Class<T> enumType) {
|
StringToEnum(Class<T> enumType) {
|
||||||
this.enumType = enumType;
|
this.enumType = enumType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2019 the original author or authors.
|
* Copyright 2002-2020 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.messaging.rsocket;
|
package org.springframework.messaging.rsocket;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -42,7 +43,7 @@ import org.springframework.util.MimeType;
|
||||||
/**
|
/**
|
||||||
* Default {@link MetadataExtractor} implementation that relies on
|
* Default {@link MetadataExtractor} implementation that relies on
|
||||||
* {@link Decoder}s to deserialize the content of metadata entries.
|
* {@link Decoder}s to deserialize the content of metadata entries.
|
||||||
* <p>By default only {@code "message/x.rsocket.routing.v0""} is extracted and
|
* <p>By default only {@code "message/x.rsocket.routing.v0"} is extracted and
|
||||||
* saved under {@link MetadataExtractor#ROUTE_KEY}. Use {@code metadataToExtract}
|
* saved under {@link MetadataExtractor#ROUTE_KEY}. Use {@code metadataToExtract}
|
||||||
* methods to specify other metadata mime types of interest to extract.
|
* methods to specify other metadata mime types of interest to extract.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||||
/**
|
/**
|
||||||
* Implementation of {@link RouterFunctions.Visitor} that changes the
|
* Implementation of {@link RouterFunctions.Visitor} that changes the
|
||||||
* {@link PathPatternParser} on path-related request predicates
|
* {@link PathPatternParser} on path-related request predicates
|
||||||
* (i.e. {@code RequestPredicates.PathPatternPredicate}.
|
* (i.e. {@link RequestPredicates.PathPatternPredicate}).
|
||||||
*
|
*
|
||||||
* @author Arjen Poutsma
|
* @author Arjen Poutsma
|
||||||
* @since 5.3
|
* @since 5.3
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2020 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -108,14 +108,14 @@ public interface WebSocketHandler {
|
||||||
* Invoked when a new WebSocket connection is established, and allows
|
* Invoked when a new WebSocket connection is established, and allows
|
||||||
* handling of the session.
|
* handling of the session.
|
||||||
*
|
*
|
||||||
* <p>See the class-level doc and the reference for more details and
|
* <p>See the class-level doc and the reference manual for more details and
|
||||||
* examples of how to handle the session.
|
* examples of how to handle the session.
|
||||||
*
|
*
|
||||||
* @param session the session to handle
|
* @param session the session to handle
|
||||||
* @return indicates when appilcation handling of the session is complete,
|
* @return indicates when application handling of the session is complete,
|
||||||
* which should reflect the completion of the inbound message stream
|
* which should reflect the completion of the inbound message stream
|
||||||
* (i.e. connection closing) and possibly the completion of the outbound
|
* (i.e. connection closing) and possibly the completion of the outbound
|
||||||
* message stream and the writing of messages.
|
* message stream and the writing of messages
|
||||||
*/
|
*/
|
||||||
Mono<Void> handle(WebSocketSession session);
|
Mono<Void> handle(WebSocketSession session);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2822,10 +2822,6 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
|
||||||
@Override
|
@Override
|
||||||
public View resolveViewName(final String viewName, Locale locale) throws Exception {
|
public View resolveViewName(final String viewName, Locale locale) throws Exception {
|
||||||
return new View() {
|
return new View() {
|
||||||
@Override
|
|
||||||
public String getContentType() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({"unchecked", "deprecation", "rawtypes"})
|
@SuppressWarnings({"unchecked", "deprecation", "rawtypes"})
|
||||||
public void render(@Nullable Map model, HttpServletRequest request, HttpServletResponse response)
|
public void render(@Nullable Map model, HttpServletRequest request, HttpServletResponse response)
|
||||||
|
|
@ -2867,17 +2863,10 @@ public class ServletAnnotationControllerHandlerMethodTests extends AbstractServl
|
||||||
public static class ModelExposingViewResolver implements ViewResolver {
|
public static class ModelExposingViewResolver implements ViewResolver {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View resolveViewName(final String viewName, Locale locale) throws Exception {
|
public View resolveViewName(String viewName, Locale locale) {
|
||||||
return new View() {
|
return (model, request, response) -> {
|
||||||
@Override
|
|
||||||
public String getContentType() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void render(@Nullable Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) {
|
|
||||||
request.setAttribute("viewName", viewName);
|
request.setAttribute("viewName", viewName);
|
||||||
request.getSession().setAttribute("model", model);
|
request.getSession().setAttribute("model", model);
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue