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 b9f4b6cbf3..ef91d8c243 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 @@ -139,7 +139,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.2.xsd b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd index fc8dab620b..d5e6afdd5d 100644 --- a/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd +++ b/spring-webmvc/src/main/resources/org/springframework/web/servlet/config/spring-mvc-4.2.xsd @@ -471,10 +471,39 @@ - - - - + + + + + + + + + + + + + + + + + + + +