Browse Source

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

pull/842/head
Brian Clozel 11 years ago
parent
commit
eef937e4f2
  1. 2
      spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java
  2. 4
      spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd
  3. 2
      spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-resources-chain-no-auto.xml
  4. 2
      src/asciidoc/web-mvc.adoc

2
spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java

@ -172,7 +172,7 @@ class ResourcesBeanDefinitionParser implements BeanDefinitionParser { @@ -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);

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

@ -506,7 +506,7 @@ @@ -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 @@ @@ -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">

2
spring-webmvc/src/test/resources/org/springframework/web/servlet/config/mvc-config-resources-chain-no-auto.xml

@ -6,7 +6,7 @@ @@ -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>

2
src/asciidoc/web-mvc.adoc

@ -4222,7 +4222,7 @@ And in XML: @@ -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>
----

Loading…
Cancel
Save