若依是不错的框架, 里面功能齐全,但是其中的swagger 太low了 ,我们对其进行改造
修改后如下:
第一步: (之前缺少 一个)
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.6</version>
</dependency>
第二步:
修改菜单
完成.
如果你想要不登陆系统,直接进入到swagger,需要在ShiroConfig中加入放行代码
filterChainDefinitionMap.put("/doc.html", "anon");
filterChainDefinitionMap.put("/webjars/**", "anon");
filterChainDefinitionMap.put("/swagger-resources", "anon");
然后在首页上就可以直接 项目地址+端口/doc.html 来访问.