1、在SpringBoot中自己写的拦截器,居然把静态资源也拦截了,导致了页面加载失败。
1 package com.bie.config; 2 3 import com.bie.component.MyLocalResolver; 4 import com.bie.interceptor.LoginInterceptor; 5 import org.springframework.context.annotation.Bean; 6 import org.springframework.context.annotation.Configuration; 7 import org.springframework.web.servlet.LocaleResolver; 8 import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 9 import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 10 import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 11 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 12 13 /** 14 * 15 */ 16 @Configuration 17 public class SpringMvcWebConfigSupport implements WebMvcConfigurer { 18 19 /** 20 * 默认访问的是首页 21 * 22 * @param registry 23</