From 02cdaef35ed783b0b3d4078fd5b37c9a88d1b362 Mon Sep 17 00:00:00 2001 From: Sabrina Date: Mon, 1 Jun 2026 00:53:22 +0100 Subject: [PATCH] chore(backend): local-path-configs (#1594) --- backend/DEVELOPMENT.md | 8 ++++++++ backend/src/main/resources/application-dev.yaml | 9 +++++++++ backend/src/main/resources/application.yaml | 4 ++-- 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 backend/src/main/resources/application-dev.yaml diff --git a/backend/DEVELOPMENT.md b/backend/DEVELOPMENT.md index 1fca84248..a7df0d948 100644 --- a/backend/DEVELOPMENT.md +++ b/backend/DEVELOPMENT.md @@ -54,6 +54,7 @@ storage paths. The common backend loop is: cd backend just run ``` +Where [application-dev.yaml](./src/main/resources/application-dev.yaml) is the default configuration file for development. If you need a different Spring profile: @@ -64,6 +65,13 @@ just run profile=local Use the repo-level guide in [../DEVELOPMENT.md](../DEVELOPMENT.md) for the full Docker stack, MariaDB setup, and cross-project local workflows. +### IDE + +**Spring Boot:** Active Profile = `dev`, +Working Directory = `backend/` + +**Gradle:** `bootRun --args="--spring.profiles.active=dev"` + ## Build and Test ```bash diff --git a/backend/src/main/resources/application-dev.yaml b/backend/src/main/resources/application-dev.yaml new file mode 100644 index 000000000..ee3435614 --- /dev/null +++ b/backend/src/main/resources/application-dev.yaml @@ -0,0 +1,9 @@ +# application-dev.yml - development-specific settings +app: + path-config: ${APP_PATH_CONFIG:../shared/data} + bookdrop-folder: ${APP_BOOKDROP_FOLDER:../shared/bookdrop} +spring: + datasource: + url: ${DATABASE_URL:jdbc:mariadb://localhost:3366/grimmory?createDatabaseIfNotExist=true&connectionTimeZone=UTC&forceConnectionTimeZoneToSession=true} + username: ${DATABASE_USERNAME:grimmory} + password: ${DATABASE_PASSWORD:grimmory} \ No newline at end of file diff --git a/backend/src/main/resources/application.yaml b/backend/src/main/resources/application.yaml index 198bd2b03..b8e607b77 100644 --- a/backend/src/main/resources/application.yaml +++ b/backend/src/main/resources/application.yaml @@ -1,6 +1,6 @@ app: - path-config: '/app/data' - bookdrop-folder: '/bookdrop' + path-config: ${APP_PATH_CONFIG:/app/data} + bookdrop-folder: ${APP_BOOKDROP_FOLDER:/bookdrop} api-docs: enabled: ${API_DOCS_ENABLED:false}