Fix resource-chain XML syntax for cache
This change moves the resource-cache configuration to the <resource-chain/> tag, since enabling/disabling resource cache should be driven by a property or a SpEL expression. So now that configuration can be set with XML attributes: <mvc:resource-chain resource-cache="true" cache-manager="resourceCache" cache-name="test-resource-cache"> In order to mirror the JavaConfig behavior, the "resource-cache" attribute is required. Issue: SPR-12129
This commit is contained in:
@@ -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:resource-chain auto-registration="false">
|
||||
<mvc:resource-chain resource-cache="false" auto-registration="false">
|
||||
<mvc:resolvers>
|
||||
<mvc:version-resolver>
|
||||
<mvc:fixed-version-strategy version="abc" patterns="/**/*.js"/>
|
||||
|
||||
@@ -22,8 +22,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:resource-chain>
|
||||
<mvc:resource-cache cache-manager="resourceCache" cache-name="test-resource-cache"/>
|
||||
<mvc:resource-chain resource-cache="true" cache-manager="resourceCache" cache-name="test-resource-cache">
|
||||
<mvc:resolvers>
|
||||
<mvc:version-resolver>
|
||||
<mvc:fixed-version-strategy version="abc" patterns="/**/*.js"/>
|
||||
|
||||
Reference in New Issue
Block a user