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:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.jdbc.datasource;
|
||||
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLFeatureNotSupportedException;
|
||||
import java.sql.Savepoint;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -179,6 +180,9 @@ public abstract class JdbcTransactionObjectSupport implements SavepointManager,
|
||||
try {
|
||||
conHolder.getConnection().releaseSavepoint((Savepoint) savepoint);
|
||||
}
|
||||
catch (SQLFeatureNotSupportedException ex) {
|
||||
// typically on Oracle - ignore
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
throw new TransactionSystemException("Could not explicitly release JDBC savepoint", ex);
|
||||
}
|
||||
|
||||
@@ -182,10 +182,10 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen
|
||||
@Override
|
||||
public void processAheadOfTime(RuntimeHints runtimeHints, Class<?> testClass, ClassLoader classLoader) {
|
||||
getSqlAnnotationsFor(testClass).forEach(sql ->
|
||||
registerClasspathResources(getScripts(sql, testClass, null, true), runtimeHints, classLoader));
|
||||
registerClasspathResources(getScripts(sql, testClass, null, true), runtimeHints, classLoader));
|
||||
getSqlMethods(testClass).forEach(testMethod ->
|
||||
getSqlAnnotationsFor(testMethod).forEach(sql ->
|
||||
registerClasspathResources(getScripts(sql, testClass, testMethod, false), runtimeHints, classLoader)));
|
||||
getSqlAnnotationsFor(testMethod).forEach(sql ->
|
||||
registerClasspathResources(getScripts(sql, testClass, testMethod, false), runtimeHints, classLoader)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -27,8 +27,8 @@ dependencies {
|
||||
optional("org.eclipse.jetty.ee10.websocket:jetty-ee10-websocket-jetty-server") {
|
||||
exclude group: "jakarta.servlet", module: "jakarta.servlet-api"
|
||||
}
|
||||
optional("org.eclipse.jetty.websocket:jetty-websocket-jetty-server")
|
||||
optional("org.eclipse.jetty.websocket:jetty-websocket-jetty-client")
|
||||
optional("org.eclipse.jetty.websocket:jetty-websocket-jetty-server")
|
||||
optional("org.freemarker:freemarker")
|
||||
optional("org.jetbrains.kotlin:kotlin-reflect")
|
||||
optional("org.jetbrains.kotlin:kotlin-stdlib")
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -63,6 +63,7 @@ final class DefaultAsyncServerResponse extends ErrorHandlingServerResponse imple
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ServerResponse block() {
|
||||
try {
|
||||
|
||||
@@ -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
|
||||
@Nullable
|
||||
protected Resource resolveResourceInternal(@Nullable HttpServletRequest request, String requestPath,
|
||||
|
||||
@@ -34,12 +34,10 @@ import org.springframework.web.socket.WebSocketExtension;
|
||||
*/
|
||||
public class StandardToWebSocketExtensionAdapter extends WebSocketExtension {
|
||||
|
||||
|
||||
public StandardToWebSocketExtensionAdapter(Extension extension) {
|
||||
super(extension.getName(), initParameters(extension));
|
||||
}
|
||||
|
||||
|
||||
private static Map<String, String> initParameters(Extension extension) {
|
||||
List<Extension.Parameter> parameters = extension.getParameters();
|
||||
Map<String, String> result = new LinkedCaseInsensitiveMap<>(parameters.size(), Locale.ROOT);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2024 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.
|
||||
@@ -55,6 +55,7 @@ public class WebSocketToStandardExtensionAdapter implements Extension {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.name;
|
||||
|
||||
Reference in New Issue
Block a user