package com.cloud.count.config;
|
|
import org.springframework.context.annotation.Configuration;
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
@EnableWebMvc
|
@Configuration
|
public class AdapterConfig extends WebMvcConfigurerAdapter {
|
|
@Override
|
public void addInterceptors(InterceptorRegistry registry) {
|
|
super.addInterceptors(registry);
|
}
|
|
|
@Override
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
registry.addResourceHandler("/static/**", "/index.html")
|
.addResourceLocations("classpath:/static/", "classpath:/index.html");
|
registry.addResourceHandler("swagger-ui.html")
|
.addResourceLocations("classpath:/META-INF/resources/");
|
registry.addResourceHandler("/webjars/**")
|
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
super.addResourceHandlers(registry);
|
}
|
}
|