File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
framework-docs/modules/ROOT/pages/web/webmvc/mvc-config Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ The following example shows how to achieve the same configuration in XML:
52
52
</mvc:interceptors>
53
53
----
54
54
55
- NOTE: Mapped interceptors are not ideally suited as a security layer due to the potential
55
+ NOTE: Interceptors are not ideally suited as a security layer due to the potential
56
56
for a mismatch with annotated controller path matching, which can also match trailing
57
57
slashes and path extensions transparently, along with other path matching options. Many
58
58
of these options have been deprecated but the potential for a mismatch remains.
@@ -61,6 +61,12 @@ https://docs.spring.io/spring-security/reference/servlet/integrations/mvc.html#m
61
61
to align with Spring MVC path matching and also has a security firewall that blocks many
62
62
unwanted characters in URL paths.
63
63
64
+ NOTE: The XML config declares interceptors as `MappedInterceptor` beans, and those are in
65
+ turn detected by any `HandlerMapping` bean, including those from other frameworks.
66
+ By contrast, the Java config passes interceptors only to the `HandlerMapping` beans it manages.
67
+ To re-use the same interceptors across Spring MVC and other framework `HandlerMapping`
68
+ beans with the MVC Java config, either declare `MappedInterceptor` beans, or conifgure the
69
+ same interceptors in both the Java config and in other `HandlerMapping` beans.
64
70
65
71
66
72
You can’t perform that action at this time.
0 commit comments