Warning against split URL handling in docs
Closes gh-24304
This commit is contained in:
@@ -5399,6 +5399,13 @@ using the `<mvc:view-controller>` element:
|
||||
<mvc:view-controller path="/" view-name="home"/>
|
||||
----
|
||||
|
||||
If an `@RequestMapping` method is mapped to a URL for any HTTP method then a view
|
||||
controller cannot be used to handle the same URL. This is because a match by URL to an
|
||||
annotated controller is considered a strong enough indication of endpoint ownership so
|
||||
that a 405 (METHOD_NOT_ALLOWED), a 415 (UNSUPPORTED_MEDIA_TYPE), or similar response can
|
||||
be sent to the client to help with debugging. For this reason it is recommended to avoid
|
||||
splitting URL handling across an annotated controller and a view controller.
|
||||
|
||||
|
||||
|
||||
[[mvc-config-view-resolvers]]
|
||||
|
||||
Reference in New Issue
Block a user