Merge branch '5.3.x'
# Conflicts: # build.gradle # spring-webflux/src/test/java/org/springframework/web/reactive/result/view/script/ScriptTemplateViewTests.java # spring-webmvc/src/main/java/org/springframework/web/servlet/view/script/ScriptTemplateView.java # spring-webmvc/src/test/java/org/springframework/web/servlet/view/script/ScriptTemplateViewTests.java
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 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.
|
||||
@@ -448,7 +448,7 @@ public class MvcUriComponentsBuilder {
|
||||
*/
|
||||
public static MethodArgumentBuilder fromMappingName(@Nullable UriComponentsBuilder builder, String name) {
|
||||
WebApplicationContext wac = getWebApplicationContext();
|
||||
Assert.notNull(wac, "No WebApplicationContext. ");
|
||||
Assert.notNull(wac, "No WebApplicationContext");
|
||||
Map<String, RequestMappingInfoHandlerMapping> map = wac.getBeansOfType(RequestMappingInfoHandlerMapping.class);
|
||||
List<HandlerMethod> handlerMethods = null;
|
||||
for (RequestMappingInfoHandlerMapping mapping : map.values()) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 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.
|
||||
@@ -193,8 +193,7 @@ public class ResponseBodyEmitter {
|
||||
* @throws java.lang.IllegalStateException wraps any other errors
|
||||
*/
|
||||
public synchronized void send(Object object, @Nullable MediaType mediaType) throws IOException {
|
||||
Assert.state(!this.complete,
|
||||
"ResponseBodyEmitter has already completed" +
|
||||
Assert.state(!this.complete, () -> "ResponseBodyEmitter has already completed" +
|
||||
(this.failure != null ? " with error: " + this.failure : ""));
|
||||
sendInternal(object, mediaType);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.web.servlet.mvc.method.annotation;
|
||||
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2022 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.
|
||||
@@ -259,12 +259,12 @@ public class ScriptTemplateView extends AbstractUrlBasedView {
|
||||
engineCount++;
|
||||
}
|
||||
Assert.isTrue(engineCount == 1,
|
||||
"You should define either 'engine', 'engineSupplier' or 'engineName'.");
|
||||
"You should define either 'engine', 'engineSupplier', or 'engineName'.");
|
||||
|
||||
if (Boolean.FALSE.equals(this.sharedEngine)) {
|
||||
Assert.isTrue(this.engine == null,
|
||||
"When 'sharedEngine' is set to false, you should specify the " +
|
||||
"script engine using 'engineName' or 'engineSupplier' , not 'engine'.");
|
||||
"script engine using 'engineName' or 'engineSupplier', not 'engine'.");
|
||||
}
|
||||
else if (this.engine != null) {
|
||||
loadScripts(this.engine);
|
||||
|
||||
Reference in New Issue
Block a user