@Configuration
public class StaticResourceConfiguration extends WebMvcConfigurerAdapter
{
//自定义静态资源文件路径
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/resources/**").addResourceLocations("classpath:/static/");
}
}
网友评论