Skip to content

Commit 42424d6

Browse files
committed
Document XML attributes in mvc:resource-chain in 4.1 XSD
Issue: SPR-12804
1 parent b439402 commit 42424d6

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,39 @@
471471
<xsd:element name="resolvers" type="resource-resolvers" minOccurs="0" maxOccurs="1"/>
472472
<xsd:element name="transformers" type="resource-transformers" minOccurs="0" maxOccurs="1"/>
473473
</xsd:sequence>
474-
<xsd:attribute name="resource-cache" type="xsd:boolean" use="required"/>
475-
<xsd:attribute name="auto-registration" type="xsd:boolean" default="true" use="optional"/>
476-
<xsd:attribute name="cache-manager" type="xsd:string" use="optional"/>
477-
<xsd:attribute name="cache-name" type="xsd:string" use="optional"/>
474+
<xsd:attribute name="resource-cache" type="xsd:boolean" use="required">
475+
<xsd:annotation>
476+
<xsd:documentation><![CDATA[
477+
Whether the resource chain should cache resource resolution.
478+
Note that the resource content itself won't be cached, but rather Resource instances.
479+
]]></xsd:documentation>
480+
</xsd:annotation>
481+
</xsd:attribute>
482+
<xsd:attribute name="auto-registration" type="xsd:boolean" default="true" use="optional">
483+
<xsd:annotation>
484+
<xsd:documentation><![CDATA[
485+
Whether to register automatically ResourceResolvers and ResourceTransformers.
486+
Setting this property to "false" means that it gives developers full control over the registration process.
487+
]]></xsd:documentation>
488+
</xsd:annotation>
489+
</xsd:attribute>
490+
<xsd:attribute name="cache-manager" type="xsd:string" use="optional">
491+
<xsd:annotation>
492+
<xsd:documentation><![CDATA[
493+
The name of the Cache Manager to cache resource resolution. By default, a ConcurrentCacheMap will be used.
494+
Since Resources aren't serializable and can be dependent on the application host, one should not use a
495+
distributed cache but rather an in-memory cache.
496+
]]></xsd:documentation>
497+
</xsd:annotation>
498+
</xsd:attribute>
499+
<xsd:attribute name="cache-name" type="xsd:string" use="optional">
500+
<xsd:annotation>
501+
<xsd:documentation><![CDATA[
502+
The cache name to use in the configured cache manager.
503+
Will use "spring-resource-chain-cache" by default.
504+
]]></xsd:documentation>
505+
</xsd:annotation>
506+
</xsd:attribute>
478507
</xsd:complexType>
479508

480509
<xsd:element name="resources">

0 commit comments

Comments
 (0)