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:
@@ -23,7 +23,7 @@
|
||||
|
||||
<mvc:resources mapping="/resources/**" location="/, classpath:/META-INF/">
|
||||
<mvc:resource-chain>
|
||||
<mvc:resource-cache cache="resourceCache"/>
|
||||
<mvc:resource-cache cache-manager="resourceCache" cache-name="test-resource-cache"/>
|
||||
<mvc:resolvers>
|
||||
<mvc:version-resolver>
|
||||
<mvc:fixed-version-strategy version="abc" patterns="/**/*.js"/>
|
||||
@@ -36,7 +36,5 @@
|
||||
</mvc:resource-chain>
|
||||
</mvc:resources>
|
||||
|
||||
<bean id="resourceCache" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestResourceCache">
|
||||
<constructor-arg name="name" value="resourceCache"/>
|
||||
</bean>
|
||||
<bean id="resourceCache" class="org.springframework.web.servlet.config.MvcNamespaceTests$TestCacheManager"/>
|
||||
</beans>
|
||||
|
||||
Reference in New Issue
Block a user