Rename <mvc:cachecontrol/> to <mvc:cache-control/>

This commit is contained in:
Brian Clozel
2015-07-21 12:09:25 +02:00
parent 9149bf7ad4
commit eef937e4f2
4 changed files with 5 additions and 5 deletions

View File

@@ -172,7 +172,7 @@ class ResourcesBeanDefinitionParser implements BeanDefinitionParser {
resourceHandlerDef.getPropertyValues().add("cacheSeconds", cacheSeconds); resourceHandlerDef.getPropertyValues().add("cacheSeconds", cacheSeconds);
} }
Element cacheControlElement = DomUtils.getChildElementByTagName(element, "cachecontrol"); Element cacheControlElement = DomUtils.getChildElementByTagName(element, "cache-control");
if (cacheControlElement != null) { if (cacheControlElement != null) {
CacheControl cacheControl = parseCacheControl(cacheControlElement); CacheControl cacheControl = parseCacheControl(cacheControlElement);
resourceHandlerDef.getPropertyValues().add("cacheControl", cacheControl); resourceHandlerDef.getPropertyValues().add("cacheControl", cacheControl);

View File

@@ -506,7 +506,7 @@
</xsd:attribute> </xsd:attribute>
</xsd:complexType> </xsd:complexType>
<xsd:complexType name="cachecontrol"> <xsd:complexType name="cache-control">
<xsd:annotation> <xsd:annotation>
<xsd:documentation source="org.springframework.web.cache.CacheControl"><![CDATA[ <xsd:documentation source="org.springframework.web.cache.CacheControl"><![CDATA[
Generates "Cache-Control" HTTP response headers. Generates "Cache-Control" HTTP response headers.
@@ -596,7 +596,7 @@
</xsd:annotation> </xsd:annotation>
<xsd:complexType> <xsd:complexType>
<xsd:sequence> <xsd:sequence>
<xsd:element name="cachecontrol" type="cachecontrol" minOccurs="0" maxOccurs="1"/> <xsd:element name="cache-control" type="cache-control" minOccurs="0" maxOccurs="1"/>
<xsd:element name="resource-chain" type="resource-chain" minOccurs="0" maxOccurs="1"/> <xsd:element name="resource-chain" type="resource-chain" minOccurs="0" maxOccurs="1"/>
</xsd:sequence> </xsd:sequence>
<xsd:attribute name="mapping" use="required" type="xsd:string"> <xsd:attribute name="mapping" use="required" type="xsd:string">

View File

@@ -6,7 +6,7 @@
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/"> <mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/">
<mvc:cachecontrol max-age="3600" s-maxage="1800" cache-public="true"/> <mvc:cache-control max-age="3600" s-maxage="1800" cache-public="true"/>
<mvc:resource-chain resource-cache="false" auto-registration="false"> <mvc:resource-chain resource-cache="false" auto-registration="false">
<mvc:resolvers> <mvc:resolvers>
<mvc:version-resolver> <mvc:version-resolver>

View File

@@ -4222,7 +4222,7 @@ And in XML:
[subs="verbatim"] [subs="verbatim"]
---- ----
<mvc:resources mapping="/resources/**" location="/public-resources/"> <mvc:resources mapping="/resources/**" location="/public-resources/">
<mvc:cachecontrol max-age="3600" cache-public="true"/> <mvc:cache-control max-age="3600" cache-public="true"/>
</mvc:resources> </mvc:resources>
---- ----