|
|
@@ -1,8 +1,7 @@
|
|
|
package cn.reghao.dfs.store.config;
|
|
|
|
|
|
-import cn.reghao.dfs.store.inerceptor.StaticFileInterceptor;
|
|
|
+import cn.reghao.dfs.store.inerceptor.FileAccessInterceptor;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
-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.WebMvcConfigurationSupport;
|
|
|
@@ -13,10 +12,10 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupp
|
|
|
*/
|
|
|
@Configuration
|
|
|
public class WebConfig extends WebMvcConfigurationSupport {
|
|
|
- private final StaticFileInterceptor staticFileInterceptor;
|
|
|
+ private final FileAccessInterceptor fileAccessInterceptor;
|
|
|
|
|
|
- public WebConfig(StaticFileInterceptor staticFileInterceptor) {
|
|
|
- this.staticFileInterceptor = staticFileInterceptor;
|
|
|
+ public WebConfig(FileAccessInterceptor fileAccessInterceptor) {
|
|
|
+ this.fileAccessInterceptor = fileAccessInterceptor;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -29,7 +28,7 @@ public class WebConfig extends WebMvcConfigurationSupport {
|
|
|
|
|
|
@Override
|
|
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
|
- registry.addInterceptor(staticFileInterceptor);
|
|
|
+ registry.addInterceptor(fileAccessInterceptor);
|
|
|
}
|
|
|
|
|
|
// TODO gateway 中处理了跨域, 这里不再处理
|