Polishing
This commit is contained in:
parent
4b01370f54
commit
87aaf5049b
|
@ -41,7 +41,7 @@ import org.springframework.util.ReflectionUtils;
|
|||
/**
|
||||
* A registry of adapters to adapt Reactive Streams {@link Publisher} to/from
|
||||
* various async/reactive types such as {@code CompletableFuture}, RxJava
|
||||
* {@code Observable}, and others.
|
||||
* {@code Flowable}, and others.
|
||||
*
|
||||
* <p>By default, depending on classpath availability, adapters are registered
|
||||
* for Reactor, RxJava 3, {@link CompletableFuture}, {@code Flow.Publisher},
|
||||
|
|
|
@ -56,8 +56,8 @@ public class MethodArgumentNotValidException extends BindException {
|
|||
@Override
|
||||
public String getMessage() {
|
||||
StringBuilder sb = new StringBuilder("Validation failed for argument [")
|
||||
.append(this.parameter.getParameterIndex()).append("] in ")
|
||||
.append(this.parameter.getExecutable().toGenericString());
|
||||
.append(this.parameter.getParameterIndex()).append("] in ")
|
||||
.append(this.parameter.getExecutable().toGenericString());
|
||||
BindingResult bindingResult = getBindingResult();
|
||||
if (bindingResult.getErrorCount() > 1) {
|
||||
sb.append(" with ").append(bindingResult.getErrorCount()).append(" errors");
|
||||
|
|
|
@ -157,12 +157,10 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
|
|||
*/
|
||||
@Override
|
||||
public void afterPropertiesSet() {
|
||||
|
||||
initHandlerMethods();
|
||||
|
||||
// Total includes detected mappings + explicit registrations via registerMapping..
|
||||
int total = this.getHandlerMethods().size();
|
||||
|
||||
// Total includes detected mappings + explicit registrations via registerMapping
|
||||
int total = getHandlerMethods().size();
|
||||
if ((logger.isTraceEnabled() && total == 0) || (logger.isDebugEnabled() && total > 0) ) {
|
||||
logger.debug(total + " mappings in " + formatMappingName());
|
||||
}
|
||||
|
|
|
@ -520,7 +520,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
|
|||
/**
|
||||
* Handle the case where an async request timed out.
|
||||
* <p>The default implementation sends an HTTP 503 error.
|
||||
* @param ex the {@link AsyncRequestTimeoutException }to be handled
|
||||
* @param ex the {@link AsyncRequestTimeoutException} to be handled
|
||||
* @param request current HTTP request
|
||||
* @param response current HTTP response
|
||||
* @param handler the executed handler, or {@code null} if none chosen
|
||||
|
|
Loading…
Reference in New Issue