出错原因:
复制代码:
@SpringBootApplication
@EnableWebMvc
public class TestApplication implements WebMvcConfigurer {
public static void main(String[] args) {
SpringApplication.run(TestApplication.class, args);
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
}
}问题解决
