From 6a26db80b60819c949c720a0d444e4f44ccce3a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Tue, 13 Jun 2023 08:17:54 +0200 Subject: [PATCH] Refine RouterFunctionMapping ordering consistency This commit changes the order of RouterFunctionMapping defined in WebMvcConfigurationSupport from 3 to -1 in order to achieve better consistency between WebMVC and WebFlux. It also reduces the surprise factor. That way, functional routes are always before annotation-based ones. Closes gh-30278 --- .../config/annotation/WebMvcConfigurationSupport.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java index 198f4492ed7..ae6ce3e62d2 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java @@ -121,14 +121,14 @@ import org.springframework.web.util.pattern.PathPatternParser; * *

This class registers the following {@link HandlerMapping HandlerMappings}:

*