Deprecate HandlerMappingIntrospector
Closes gh-34019
This commit is contained in:
@@ -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.
|
||||
@@ -280,6 +280,7 @@ public abstract class MvcNamespaceUtils {
|
||||
* Registers an {@link HandlerMappingIntrospector} under a well-known name
|
||||
* unless already registered.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
private static void registerHandlerMappingIntrospector(ParserContext context, @Nullable Object source) {
|
||||
if (!context.getRegistry().containsBeanDefinition(HANDLER_MAPPING_INTROSPECTOR_BEAN_NAME)) {
|
||||
RootBeanDefinition beanDef = new RootBeanDefinition(HandlerMappingIntrospector.class);
|
||||
|
||||
@@ -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.
|
||||
@@ -1172,6 +1172,7 @@ public class WebMvcConfigurationSupport implements ApplicationContextAware, Serv
|
||||
protected void addCorsMappings(CorsRegistry registry) {
|
||||
}
|
||||
|
||||
@SuppressWarnings("removal")
|
||||
@Bean
|
||||
@Lazy
|
||||
public HandlerMappingIntrospector mvcHandlerMappingIntrospector() {
|
||||
|
||||
@@ -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.
|
||||
@@ -55,6 +55,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
* @author Brian Clozel
|
||||
* @since 5.2
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
public class RouterFunctionMapping extends AbstractHandlerMapping implements InitializingBean, MatchableHandlerMapping {
|
||||
|
||||
private @Nullable RouterFunction<?> routerFunction;
|
||||
|
||||
@@ -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.
|
||||
@@ -61,6 +61,7 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
* @author Arjen Poutsma
|
||||
* @since 16.04.2003
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
public abstract class AbstractUrlHandlerMapping extends AbstractHandlerMapping implements MatchableHandlerMapping {
|
||||
|
||||
private @Nullable Object rootHandler;
|
||||
|
||||
@@ -90,7 +90,12 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3.1
|
||||
* @deprecated in favor of using just {@link PathPatternParser}; when
|
||||
* {@link #allHandlerMappingsUsePathPatternParser} returns true, it is sufficient
|
||||
* to use that to align with handler mappings.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "7.0", forRemoval = true)
|
||||
public class HandlerMappingIntrospector
|
||||
implements CorsConfigurationSource, PreFlightRequestHandler, ApplicationContextAware, InitializingBean {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -31,8 +31,9 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3.1
|
||||
* @see HandlerMappingIntrospector
|
||||
* @deprecated together with {@link HandlerMappingIntrospector} without a replacement.
|
||||
*/
|
||||
@Deprecated(since = "7.0", forRemoval = true)
|
||||
public interface MatchableHandlerMapping extends HandlerMapping {
|
||||
|
||||
/**
|
||||
@@ -55,6 +56,7 @@ public interface MatchableHandlerMapping extends HandlerMapping {
|
||||
* for use at runtime in web modules in favor of parsed patterns with
|
||||
* {@link PathPatternParser}.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "7.0", forRemoval = true)
|
||||
@Nullable RequestMatchResult match(HttpServletRequest request, String pattern);
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -36,7 +36,10 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 5.3
|
||||
* @deprecated together with {@link HandlerMappingIntrospector} without a replacement.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "7.0", forRemoval = true)
|
||||
class PathPatternMatchableHandlerMapping implements MatchableHandlerMapping {
|
||||
|
||||
private static final int MAX_PATTERNS = 1024;
|
||||
|
||||
@@ -34,7 +34,10 @@ import org.springframework.web.util.pattern.PathPatternParser;
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3.1
|
||||
* @deprecated together with {@link HandlerMappingIntrospector} without a replacement.
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
@Deprecated(since = "7.0", forRemoval = true)
|
||||
public class RequestMatchResult {
|
||||
|
||||
private final @Nullable PathPattern pathPattern;
|
||||
|
||||
@@ -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.
|
||||
@@ -71,6 +71,7 @@ import org.springframework.web.util.UrlPathHelper;
|
||||
* @author Olga Maciaszek-Sharma
|
||||
* @since 3.1
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMapping
|
||||
implements MatchableHandlerMapping, EmbeddedValueResolverAware {
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -73,6 +73,7 @@ import static org.springframework.web.servlet.HandlerMapping.BEST_MATCHING_PATTE
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 4.3.1
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
class HandlerMappingIntrospectorTests {
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user