@Configuration public class WebMvcConfiguration extends WebMvcConfigurationSupport { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); } }
springboot访问静态资源
内容版权声明:除非注明,否则皆为本站原创文章。