| | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.servlet.AsyncHandlerInterceptor; |
| | | import org.springframework.web.servlet.config.annotation.CorsRegistry; |
| | | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; |
| | | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) { |
| | | // 配置静态资源处理器 |
| | | registry.addResourceHandler("/static/**") |
| | | .addResourceLocations("classpath:/static/") |
| | | .addResourceLocations("/static/"); |
| | | // 配置视图文件处理器 |
| | | registry.addResourceHandler("/views/**") |