Selaa lähdekoodia

修改api接口文档ui为swagger-bootstrap-ui

musheng 6 vuotta sitten
vanhempi
commit
fbd22a4117

+ 8 - 3
pom.xml

@@ -357,16 +357,21 @@
 			<optional>true</optional>
 		</dependency>
 
-		<!--swagger2 -->
+		<!-- swagger -->
 		<dependency>
 			<groupId>io.springfox</groupId>
 			<artifactId>springfox-swagger2</artifactId>
-			<version>2.6.1</version>
+			<version>2.9.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.github.xiaoymin</groupId>
+			<artifactId>swagger-bootstrap-ui</artifactId>
+			<version>1.8.2</version>
 		</dependency>
 		<dependency>
 			<groupId>io.springfox</groupId>
 			<artifactId>springfox-swagger-ui</artifactId>
-			<version>2.6.1</version>
+			<version>2.9.2</version>
 		</dependency>
 
 		<dependency>

+ 1 - 1
src/main/java/com/ifast/shiro/config/ShiroConfig.java

@@ -147,7 +147,7 @@ public class ShiroConfig {
         shiroFilterFactoryBean.setUnauthorizedUrl("/shiro/405");
         LinkedHashMap<String, String> filterChainDefinitionMap = new LinkedHashMap<>();
         filterChainDefinitionMap.put("/api/**", "jwt"); // api
-        filterChainDefinitionMap.put("/swagger-ui.html**", "anon");
+        filterChainDefinitionMap.put("/doc.html**", "anon");
         filterChainDefinitionMap.put("/swagger-resources/**", "anon");
         filterChainDefinitionMap.put("/webjars/**", "anon");
         filterChainDefinitionMap.put("/v2/**", "anon");

+ 1 - 1
src/main/resources/application-dev.yml

@@ -12,7 +12,7 @@ ifast:
     description: 开发人员太懒,没有写描述
     contactName: Aron
     contactEmail: izenglong@163.com
-    contactUrl: http://ifast.site/swagger-ui.html
+    contactUrl: http://ifast.site/doc.html
   shiro:
     jsessionidKey: SESSION
     sessionKeyPrefix: ifast:session

+ 1 - 1
src/main/resources/application-prod.yml

@@ -12,7 +12,7 @@ ifast:
     description: 开发人员太懒,没有写描述
     contactName: Aron
     contactEmail: izenglong@163.com
-    contactUrl: http://ifast.site/swagger-ui.html
+    contactUrl: http://ifast.site/doc.html
   shiro:
     jsessionidKey: SESSION
     sessionKeyPrefix: ifast:session