?因?yàn)槭浅醪绞褂酶饰睿宰约簠⒖几鞣N文章(主要是swagger的官網(wǎng)感覺找不到路H槿啤!)瓦堵,所以參考了網(wǎng)上的http://blog.didispace.com/springbootswagger2/
?但是在輸入http://localhost:9001/swagger-ui.html時(shí),后臺(tái)都是找不到路徑歌亲。所以查了查菇用,原來是需要在springMVC中加入如下代碼
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
}