Procházet zdrojové kódy

:tada: swagger聚合网关迁移至全新的blade-swagger服务

smallchill před 5 roky
rodič
revize
c6e0ff0148
23 změnil soubory, kde provedl 151 přidání a 348 odebrání
  1. 0 24
      blade-gateway/pom.xml
  2. 1 23
      blade-gateway/src/main/java/org/springblade/gateway/config/RouterFunctionConfiguration.java
  3. 4 0
      blade-gateway/src/main/java/org/springblade/gateway/handler/ErrorExceptionHandler.java
  4. 0 55
      blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerResourceHandler.java
  5. 0 52
      blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerSecurityHandler.java
  6. 0 52
      blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerUiHandler.java
  7. 0 38
      blade-gateway/src/main/java/org/springblade/gateway/props/RouteProperties.java
  8. 0 59
      blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java
  9. 15 0
      blade-ops/blade-swagger/Dockerfile
  10. 56 0
      blade-ops/blade-swagger/pom.xml
  11. 10 19
      blade-ops/blade-swagger/src/main/java/org/springblade/swagger/SwaggerApplication.java
  12. 12 0
      blade-ops/blade-swagger/src/main/resources/application-dev.yml
  13. 12 0
      blade-ops/blade-swagger/src/main/resources/application-prod.yml
  14. 12 0
      blade-ops/blade-swagger/src/main/resources/application-test.yml
  15. 6 0
      blade-ops/blade-swagger/src/main/resources/application.yml
  16. 8 0
      blade-ops/blade-swagger/src/main/resources/banner.txt
  17. 1 0
      blade-ops/pom.xml
  18. 0 8
      doc/nacos/blade-dev.yaml
  19. 0 8
      doc/nacos/blade-prod.yaml
  20. 0 8
      doc/nacos/blade-test.yaml
  21. 1 1
      doc/nacos/blade.yaml
  22. 2 1
      script/docker/app/deploy.sh
  23. 11 0
      script/docker/app/docker-compose.yml

+ 0 - 24
blade-gateway/pom.xml

@@ -81,30 +81,6 @@
             <groupId>com.alibaba.cloud</groupId>
             <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
         </dependency>
-        <!--Swagger-->
-        <dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger2</artifactId>
-            <exclusions>
-                <exclusion>
-                    <groupId>io.swagger</groupId>
-                    <artifactId>swagger-models</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>io.swagger</groupId>
-            <artifactId>swagger-models</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.github.xiaoymin</groupId>
-            <artifactId>knife4j-spring-ui</artifactId>
-        </dependency>
-        <!--<dependency>
-            <groupId>io.springfox</groupId>
-            <artifactId>springfox-swagger-ui</artifactId>
-            <version>${swagger.version}</version>
-        </dependency>-->
     </dependencies>
 
     <build>

+ 1 - 23
blade-gateway/src/main/java/org/springblade/gateway/config/RouterFunctionConfiguration.java

@@ -18,24 +18,16 @@ package org.springblade.gateway.config;
 
 import lombok.AllArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springblade.gateway.handler.SwaggerResourceHandler;
-import org.springblade.gateway.handler.SwaggerSecurityHandler;
-import org.springblade.gateway.handler.SwaggerUiHandler;
 import org.springblade.gateway.props.AuthProperties;
-import org.springblade.gateway.props.RouteProperties;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
 import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
 import org.springframework.http.server.reactive.ServerHttpRequest;
 import org.springframework.http.server.reactive.ServerHttpResponse;
 import org.springframework.web.cors.reactive.CorsUtils;
-import org.springframework.web.reactive.function.server.RequestPredicates;
-import org.springframework.web.reactive.function.server.RouterFunction;
-import org.springframework.web.reactive.function.server.RouterFunctions;
 import org.springframework.web.server.ServerWebExchange;
 import org.springframework.web.server.WebFilter;
 import org.springframework.web.server.WebFilterChain;
@@ -49,13 +41,9 @@ import reactor.core.publisher.Mono;
 @Slf4j
 @Configuration
 @AllArgsConstructor
