spring boot 配置文件下载
@Configuration
public class SpringBootConfigurer extends WebMvcConfigurationSupport {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("*").addResourceLocations("classpath:/static/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
//String filePath = System.getProperty("user.dir");//当前项目目录
//registry.addResourceHandler("/file/**").addResourceLocations("file:"+filePath + "/file/");
registry.addResourceHandler("/file/**").addResourceLocations("file:D:/mydoc/file/"); // 配置为D盘file目录
}