Change resource handler XML Namespace

This commit changes the way a <mvc:resource-cache> can be configured
with a user defined Cache instance.

Now a reference to a CacheManager Bean and a Cache name must be
provided. This is a more flexible configuration for typical XML setups.

  <mvc:resource-cache
    cache-manager="resourceCache"
    cache-name="test-resource-cache"/>

Issue: SPR-12129
This commit is contained in:
Brian Clozel
2014-08-29 18:51:40 +02:00
parent 4df05d1f98
commit 76c46fdbe3
6 changed files with 37 additions and 14 deletions

View File

@@ -342,10 +342,12 @@
<xsd:annotation>
<xsd:documentation source="org.springframework.web.servlet.resource.CachingResourceResolver"><![CDATA[
A ResourceResolver that resolves resources from a Cache or otherwise delegates to the resolver chain
and saves the result in the cache. Can use a custom Cache if provided as a bean reference in the "cache" attribute.
and saves the result in the cache. Can use a custom Cache if a CacheManager is provided as a bean reference
in the "cache-manager" attribute, and the cache name provided in the "cache-name" attribute.
]]></xsd:documentation>
</xsd:annotation>
<xsd:attribute name="cache" type="xsd:string" use="optional"/>
<xsd:attribute name="cache-manager" type="xsd:string" use="optional"/>
<xsd:attribute name="cache-name" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="content-version-strategy">