From b03377d1c3d1040a4ecfdb254685ba64058bc43f Mon Sep 17 00:00:00 2001 From: "Johnny Miller (ZA)" Date: Thu, 3 Feb 2022 13:33:58 +0800 Subject: [PATCH] perf($OpenAPI): disable OpenAPI in `stage` and `production` --- .../application/application-development-docker.yml | 9 +++++---- .../application/application-development-local.yml | 9 +++++---- .../application/application-production.yml | 11 ++++++++--- .../application/application-stage.yml | 11 ++++++++--- .../application/application-test.yml | 9 +++++---- .../main/resources/application-development-docker.yml | 4 ---- .../main/resources/application-development-local.yml | 4 ---- maf-mis/src/main/resources/application-production.yml | 4 ---- maf-mis/src/main/resources/application-stage.yml | 4 ---- maf-mis/src/main/resources/application-test.yml | 4 ---- .../main/resources/application-development-local.yml | 4 ---- .../src/main/resources/application-production.yml | 4 ---- oss-center/src/main/resources/application-stage.yml | 4 ---- oss-center/src/main/resources/application-test.yml | 4 ---- .../property/MafConfigurationProperties.java | 5 ----- 15 files changed, 31 insertions(+), 59 deletions(-) diff --git a/docker/configuration/micro-service-config-on-consul/application/application-development-docker.yml b/docker/configuration/micro-service-config-on-consul/application/application-development-docker.yml index 734c3364..4fa965de 100644 --- a/docker/configuration/micro-service-config-on-consul/application/application-development-docker.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-development-docker.yml @@ -1,3 +1,8 @@ +# https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/index.html#spring-cloud-consul-config +# 1. Multiple PropertySource instances are created based on the application’s name and the active profiles +# that mimics the Spring Cloud Config order of resolving properties. +# 2. Properties in the config/application folder are applicable to all applications using consul for configuration. + spring: zipkin: base-url: http://maf-zipkin:9411 @@ -43,7 +48,3 @@ minio: access-key: maf_minio_root_user secret-key: jm@minio bucket-name: maf - -maf: - configuration: - swagger-enabled: true diff --git a/docker/configuration/micro-service-config-on-consul/application/application-development-local.yml b/docker/configuration/micro-service-config-on-consul/application/application-development-local.yml index 4931fefb..2bf52c80 100644 --- a/docker/configuration/micro-service-config-on-consul/application/application-development-local.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-development-local.yml @@ -1,3 +1,8 @@ +# https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/index.html#spring-cloud-consul-config +# 1. Multiple PropertySource instances are created based on the application’s name and the active profiles +# that mimics the Spring Cloud Config order of resolving properties. +# 2. Properties in the config/application folder are applicable to all applications using consul for configuration. + spring: zipkin: base-url: http://localhost:9411 @@ -43,7 +48,3 @@ minio: access-key: maf_minio_root_user secret-key: jm@minio bucket-name: maf - -maf: - configuration: - swagger-enabled: true diff --git a/docker/configuration/micro-service-config-on-consul/application/application-production.yml b/docker/configuration/micro-service-config-on-consul/application/application-production.yml index 07f05e69..55cfc35a 100644 --- a/docker/configuration/micro-service-config-on-consul/application/application-production.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-production.yml @@ -1,3 +1,8 @@ +# https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/index.html#spring-cloud-consul-config +# 1. Multiple PropertySource instances are created based on the application’s name and the active profiles +# that mimics the Spring Cloud Config order of resolving properties. +# 2. Properties in the config/application folder are applicable to all applications using consul for configuration. + spring: zipkin: base-url: http://maf-zipkin:9411 @@ -44,6 +49,6 @@ minio: secret-key: jm@minio bucket-name: maf -maf: - configuration: - swagger-enabled: false +springdoc: + api-docs: + enabled: false diff --git a/docker/configuration/micro-service-config-on-consul/application/application-stage.yml b/docker/configuration/micro-service-config-on-consul/application/application-stage.yml index 07f05e69..55cfc35a 100644 --- a/docker/configuration/micro-service-config-on-consul/application/application-stage.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-stage.yml @@ -1,3 +1,8 @@ +# https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/index.html#spring-cloud-consul-config +# 1. Multiple PropertySource instances are created based on the application’s name and the active profiles +# that mimics the Spring Cloud Config order of resolving properties. +# 2. Properties in the config/application folder are applicable to all applications using consul for configuration. + spring: zipkin: base-url: http://maf-zipkin:9411 @@ -44,6 +49,6 @@ minio: secret-key: jm@minio bucket-name: maf -maf: - configuration: - swagger-enabled: false +springdoc: + api-docs: + enabled: false diff --git a/docker/configuration/micro-service-config-on-consul/application/application-test.yml b/docker/configuration/micro-service-config-on-consul/application/application-test.yml index 4e302ccb..cc6239d1 100644 --- a/docker/configuration/micro-service-config-on-consul/application/application-test.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-test.yml @@ -1,3 +1,8 @@ +# https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/index.html#spring-cloud-consul-config +# 1. Multiple PropertySource instances are created based on the application’s name and the active profiles +# that mimics the Spring Cloud Config order of resolving properties. +# 2. Properties in the config/application folder are applicable to all applications using consul for configuration. + spring: zipkin: base-url: http://maf-zipkin:9411 @@ -43,7 +48,3 @@ minio: access-key: maf_minio_root_user secret-key: jm@minio bucket-name: maf - -maf: - configuration: - swagger-enabled: true diff --git a/maf-mis/src/main/resources/application-development-docker.yml b/maf-mis/src/main/resources/application-development-docker.yml index 4a2b300a..c39f8a45 100644 --- a/maf-mis/src/main/resources/application-development-docker.yml +++ b/maf-mis/src/main/resources/application-development-docker.yml @@ -36,7 +36,3 @@ redis: - host: maf-redis-slave-1 port: 6379 password: maf@redis - -maf: - configuration: - swagger-enabled: true diff --git a/maf-mis/src/main/resources/application-development-local.yml b/maf-mis/src/main/resources/application-development-local.yml index 3795c984..acba65e6 100644 --- a/maf-mis/src/main/resources/application-development-local.yml +++ b/maf-mis/src/main/resources/application-development-local.yml @@ -36,7 +36,3 @@ redis: - host: localhost port: 6380 password: maf@redis - -maf: - configuration: - swagger-enabled: true diff --git a/maf-mis/src/main/resources/application-production.yml b/maf-mis/src/main/resources/application-production.yml index 92a642e5..578ec104 100644 --- a/maf-mis/src/main/resources/application-production.yml +++ b/maf-mis/src/main/resources/application-production.yml @@ -36,7 +36,3 @@ redis: - host: maf-redis-slave-1 port: 6379 password: maf@redis - -maf: - configuration: - swagger-enabled: false diff --git a/maf-mis/src/main/resources/application-stage.yml b/maf-mis/src/main/resources/application-stage.yml index 92a642e5..578ec104 100644 --- a/maf-mis/src/main/resources/application-stage.yml +++ b/maf-mis/src/main/resources/application-stage.yml @@ -36,7 +36,3 @@ redis: - host: maf-redis-slave-1 port: 6379 password: maf@redis - -maf: - configuration: - swagger-enabled: false diff --git a/maf-mis/src/main/resources/application-test.yml b/maf-mis/src/main/resources/application-test.yml index b000d2aa..578ec104 100644 --- a/maf-mis/src/main/resources/application-test.yml +++ b/maf-mis/src/main/resources/application-test.yml @@ -36,7 +36,3 @@ redis: - host: maf-redis-slave-1 port: 6379 password: maf@redis - -maf: - configuration: - swagger-enabled: true diff --git a/oss-center/src/main/resources/application-development-local.yml b/oss-center/src/main/resources/application-development-local.yml index 5a2e93c1..2ba8b702 100644 --- a/oss-center/src/main/resources/application-development-local.yml +++ b/oss-center/src/main/resources/application-development-local.yml @@ -14,10 +14,6 @@ redis: port: 6380 password: maf@redis -maf: - configuration: - swagger-enabled: true - minio: endpoint: http://localhost port: 9900 diff --git a/oss-center/src/main/resources/application-production.yml b/oss-center/src/main/resources/application-production.yml index e5478b2a..4ff775ba 100644 --- a/oss-center/src/main/resources/application-production.yml +++ b/oss-center/src/main/resources/application-production.yml @@ -14,10 +14,6 @@ redis: port: 6379 password: maf@redis -maf: - configuration: - swagger-enabled: false - minio: endpoint: http://maf-minio port: 9000 diff --git a/oss-center/src/main/resources/application-stage.yml b/oss-center/src/main/resources/application-stage.yml index e5478b2a..4ff775ba 100644 --- a/oss-center/src/main/resources/application-stage.yml +++ b/oss-center/src/main/resources/application-stage.yml @@ -14,10 +14,6 @@ redis: port: 6379 password: maf@redis -maf: - configuration: - swagger-enabled: false - minio: endpoint: http://maf-minio port: 9000 diff --git a/oss-center/src/main/resources/application-test.yml b/oss-center/src/main/resources/application-test.yml index 1e1b2ebf..4ff775ba 100644 --- a/oss-center/src/main/resources/application-test.yml +++ b/oss-center/src/main/resources/application-test.yml @@ -14,10 +14,6 @@ redis: port: 6379 password: maf@redis -maf: - configuration: - swagger-enabled: true - minio: endpoint: http://maf-minio port: 9000 diff --git a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/property/MafConfigurationProperties.java b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/property/MafConfigurationProperties.java index 51cb5049..4bb342e9 100644 --- a/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/property/MafConfigurationProperties.java +++ b/spring-cloud-starter/src/main/java/com/jmsoftware/maf/springcloudstarter/property/MafConfigurationProperties.java @@ -67,11 +67,6 @@ public class MafConfigurationProperties { */ @NotBlank private String includedPackageForHttpApiScan; - /** - * Swagger switch. true: enabled; false: disabled. - */ - @NotNull - private Boolean swaggerEnabled = Boolean.TRUE; /** * Flatten ignored urls string [ ].