-@EnableConfigurationProperties({RouteProperties.class, AuthProperties.class})
+@EnableConfigurationProperties({AuthProperties.class})
 public class RouterFunctionConfiguration {
 
-	private final SwaggerResourceHandler swaggerResourceHandler;
-	private final SwaggerSecurityHandler swaggerSecurityHandler;
-	private final SwaggerUiHandler swaggerUiHandler;
-
 	/**
 	 * 这里为支持的请求头,如果有自定义的header字段请自己添加
 	 */
@@ -90,14 +78,4 @@ public class RouterFunctionConfiguration {
 		};
 	}
 
-	@Bean
-	public RouterFunction routerFunction() {
-		return RouterFunctions.route(RequestPredicates.GET("/swagger-resources")
-			.and(RequestPredicates.accept(MediaType.ALL)), swaggerResourceHandler)
-			.andRoute(RequestPredicates.GET("/swagger-resources/configuration/ui")
-				.and(RequestPredicates.accept(MediaType.ALL)), swaggerUiHandler)
-			.andRoute(RequestPredicates.GET("/swagger-resources/configuration/security")
-				.and(RequestPredicates.accept(MediaType.ALL)), swaggerSecurityHandler);
-	}
-
 }

+ 4 - 0
blade-gateway/src/main/java/org/springblade/gateway/handler/ErrorExceptionHandler.java

