From 3a0c0cf956c1034ac920e689486892ceedcc65ca Mon Sep 17 00:00:00 2001 From: bvn13 <from.github@bvn13.me> Date: Fri, 28 Feb 2025 02:54:53 +0300 Subject: [PATCH] more flexible configurationing --- config/{application.yaml => application-dev.yaml} | 2 -- docker-compose.yaml | 3 ++- service/src/main/resources/application-example.yaml | 8 ++++++++ service/src/main/resources/application.yaml | 9 --------- service/src/main/resources/banner.txt | 10 ++++++++++ 5 files changed, 20 insertions(+), 12 deletions(-) rename config/{application.yaml => application-dev.yaml} (97%) create mode 100644 service/src/main/resources/application-example.yaml create mode 100644 service/src/main/resources/banner.txt diff --git a/config/application.yaml b/config/application-dev.yaml similarity index 97% rename from config/application.yaml rename to config/application-dev.yaml index 117b5c6..1bd47c5 100644 --- a/config/application.yaml +++ b/config/application-dev.yaml @@ -3,8 +3,6 @@ server: spring: application: name: jateway - profiles: - active: dev cloud: gateway: routes: diff --git a/docker-compose.yaml b/docker-compose.yaml index 08e5c67..bbde1b2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -9,6 +9,7 @@ services: ports: - 8080:8080 environment: - - SPRING_CONFIG_LOCATION=/app/config/application.yaml + - SPRING_PROFILES_ACTIVE=default,example + - SPRING_CONFIG_ADDITIONAL_LOCATION=/app/config/ volumes: - ./config:/app/config diff --git a/service/src/main/resources/application-example.yaml b/service/src/main/resources/application-example.yaml new file mode 100644 index 0000000..0fd9b7e --- /dev/null +++ b/service/src/main/resources/application-example.yaml @@ -0,0 +1,8 @@ +spring: + cloud: + gateway: + routes: + - id: simple_route + uri: http://example.com + predicates: + - Method=GET diff --git a/service/src/main/resources/application.yaml b/service/src/main/resources/application.yaml index 117b5c6..a404f50 100644 --- a/service/src/main/resources/application.yaml +++ b/service/src/main/resources/application.yaml @@ -3,15 +3,6 @@ server: spring: application: name: jateway - profiles: - active: dev - cloud: - gateway: - routes: - - id: simple_route - uri: http://example.com - predicates: - - Method=GET management: server: diff --git a/service/src/main/resources/banner.txt b/service/src/main/resources/banner.txt new file mode 100644 index 0000000..87f8e8d --- /dev/null +++ b/service/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + ▄▄▄██▀▀▀▄▄▄ ▄▄▄█████▓▓█████ █ █░ ▄▄▄ ▓██ ██▓ + ▒██ ▒████▄ ▓ ██▒ ▓▒▓█ ▀ ▓█░ █ ░█░▒████▄ ▒██ ██▒ + ░██ ▒██ ▀█▄ ▒ ▓██░ ▒░▒███ ▒█░ █ ░█ ▒██ ▀█▄ ▒██ ██░ +▓██▄██▓ ░██▄▄▄▄██░ ▓██▓ ░ ▒▓█ ▄ ░█░ █ ░█ ░██▄▄▄▄██ ░ ▐██▓░ + ▓███▒ ▓█ ▓██▒ ▒██▒ ░ ░▒████▒░░██▒██▓ ▓█ ▓██▒ ░ ██▒▓░ + ▒▓▒▒░ ▒▒ ▓▒█░ ▒ ░░ ░░ ▒░ ░░ ▓░▒ ▒ ▒▒ ▓▒█░ ██▒▒▒ + ▒ ░▒░ ▒ ▒▒ ░ ░ ░ ░ ░ ▒ ░ ░ ▒ ▒▒ ░▓██ ░▒░ + ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ▒ ▒ ▒ ░░ + ░ ░ ░ ░ ░ ░ ░ ░ ░░ ░ + ░ ░ \ No newline at end of file