From 13237626f3956d93a91a94bee6fee6aa86134a06 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 27 Mar 2018 22:13:16 +0300 Subject: www: spring boot autoconfigured static resources + cache busting using Spring --- .../com/juick/server/configuration/BaseWebConfiguration.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'juick-common/src/main/java/com/juick/server/configuration') diff --git a/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java b/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java index ff34e370..1c520303 100644 --- a/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java +++ b/juick-common/src/main/java/com/juick/server/configuration/BaseWebConfiguration.java @@ -36,6 +36,8 @@ import org.springframework.web.multipart.MultipartResolver; import org.springframework.web.multipart.commons.CommonsMultipartResolver; import org.springframework.web.servlet.config.annotation.PathMatchConfigurer; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import org.springframework.web.servlet.resource.ResourceUrlEncodingFilter; +import org.springframework.web.servlet.resource.ResourceUrlProvider; import rocks.xmpp.core.session.Extension; import rocks.xmpp.core.session.XmppSessionConfiguration; import rocks.xmpp.core.session.debug.LogbackDebugger; @@ -57,12 +59,10 @@ public class BaseWebConfiguration implements WebMvcConfigurer, SchedulingConfigu configurer.setUseSuffixPatternMatch(false); } - @Override - public void configureMessageConverters(List> converters) { - MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(jsonMapper()); - converters.add(converter); + @Bean + public ResourceUrlEncodingFilter resourceUrlEncodingFilter() { + return new ResourceUrlEncodingFilter(); } - @Bean public ObjectMapper jsonMapper() { ObjectMapper mapper = new ObjectMapper(); -- cgit v1.2.3