提交 eef937e4 编写于 作者: B Brian Clozel

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

上级 9149bf7a
......@@ -172,7 +172,7 @@ class ResourcesBeanDefinitionParser implements BeanDefinitionParser {
resourceHandlerDef.getPropertyValues().add("cacheSeconds", cacheSeconds);
}
Element cacheControlElement = DomUtils.getChildElementByTagName(element, "cachecontrol");
Element cacheControlElement = DomUtils.getChildElementByTagName(element, "cache-control");
if (cacheControlElement != null) {
CacheControl cacheControl = parseCacheControl(cacheControlElement);
resourceHandlerDef.getPropertyValues().add("cacheControl", cacheControl);
......
......@@ -506,7 +506,7 @@
</xsd:attribute>
</xsd:complexType>
<xsd:complexType name="cachecontrol">
<xsd:complexType name="cache-control">
<xsd:annotation>
<xsd:documentation source="org.springframework.web.cache.CacheControl"><![CDATA[
Generates "Cache-Control" HTTP response headers.
......@@ -596,7 +596,7 @@
</xsd:annotation>
<xsd:complexType>
<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:sequence>
<xsd:attribute name="mapping" use="required" type="xsd:string">
......
......@@ -6,7 +6,7 @@
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<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:resolvers>
<mvc:version-resolver>
......
......@@ -4222,7 +4222,7 @@ And in XML:
[subs="verbatim"]
----
<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>
----
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册