在使用thymeleaf时,swagger2能够正常使用,将thymeleaf改成vue以后,swagger2页面报错html
/** * 发现若是继承了WebMvcConfigurationSupport,则在yml中配置的相关内容会失效。 须要从新指定静态资源 * * @param registry */ @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/**").addResourceLocations( "classpath:/static/"); registry.addResourceHandler("swagger-ui.html").addResourceLocations( "classpath:/META-INF/resources/"); registry.addResourceHandler("/webjars/**").addResourceLocations( "classpath:/META-INF/resources/webjars/"); super.addResourceHandlers(registry); }