Skip to content

Commit

Permalink
Improve documentation of matrix variables.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
snicoll authored and rstoyanchev committed Jan 22, 2014
1 parent a599b57 commit 98174e1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/asciidoc/index.adoc
Expand Up @@ -28780,6 +28780,38 @@ Note that to enable the use of matrix variables, you must set the
`removeSemicolonContent` property of `RequestMappingHandlerMapping` to `false`. By
default it is set to `true`.

[TIP]
====

The MVC Java config and the MVC namespace both provide options for enabling the use of
matrix variables.

If you are using Java config, The <<mvc-config-advanced-java, Advanced Customizations
with MVC Java Config>> section describes how the `RequestMappingHandlerMapping` can
be customized.

In the MVC namespace, the `<mvc:annotation-driven>` element has an
`enableMatrixVariables` attribute that should be set to `true`. By default it is set
to `false`.

[source,xml,indent=0]
[subs="verbatim,quotes"]
----
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">

<mvc:annotation-driven enableMatrixVariables="true"/>

</beans>
----
====

[[mvc-ann-requestmapping-consumes]]
===== Consumable Media Types
Expand Down

0 comments on commit 98174e1

Please sign in to comment.