在springboot中集成swagger,ui界面没有出来,后台报错
swagger No mapping for GET /swagger-ui.html
查了下,需要在拦截器里面添加如下配置,
@Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}