Skip to content

Commit 98174e1

Browse files
snicollrstoyanchev
authored andcommitted
Improve documentation of matrix variables.
Prior to this commit, it was not clear how to enable the support of matrix variables in the mvc namespace. As the feature is disabled by default, added something to highlight the part that explains how to configure it Issue: SPR-11331
1 parent a599b57 commit 98174e1

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/asciidoc/index.adoc

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28780,6 +28780,38 @@ Note that to enable the use of matrix variables, you must set the
2878028780
`removeSemicolonContent` property of `RequestMappingHandlerMapping` to `false`. By
2878128781
default it is set to `true`.
2878228782

28783+
[TIP]
28784+
====
28785+
28786+
The MVC Java config and the MVC namespace both provide options for enabling the use of
28787+
matrix variables.
28788+
28789+
If you are using Java config, The <<mvc-config-advanced-java, Advanced Customizations
28790+
with MVC Java Config>> section describes how the `RequestMappingHandlerMapping` can
28791+
be customized.
28792+
28793+
In the MVC namespace, the `<mvc:annotation-driven>` element has an
28794+
`enableMatrixVariables` attribute that should be set to `true`. By default it is set
28795+
to `false`.
28796+
28797+
[source,xml,indent=0]
28798+
[subs="verbatim,quotes"]
28799+
----
28800+
<?xml version="1.0" encoding="UTF-8"?>
28801+
<beans xmlns="http://www.springframework.org/schema/beans"
28802+
xmlns:mvc="http://www.springframework.org/schema/mvc"
28803+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
28804+
xsi:schemaLocation="
28805+
http://www.springframework.org/schema/beans
28806+
http://www.springframework.org/schema/beans/spring-beans.xsd
28807+
http://www.springframework.org/schema/mvc
28808+
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
28809+
28810+
<mvc:annotation-driven enableMatrixVariables="true"/>
28811+
28812+
</beans>
28813+
----
28814+
====
2878328815

2878428816
[[mvc-ann-requestmapping-consumes]]
2878528817
===== Consumable Media Types

0 commit comments

Comments
 (0)