diff --git a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java index e9b9f17502a6..82115ba354e7 100644 --- a/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java +++ b/spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/ServletWebSocketHandlerRegistry.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2024 the original author or authors. + * Copyright 2002-2025 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. @@ -26,14 +26,12 @@ import org.springframework.scheduling.TaskScheduler; import org.springframework.util.MultiValueMap; -import org.springframework.util.PathMatcher; import org.springframework.web.HttpRequestHandler; import org.springframework.web.servlet.handler.AbstractHandlerMapping; import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping; import org.springframework.web.socket.WebSocketHandler; import org.springframework.web.socket.server.support.WebSocketHandlerMapping; import org.springframework.web.util.UrlPathHelper; -import org.springframework.web.util.pattern.PathPatternParser; /** * {@link WebSocketHandlerRegistry} with Spring MVC handler mappings for the @@ -79,17 +77,21 @@ public int getOrder() { /** * Set the UrlPathHelper to configure on the {@code SimpleUrlHandlerMapping} * used to map handshake requests. - * @deprecated use of {@link PathMatcher} and {@link UrlPathHelper} is deprecated - * for use at runtime in web modules in favor of parsed patterns with - * {@link PathPatternParser}. + * @deprecated without a replacement since effectively the UrlPathHelper is + * no longer used with {@code PathPatternParser} used by the default in + * all extensions of {@code AbstractHandlerMapping}. To be removed in 7.0. */ - @Deprecated(since = "7.0", forRemoval = true) + @Deprecated(since = "6.2.4", forRemoval = true) public void setUrlPathHelper(@Nullable UrlPathHelper urlPathHelper) { this.urlPathHelper = urlPathHelper; } - @Deprecated(since = "7.0", forRemoval = true) - public @Nullable UrlPathHelper getUrlPathHelper() { + /** + * Return the configured {@code UrlPathHelper}. + * @deprecated without a replacement; see notice on {@link #setUrlPathHelper} + */ + @Deprecated(since = "6.2.4", forRemoval = true) + public @Nullable UrlPathHelper getUrlPathHelper() { return this.urlPathHelper; }