@@ -84,6 +84,10 @@ public class ErrorExceptionHandler extends DefaultErrorWebExceptionHandler {
 	 * @return
 	 */
 	private String buildMessage(ServerRequest request, Throwable ex) {
+		String uri = request.uri().toString();
+		if (uri.endsWith("doc.html")) {
+			return "[Swagger聚合网关] 已迁移至 [blade-swagger] 服务,请开启 [blade-swagger] 服务并访问 [http://127.0.0.1:18000/doc.html]";
+		}
 		StringBuilder message = new StringBuilder("Failed to handle request [");
 		message.append(request.methodName());
 		message.append(" ");

+ 0 - 55
blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerResourceHandler.java

@@ -1,55 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-
-package org.springblade.gateway.handler;
-
-import lombok.AllArgsConstructor;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-import org.springframework.web.reactive.function.BodyInserters;
-import org.springframework.web.reactive.function.server.HandlerFunction;
-import org.springframework.web.reactive.function.server.ServerRequest;
-import org.springframework.web.reactive.function.server.ServerResponse;
-import reactor.core.publisher.Mono;
-import springfox.documentation.swagger.web.SwaggerResourcesProvider;
-
-/**
- * SwaggerResourceHandler
- *
- * @author lengleng
- */
-@Slf4j
-@Component
-@AllArgsConstructor
-public class SwaggerResourceHandler implements HandlerFunction<ServerResponse> {
-	private final SwaggerResourcesProvider swaggerResources;
-
-	/**
-	 * Handle the given request.
-	 *
-	 * @param request the request to handler
-	 * @return the response
-	 */
-	@Override
-	public Mono<ServerResponse> handle(ServerRequest request) {
-		return ServerResponse.status(HttpStatus.OK)
-			.contentType(MediaType.APPLICATION_JSON)
-			.body(BodyInserters.fromValue(swaggerResources.get()));
-	}
-}

+ 0 - 52
blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerSecurityHandler.java

@@ -1,52 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-
-package org.springblade.gateway.handler;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-import org.springframework.web.reactive.function.BodyInserters;
-import org.springframework.web.reactive.function.server.HandlerFunction;
-import org.springframework.web.reactive.function.server.ServerRequest;
-import org.springframework.web.reactive.function.server.ServerResponse;
-import reactor.core.publisher.Mono;
-import springfox.documentation.swagger.web.SecurityConfigurationBuilder;
-
-/**
- * SwaggerSecurityHandler
- *
- * @author lengleng
- */
-@Slf4j
-@Component
-public class SwaggerSecurityHandler implements HandlerFunction<ServerResponse> {
-
-	/**
-	 * Handle the given request.
-	 *
-	 * @param request the request to handler
-	 * @return the response
-	 */
-	@Override
-	public Mono<ServerResponse> handle(ServerRequest request) {
-		return ServerResponse.status(HttpStatus.OK)
-			.contentType(MediaType.APPLICATION_JSON)
-			.body(BodyInserters.fromValue(SecurityConfigurationBuilder.builder().build()));
-	}
-}

+ 0 - 52
blade-gateway/src/main/java/org/springblade/gateway/handler/SwaggerUiHandler.java

@@ -1,52 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-
-package org.springblade.gateway.handler;
-
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.stereotype.Component;
-import org.springframework.web.reactive.function.BodyInserters;
-import org.springframework.web.reactive.function.server.HandlerFunction;
-import org.springframework.web.reactive.function.server.ServerRequest;
-import org.springframework.web.reactive.function.server.ServerResponse;
-import reactor.core.publisher.Mono;
-import springfox.documentation.swagger.web.UiConfigurationBuilder;
-
-/**
- * SwaggerUiHandler
- *
- * @author lengleng
- */
-@Slf4j
-@Component
-public class SwaggerUiHandler implements HandlerFunction<ServerResponse> {
-
-	/**
-	 * Handle the given request.
-	 *
-	 * @param request the request to handler
-	 * @return the response
-	 */
-	@Override
-	public Mono<ServerResponse> handle(ServerRequest request) {
-		return ServerResponse.status(HttpStatus.OK)
-			.contentType(MediaType.APPLICATION_JSON)
-			.body(BodyInserters.fromValue(UiConfigurationBuilder.builder().build()));
-	}
-}

+ 0 - 38
blade-gateway/src/main/java/org/springblade/gateway/props/RouteProperties.java

@@ -1,38 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.gateway.props;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 路由配置类
- *
- * @author Chill
- */
-@Data
-@RefreshScope
-@ConfigurationProperties("blade.document")
-public class RouteProperties {
-
-	private final List<RouteResource> resources = new ArrayList<>();
-
-}

+ 0 - 59
blade-gateway/src/main/java/org/springblade/gateway/provider/SwaggerProvider.java

@@ -1,59 +0,0 @@
-/*
- *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
- *
- *  Redistribution and use in source and binary forms, with or without
- *  modification, are permitted provided that the following conditions are met:
- *
- *  Redistributions of source code must retain the above copyright notice,
- *  this list of conditions and the following disclaimer.
- *  Redistributions in binary form must reproduce the above copyright
- *  notice, this list of conditions and the following disclaimer in the
- *  documentation and/or other materials provided with the distribution.
- *  Neither the name of the dreamlu.net developer nor the names of its
- *  contributors may be used to endorse or promote products derived from
- *  this software without specific prior written permission.
- *  Author: Chill 庄骞 (smallchill@163.com)
- */
-package org.springblade.gateway.provider;
-
-import lombok.AllArgsConstructor;
-import org.springblade.gateway.props.RouteProperties;
-import org.springblade.gateway.props.RouteResource;
-import org.springframework.context.annotation.Primary;
-import org.springframework.stereotype.Component;
-import springfox.documentation.swagger.web.SwaggerResource;
-import springfox.documentation.swagger.web.SwaggerResourcesProvider;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * 聚合接口文档注册
- *
- * @author Chill
- */
-@Primary
-@Component
-@AllArgsConstructor
-public class SwaggerProvider implements SwaggerResourcesProvider {
-	private static final String API_URI = "/v2/api-docs";
-
-	private final RouteProperties routeProperties;
-
-	@Override
-	public List<SwaggerResource> get() {
-		List<SwaggerResource> resources = new ArrayList<>();
-		List<RouteResource> routeResources = routeProperties.getResources();
-		routeResources.forEach(routeResource -> resources.add(swaggerResource(routeResource)));
-		return resources;
-	}
-
-	private SwaggerResource swaggerResource(RouteResource routeResource) {
-		SwaggerResource swaggerResource = new SwaggerResource();
-		swaggerResource.setName(routeResource.getName());
-		swaggerResource.setLocation(routeResource.getLocation().concat(API_URI));
-		swaggerResource.setSwaggerVersion(routeResource.getVersion());
-		return swaggerResource;
-	}
-
-}

+ 15 - 0
blade-ops/blade-swagger/Dockerfile

@@ -0,0 +1,15 @@
+FROM adoptopenjdk/openjdk8-openj9:alpine-slim
+
+MAINTAINER smallchill@163.com
+
+RUN mkdir -p /blade/swagger
+
+WORKDIR /blade/swagger
+
+EXPOSE 18000
+
+ADD ./target/blade-swagger.jar ./app.jar
+
+ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"]
+
+CMD ["--spring.profiles.active=test"]

+ 56 - 0
blade-ops/blade-swagger/pom.xml

@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>blade-ops</artifactId>
+        <groupId>org.springblade</groupId>
+        <version>2.7.1.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>blade-swagger</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${bladex.project.version}</version>
+    <packaging>jar</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-cloud</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.xiaoymin</groupId>
+            <artifactId>knife4j-aggregation-spring-boot-starter</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <configuration>
+                    <username>${docker.username}</username>
+                    <password>${docker.password}</password>
+                    <repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository>
+                    <tag>${project.version}</tag>
+                    <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                    <buildArgs>
+                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 10 - 19
blade-gateway/src/main/java/org/springblade/gateway/props/RouteResource.java → blade-ops/blade-swagger/src/main/java/org/springblade/swagger/SwaggerApplication.java

@@ -14,32 +14,23 @@
  *  this software without specific prior written permission.
  *  Author: Chill 庄骞 (smallchill@163.com)
  */
-package org.springblade.gateway.props;
+package org.springblade.swagger;
 
-import lombok.Data;
+
+import org.springblade.core.launch.BladeApplication;
 import org.springblade.core.launch.constant.AppConstant;
+import org.springframework.cloud.client.SpringCloudApplication;
 
 /**
- * Swagger聚合文档属性
+ * swagger聚合启动器
  *
  * @author Chill
  */
-@Data
-public class RouteResource {
-
-	/**
-	 * 文档名
-	 */
-	private String name;
-
-	/**
-	 * 文档所在服务地址
-	 */
-	private String location;
+@SpringCloudApplication
+public class SwaggerApplication {
 
-	/**
-	 * 文档版本
-	 */
-	private String version = AppConstant.APPLICATION_VERSION;
+	public static void main(String[] args) {
+		BladeApplication.run(AppConstant.APPLICATION_SWAGGER_NAME, SwaggerApplication.class, args);
+	}
 
 }

+ 12 - 0
blade-ops/blade-swagger/src/main/resources/application-dev.yml

@@ -0,0 +1,12 @@
+knife4j:
+  cloud:
+    routes:
+      - name: 授权模块
+        uri: 127.0.0.1
+        location: /blade-auth/v2/api-docs
+      - name: 工作台模块
+        uri: 127.0.0.1
+        location: /blade-desk/v2/api-docs
+      - name: 系统模块
+        uri: 127.0.0.1
+        location: /blade-system/v2/api-docs

+ 12 - 0
blade-ops/blade-swagger/src/main/resources/application-prod.yml

@@ -0,0 +1,12 @@
+knife4j:
+  cloud:
+    routes:
+      - name: 授权模块
+        uri: 192.168.0.157
+        location: /blade-auth/v2/api-docs
+      - name: 工作台模块
+        uri: 192.168.0.157
+        location: /blade-desk/v2/api-docs
+      - name: 系统模块
+        uri: 192.168.0.157
+        location: /blade-system/v2/api-docs

+ 12 - 0
blade-ops/blade-swagger/src/main/resources/application-test.yml

@@ -0,0 +1,12 @@
+knife4j:
+  cloud:
+    routes:
+      - name: 授权模块
+        uri: 192.168.0.157
+        location: /blade-auth/v2/api-docs
+      - name: 工作台模块
+        uri: 192.168.0.157
+        location: /blade-desk/v2/api-docs
+      - name: 系统模块
+        uri: 192.168.0.157
+        location: /blade-system/v2/api-docs

+ 6 - 0
blade-ops/blade-swagger/src/main/resources/application.yml

@@ -0,0 +1,6 @@
+server:
+  port: 18000
+knife4j:
+  enableAggregation: true
+  cloud:
+    enable: true

+ 8 - 0
blade-ops/blade-swagger/src/main/resources/banner.txt

@@ -0,0 +1,8 @@
+${AnsiColor.BLUE}                   ______  _             _       ___   ___
+${AnsiColor.BLUE}                   | ___ \| |           | |      \  \ /  /
+${AnsiColor.BLUE}                   | |_/ /| |  __ _   __| |  ___  \  V  /
+${AnsiColor.BLUE}                   | ___ \| | / _` | / _` | / _ \   > <
+${AnsiColor.BLUE}                   | |_/ /| || (_| || (_| ||  __/ /  .  \
+${AnsiColor.BLUE}                   \____/ |_| \__,_| \__,_| \___|/__/ \__\
+
+${AnsiColor.BLUE}:: BladeX ${blade.service.version} :: ${spring.application.name}:${AnsiColor.RED}${blade.env}${AnsiColor.BLUE} :: Running SpringBoot ${spring-boot.version} :: ${AnsiColor.BRIGHT_BLACK}

+ 1 - 0
blade-ops/pom.xml

@@ -22,6 +22,7 @@
         <module>blade-log</module>
         <module>blade-report</module>
         <module>blade-resource</module>
+        <module>blade-swagger</module>
         <module>blade-turbine</module>
         <module>blade-xxljob</module>
         <module>blade-xxljob-admin</module>

+ 0 - 8
doc/nacos/blade-dev.yaml

@@ -56,11 +56,3 @@ blade:
       #url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bladex
       #username: bladex
       #password: bladex
-  document:
-    resources:
-      - name: 授权模块
-        location: /blade-auth
-      - name: 工作台模块
-        location: /blade-desk
-      - name: 系统模块
-        location: /blade-system

+ 0 - 8
doc/nacos/blade-prod.yaml

@@ -39,11 +39,3 @@ blade:
       url: jdbc:mysql://192.168.0.157:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
       username: root
       password: root
-  document:
-    resources:
-      - name: 授权模块
-        location: /blade-auth
-      - name: 工作台模块
-        location: /blade-desk
-      - name: 系统模块
-        location: /blade-system

+ 0 - 8
doc/nacos/blade-test.yaml

@@ -37,11 +37,3 @@ blade:
       url: jdbc:mysql://192.168.0.157:3306/bladex?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&allowPublicKeyRetrieval=true
       username: root
       password: root
-  document:
-    resources:
-      - name: 授权模块
-        location: /blade-auth
-      - name: 工作台模块
-        location: /blade-desk
-      - name: 系统模块
-        location: /blade-system

+ 1 - 1
doc/nacos/blade.yaml

@@ -88,7 +88,7 @@ knife4j:
     language: zh-CN
     enableFooter: false
     enableFooterCustom: true
-    footerCustomContent: Copyright © 2020 BladeX All Rights Reserved
+    footerCustomContent: Copyright © 2021 BladeX All Rights Reserved
 
 #swagger公共信息
 swagger:

+ 2 - 1
script/docker/app/deploy.sh

@@ -17,6 +17,7 @@ port(){
 	firewall-cmd --add-port=7003/tcp --permanent
 	firewall-cmd --add-port=9411/tcp --permanent
 	firewall-cmd --add-port=9999/tcp --permanent
+	firewall-cmd --add-port=18000/tcp --permanent
 	service firewalld restart
 }
 
@@ -49,7 +50,7 @@ monitor(){
 
 #启动程序模块
 modules(){
-	docker-compose up -d blade-gateway1 blade-gateway2 blade-auth1 blade-auth2 blade-report blade-user blade-desk blade-system blade-log blade-flow blade-flow-design blade-resource
+	docker-compose up -d blade-gateway1 blade-gateway2 blade-auth1 blade-auth2 blade-swagger blade-report blade-user blade-desk blade-system blade-log blade-flow blade-flow-design blade-resource
 }
 
 #关闭所有模块

+ 11 - 0
script/docker/app/docker-compose.yml

@@ -95,6 +95,17 @@ services:
     networks:
     - blade_net
 
+  blade-swagger:
+    image: "${REGISTER}/blade/blade-swagger:${TAG}"
+    environment:
+      - TZ=Asia/Shanghai
+    ports:
+      - 18000:18000
+    privileged: true
+    restart: always
+    networks:
+      - blade_net
+
   blade-turbine:
     image: "${REGISTER}/blade/blade-turbine:${TAG}"
     environment: