diff --git a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java index b99730707e5..cfb37bafc95 100644 --- a/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java +++ b/spring-webmvc/src/main/java/org/springframework/web/servlet/config/annotation/ResourceHandlerRegistration.java @@ -120,7 +120,8 @@ public class ResourceHandlerRegistration { * development, especially when applying a version strategy. * @param cache the cache to use for storing resolved and transformed resources; * by default a {@link org.springframework.cache.concurrent.ConcurrentMapCache} - * is used. + * is used. As Resources aren't serializable and can be dependent of the application host, + * one should not use a distributed cache but rather an in-memory cache. * @return the same {@link ResourceHandlerRegistration} instance for chained method invocation * @since 4.1 */ diff --git a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd index c3ef3b7f021..e1454a15df8 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.1.xsd @@ -471,10 +471,39 @@ - - - - + + + + + + + + + + + + + + + + + + + +