Merge branch '6.2.x'
# Conflicts: # spring-context/src/test/java/org/springframework/scheduling/concurrent/AbstractSchedulingTaskExecutorTests.java # spring-web/src/main/java/org/springframework/http/MediaType.java # spring-websocket/spring-websocket.gradle # spring-websocket/src/main/java/org/springframework/web/socket/messaging/WebSocketStompClient.java # spring-websocket/src/main/java/org/springframework/web/socket/sockjs/client/DefaultTransportRequest.java
This commit is contained in:
@@ -485,9 +485,9 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
|
||||
try {
|
||||
service = new HandshakeWebSocketService();
|
||||
}
|
||||
catch (IllegalStateException ex) {
|
||||
catch (Throwable ex) {
|
||||
// Don't fail, test environment perhaps
|
||||
service = new NoUpgradeStrategyWebSocketService();
|
||||
service = new NoUpgradeStrategyWebSocketService(ex);
|
||||
}
|
||||
}
|
||||
return service;
|
||||
@@ -608,9 +608,15 @@ public class WebFluxConfigurationSupport implements ApplicationContextAware {
|
||||
|
||||
private static final class NoUpgradeStrategyWebSocketService implements WebSocketService {
|
||||
|
||||
private final Throwable ex;
|
||||
|
||||
public NoUpgradeStrategyWebSocketService(Throwable ex) {
|
||||
this.ex = ex;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mono<Void> handleRequest(ServerWebExchange exchange, WebSocketHandler webSocketHandler) {
|
||||
return Mono.error(new IllegalStateException("No suitable RequestUpgradeStrategy"));
|
||||
return Mono.error(new IllegalStateException("No suitable RequestUpgradeStrategy", this.ex));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ public class LiteWebJarsResourceResolver extends AbstractResourceResolver {
|
||||
|
||||
private final WebJarVersionLocator webJarVersionLocator;
|
||||
|
||||
|
||||
/**
|
||||
* Create a {@code LiteWebJarsResourceResolver} with a default {@code WebJarVersionLocator} instance.
|
||||
*/
|
||||
@@ -64,6 +65,7 @@ public class LiteWebJarsResourceResolver extends AbstractResourceResolver {
|
||||
this.webJarVersionLocator = webJarVersionLocator;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Mono<Resource> resolveResourceInternal(@Nullable ServerWebExchange exchange,
|
||||
String requestPath, List<? extends Resource> locations, ResourceResolverChain chain) {
|
||||
|
||||
Reference in New Issue
Block a user