Stop using deprecated ThemeChangeInterceptor in WebConfiguration example

This commit is contained in:
Sam Brannen
2024-06-03 16:14:07 +02:00
parent d185bb1d97
commit 7a11899c0c

View File

@@ -20,7 +20,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
import org.springframework.web.servlet.theme.ThemeChangeInterceptor;
// tag::snippet[]
@Configuration
@@ -29,7 +28,6 @@ public class WebConfiguration implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new LocaleChangeInterceptor());
registry.addInterceptor(new ThemeChangeInterceptor()).addPathPatterns("/**").excludePathPatterns("/admin/**");
}
}
// end::snippet[]