#4 -- Read rule string #20
@ -2,6 +2,7 @@ package ru.ulstu.fc.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.CacheControl;
|
||||
import org.springframework.web.servlet.LocaleResolver;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
@ -10,6 +11,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import org.springframework.web.servlet.i18n.CookieLocaleResolver;
|
||||
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Configuration
|
||||
public class MvcConfiguration implements WebMvcConfigurer {
|
||||
@Override
|
||||
@ -23,7 +26,11 @@ public class MvcConfiguration implements WebMvcConfigurer {
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry
|
||||
.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("/webjars/");
|
||||
.addResourceLocations("/webjars/")
|
||||
.setCacheControl(CacheControl.maxAge(60, TimeUnit.SECONDS)
|
||||
.noTransform()
|
||||
.mustRevalidate());
|
||||
;
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
Loading…
x
Reference in New Issue
Block a user