0
可以同時使用以下配置嗎?將WebMvcConfigurerAdapter與基於xml的<mvc:resources />配置混合
<mvc:resources mapping="/static/**" location="/static/, classpath:/static/"/>
和
@Configuration
@EnableWebMvc
public class ResourceMappingsAdapter extends WebMvcConfigurerAdapter {
...
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/anotherStatic/", "file:///...");
}
映射從WebMvcConfigurerAdapter增加似乎並沒有爲服務內容。