diff --git a/auth-center/auth-center-bootstrap/src/main/resources/application.yml b/auth-center/auth-center-bootstrap/src/main/resources/application.yml index 9c74cc3a..a7051463 100644 --- a/auth-center/auth-center-bootstrap/src/main/resources/application.yml +++ b/auth-center/auth-center-bootstrap/src/main/resources/application.yml @@ -7,8 +7,36 @@ server: context-path: spring: + application: + name: @project.parent.artifactId@ profiles: active: @environment@ + config: + import: "consul:${spring.cloud.consul.host}:${spring.cloud.consul.port}" + cloud: + # https://docs.spring.io/spring-cloud-consul/docs/current/reference/html/index.html#spring-cloud-consul-config + consul: + host: "should-be-passed-by-java-opts" + port: 8500 + config: + # `default-context` should not be modified, keeps "application" for common configuration. + # Properties in the config/application folder are applicable to all applications using consul for configuration. + profile-separator: "::" + format: YAML + data-key: "data" + watch: + enabled: true + delay: 1000 + prefixes: + - config + discovery: + register: true + instance-id: ${spring.application.name}-${spring.cloud.client.hostname}-${vcap.application.instance_id:${spring.application.instance_id:${random.value}}} + service-name: ${spring.application.name} + port: ${server.port} + prefer-ip-address: true + ip-address: ${spring.cloud.client.ip-address} + health-check-critical-timeout: 15s mvc: throw-exception-if-no-handler-found: true jackson: @@ -29,16 +57,6 @@ spring: # `file-size-threshold` specifies the size threshold after which files will be written to disk. # The default is 0. We set it as 0 too. file-size-threshold: 0 - cloud: - consul: - discovery: - register: true - instance-id: ${spring.application.name}-${spring.cloud.client.hostname}-${vcap.application.instance_id:${spring.application.instance_id:${random.value}}} - service-name: ${spring.application.name} - port: ${server.port} - prefer-ip-address: true - ip-address: ${spring.cloud.client.ip-address} - health-check-critical-timeout: 15s datasource: type: com.alibaba.druid.pool.DruidDataSource dynamic: @@ -148,6 +166,8 @@ mybatis-plus: logging: config: classpath:logback-configuration/logback-${spring.profiles.active}.xml + level: + org.springframework.boot.context.config: TRACE maf: project-properties: diff --git a/auth-center/auth-center-bootstrap/src/main/resources/bootstrap.yml b/auth-center/auth-center-bootstrap/src/main/resources/bootstrap.yml deleted file mode 100644 index 5fe4a997..00000000 --- a/auth-center/auth-center-bootstrap/src/main/resources/bootstrap.yml +++ /dev/null @@ -1,19 +0,0 @@ -spring: - application: - name: @project.artifactId@ - cloud: - consul: - host: "should-be-passed-by-java-opts" - port: 8500 - config: - enabled: true - # `default-context` should be equal to Spring application name - default-context: @project.artifactId@ - profile-separator: "::" - format: YAML - data-key: "data" - watch: - enabled: true - delay: 1000 - prefixes: - - config diff --git a/docker/configuration/micro-service/api-gateway/application.yml b/docker/configuration/micro-service-config-on-consul/api-gateway/application.yml similarity index 100% rename from docker/configuration/micro-service/api-gateway/application.yml rename to docker/configuration/micro-service-config-on-consul/api-gateway/application.yml diff --git a/auth-center/auth-center-bootstrap/src/main/resources/application-development-docker.yml b/docker/configuration/micro-service-config-on-consul/application/application-development-docker.yml similarity index 90% rename from auth-center/auth-center-bootstrap/src/main/resources/application-development-docker.yml rename to docker/configuration/micro-service-config-on-consul/application/application-development-docker.yml index 4a2b300a..734c3364 100644 --- a/auth-center/auth-center-bootstrap/src/main/resources/application-development-docker.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-development-docker.yml @@ -37,6 +37,13 @@ redis: port: 6379 password: maf@redis +minio: + endpoint: http://maf-minio + port: 9000 + access-key: maf_minio_root_user + secret-key: jm@minio + bucket-name: maf + maf: configuration: swagger-enabled: true diff --git a/auth-center/auth-center-bootstrap/src/main/resources/application-development-local.yml b/docker/configuration/micro-service-config-on-consul/application/application-development-local.yml similarity index 89% rename from auth-center/auth-center-bootstrap/src/main/resources/application-development-local.yml rename to docker/configuration/micro-service-config-on-consul/application/application-development-local.yml index bb71a0af..4931fefb 100644 --- a/auth-center/auth-center-bootstrap/src/main/resources/application-development-local.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-development-local.yml @@ -37,10 +37,12 @@ redis: port: 6380 password: maf@redis -logging: - level: - com.baomidou: DEBUG - com.jmsoftware: DEBUG +minio: + endpoint: http://localhost + port: 9000 + access-key: maf_minio_root_user + secret-key: jm@minio + bucket-name: maf maf: configuration: diff --git a/auth-center/auth-center-bootstrap/src/main/resources/application-production.yml b/docker/configuration/micro-service-config-on-consul/application/application-production.yml similarity index 90% rename from auth-center/auth-center-bootstrap/src/main/resources/application-production.yml rename to docker/configuration/micro-service-config-on-consul/application/application-production.yml index 92a642e5..07f05e69 100644 --- a/auth-center/auth-center-bootstrap/src/main/resources/application-production.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-production.yml @@ -37,6 +37,13 @@ redis: port: 6379 password: maf@redis +minio: + endpoint: http://maf-minio + port: 9000 + access-key: maf_minio_root_user + secret-key: jm@minio + bucket-name: maf + maf: configuration: swagger-enabled: false diff --git a/auth-center/auth-center-bootstrap/src/main/resources/application-stage.yml b/docker/configuration/micro-service-config-on-consul/application/application-stage.yml similarity index 90% rename from auth-center/auth-center-bootstrap/src/main/resources/application-stage.yml rename to docker/configuration/micro-service-config-on-consul/application/application-stage.yml index 92a642e5..07f05e69 100644 --- a/auth-center/auth-center-bootstrap/src/main/resources/application-stage.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-stage.yml @@ -37,6 +37,13 @@ redis: port: 6379 password: maf@redis +minio: + endpoint: http://maf-minio + port: 9000 + access-key: maf_minio_root_user + secret-key: jm@minio + bucket-name: maf + maf: configuration: swagger-enabled: false diff --git a/auth-center/auth-center-bootstrap/src/main/resources/application-test.yml b/docker/configuration/micro-service-config-on-consul/application/application-test.yml similarity index 90% rename from auth-center/auth-center-bootstrap/src/main/resources/application-test.yml rename to docker/configuration/micro-service-config-on-consul/application/application-test.yml index b000d2aa..4e302ccb 100644 --- a/auth-center/auth-center-bootstrap/src/main/resources/application-test.yml +++ b/docker/configuration/micro-service-config-on-consul/application/application-test.yml @@ -37,6 +37,13 @@ redis: port: 6379 password: maf@redis +minio: + endpoint: http://maf-minio + port: 9000 + 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/auth-center/application.yml b/docker/configuration/micro-service-config-on-consul/auth-center/application.yml similarity index 100% rename from docker/configuration/micro-service/auth-center/application.yml rename to docker/configuration/micro-service-config-on-consul/auth-center/application.yml diff --git a/docker/configuration/micro-service/maf-mis/application.yml b/docker/configuration/micro-service-config-on-consul/maf-mis/application.yml similarity index 100% rename from docker/configuration/micro-service/maf-mis/application.yml rename to docker/configuration/micro-service-config-on-consul/maf-mis/application.yml diff --git a/docker/configuration/micro-service/oss-center/application.yml b/docker/configuration/micro-service-config-on-consul/oss-center/application.yml similarity index 100% rename from docker/configuration/micro-service/oss-center/application.yml rename to docker/configuration/micro-service-config-on-consul/oss-center/application.yml diff --git a/docker/configuration/micro-service/spring-boot-admin/application.yml b/docker/configuration/micro-service-config-on-consul/spring-boot-admin/application.yml similarity index 100% rename from docker/configuration/micro-service/spring-boot-admin/application.yml rename to docker/configuration/micro-service-config-on-consul/spring-boot-admin/application.yml