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
Copy file name to clipboardExpand all lines: components/sbm-recipes-boot-upgrade/src/test/java/org/springframework/sbm/boot/upgrade_27_30/report/helper/SpringMVCAndWebFluxUrlMatchingChangesReportSectionTest.java
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,8 @@ public class AnotherClass {};
72
72
As of Spring Framework 6.0, the trailing slash matching configuration option has been deprecated and its default value set to `false`.
73
73
This means that previously, the following controller would match both "GET /some/greeting" and "GET /some/greeting/":
74
74
75
-
```
75
+
[source, java]
76
+
----
76
77
@RestController
77
78
public class MyController {
78
79
@@ -82,16 +83,16 @@ public class MyController {
82
83
}
83
84
84
85
}
85
-
```
86
+
----
86
87
87
-
As of https://github.com/spring-projects/spring-framework/issues/28552[this Spring Framework change], "GET /some/greeting/" doesn't
88
-
match anymore by default.
88
+
As of https://github.com/spring-projects/spring-framework/issues/28552[this Spring Framework change], "GET /some/greeting/" doesn't match anymore by default.
89
89
90
90
Developers should instead configure explicit redirects/rewrites through a proxy, a Servlet/web filter, or even declare the additional route explicitly on the controller handler (like `@GetMapping("/some/greeting", "/some/greeting/")` for more targeted cases.
91
91
92
92
Until your application fully adapts to this change, you can change the default with the following global configuration:
93
93
94
-
```
94
+
[source, java]
95
+
----
95
96
@Configuration
96
97
public class WebConfiguration implements WebMvcConfigurer {
97
98
@@ -101,7 +102,7 @@ public void configurePathMatch(PathMatchConfigurer configurer) {
101
102
}
102
103
103
104
}
104
-
```
105
+
----
105
106
106
107
==== Why is the application affected
107
108
The scan found classes annotated with `@RestController` which could be affected by this change.
@@ -122,7 +123,7 @@ public void configurePathMatch(PathMatchConfigurer configurer) {
0 commit comments