You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Closesgh-30278
Copy file name to clipboardExpand all lines: spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/WebMvcConfigurationSupport.java
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -121,14 +121,14 @@
121
121
*
122
122
* <p>This class registers the following {@link HandlerMapping HandlerMappings}:</p>
123
123
* <ul>
124
+
* <li>{@link RouterFunctionMapping}
125
+
* ordered at -1 to map {@linkplain org.springframework.web.servlet.function.RouterFunction router functions}.
124
126
* <li>{@link RequestMappingHandlerMapping}
125
127
* ordered at 0 for mapping requests to annotated controller methods.
126
128
* <li>{@link HandlerMapping}
127
129
* ordered at 1 to map URL paths directly to view names.
128
130
* <li>{@link BeanNameUrlHandlerMapping}
129
131
* ordered at 2 to map URL paths to controller bean names.
130
-
* <li>{@link RouterFunctionMapping}
131
-
* ordered at 3 to map {@linkplain org.springframework.web.servlet.function.RouterFunction router functions}.
132
132
* <li>{@link HandlerMapping}
133
133
* ordered at {@code Integer.MAX_VALUE-1} to serve static resource requests.
134
134
* <li>{@link HandlerMapping}
@@ -535,7 +535,7 @@ public BeanNameUrlHandlerMapping beanNameHandlerMapping(
535
535
}
536
536
537
537
/**
538
-
* Return a {@link RouterFunctionMapping} ordered at 3 to map
538
+
* Return a {@link RouterFunctionMapping} ordered at -1 to map
0 commit comments