mirror of
https://github.com/RemainderTime/spring-boot-base-demo.git
synced 2026-02-17 20:40:56 +08:00
23 lines
782 B
Java
23 lines
782 B
Java
package cn.xf.basedemo.config;
|
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
|
|
|
/**
|
|
* @program: xf-boot-base
|
|
* @ClassName WebMvcConfig
|
|
* @description: 放行Knife4j请求
|
|
* @author: xiongfeng
|
|
* @create: 2022-07-26 11:17
|
|
**/
|
|
@Configuration
|
|
public class WebMvcConfig extends WebMvcConfigurationSupport {
|
|
|
|
@Override
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
|
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
|
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
|
}
|
|
|
|
} |