| | |
| | | package com.ruoyi.framework.config; |
| | | |
| | | import com.ruoyi.framework.Interceptor.PlusWebInvokeTimeInterceptor; |
| | | import com.ruoyi.framework.interceptor.PlusWebInvokeTimeInterceptor; |
| | | import com.yomahub.tlog.web.interceptor.TLogWebInterceptor; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | |
| | | public class ResourcesConfig implements WebMvcConfigurer { |
| | | |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) { |
| | | } |
| | | |
| | | @Override |
| | | public void addInterceptors(InterceptorRegistry registry) { |
| | | // 全局链路跟踪拦截器 |
| | | registry.addInterceptor(new TLogWebInterceptor()); |
| | | // 全局访问性能拦截 |
| | | registry.addInterceptor(new PlusWebInvokeTimeInterceptor()); |
| | | } |
| | | |
| | | @Override |
| | | public void addResourceHandlers(ResourceHandlerRegistry registry) { |
| | | } |
| | | |
| | | /** |
| | |
| | | // 返回新的CorsFilter |
| | | return new CorsFilter(source); |
| | | } |
| | | } |
| | | } |