使用WebMvcConfigurerAdapter的addResourceHandlers方法,映射外部资源失败:@SpringBootConfiguration
public class MySpringMVCConfig extends WebMvcConfigurerAdapter{
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry
.addResourceHandler("/GMap/**")
.addResourceLocations("file:E://GMap/");
super.addResourceHandlers(registry);
}
}怎么回事呢?
添加回答
举报
0/150
提交
取消