spring boot设置多个静态资源目录

@Configuration
public class AcbplatformConfigurer
extends WebMvcConfigurerAdapter 
{

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**").addResourceLocations("classpath:static/");
//        无效registry.addResourceHandler("/3.0/**").addResourceLocations("/WEB-INF/classes/static2.0/");
//        无效registry.addResourceHandler("/4.0/**").addResourceLocations("static2.0/");
        super.addResourceHandlers(registry);
    }
}
展开阅读全文

没有更多推荐了,返回首页