update
This commit is contained in:
parent
8e0f2e82a3
commit
71dea05045
|
@ -3,13 +3,20 @@ package com.ydool.boot.api.config;
|
|||
import com.ydool.boot.api.filter.ReferInterceptor;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new ReferInterceptor()).addPathPatterns("/api/**");
|
||||
}
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new ReferInterceptor()).addPathPatterns("/api/**");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
registry.addRedirectViewController("/", "/page");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue