使用WebMvcConfigurerAdapter的addResourceHandlers方法,映射外部资源失败:
@SpringBootConfiguration
public class MySpringMVCConfig extends WebMvcConfigurerAdapter{
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry
.addResourceHandler("/GMap/**")
.addResourceLocations("file:E://GMap/");
super.addResourceHandlers(registry);
}
}怎么回事呢?
慕容3067478
白板的微信
芜湖不芜
相关分类