1.addResourceHandlers
所有/uploadFiles/开头的请求 都会去后面配置的路径下查找资源
的所有资源会被解析为以下的路径G:/itemsource/smallapple/
@Configuration
class WebConfigurer implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/uploadFiles/**").addResourceLocations("file:G:/itemsource/smallapple/");
}
}