diff --git a/devslab-kit-demo/README.ko.md b/devslab-kit-demo/README.ko.md index 77c4328..c91f38d 100644 --- a/devslab-kit-demo/README.ko.md +++ b/devslab-kit-demo/README.ko.md @@ -63,6 +63,12 @@ curl -s localhost:8080/admin/api/v1/auth/login \ [관리자 콘솔](https://github.com/devslab-kr/devslab-kit-admin-ui)을 `http://localhost:8080`에 연결하면 같은 API 위에서 UI를 쓸 수 있습니다. +API 자체를 둘러보려면 — 스타터가 Swagger UI를 포함하므로(devslab-kit `0.2.1`+) +추가 설정 없이 바로 뜹니다: + +- Swagger UI: +- OpenAPI JSON: + ## 테스트 실행 (Docker만 필요) ```bash diff --git a/devslab-kit-demo/README.md b/devslab-kit-demo/README.md index 6d7c9a2..d509579 100644 --- a/devslab-kit-demo/README.md +++ b/devslab-kit-demo/README.md @@ -64,6 +64,12 @@ curl -s localhost:8080/admin/api/v1/auth/login \ Point the [admin console](https://github.com/devslab-kr/devslab-kit-admin-ui) at `http://localhost:8080` for a UI over the same API. +Or browse the API itself — the starter bundles Swagger UI (devslab-kit `0.2.1`+), +so it's live with no extra setup: + +- Swagger UI: +- OpenAPI JSON: + ## Run the tests (Docker only) ```bash diff --git a/devslab-kit-demo/build.gradle.kts b/devslab-kit-demo/build.gradle.kts index 297199b..4d9f66a 100644 --- a/devslab-kit-demo/build.gradle.kts +++ b/devslab-kit-demo/build.gradle.kts @@ -22,8 +22,10 @@ repositories { } dependencies { - // The devslab-kit starter pulls in the whole platform's auto-configuration. - implementation("kr.devslab:devslab-kit-spring-boot-starter:0.1.0") + // The devslab-kit starter pulls in the whole platform's auto-configuration — + // including Swagger UI (springdoc is bundled from 0.2.1), so /swagger-ui and + // /v3/api-docs come up with no extra dependency. + implementation("kr.devslab:devslab-kit-spring-boot-starter:0.3.0") // devslab-kit is deliberately unopinionated about which Spring starters you // bring — a consumer wires the runtime it actually wants. This is the set the diff --git a/devslab-kit-demo/compose.yaml b/devslab-kit-demo/compose.yaml index 3e4778b..9170b42 100644 --- a/devslab-kit-demo/compose.yaml +++ b/devslab-kit-demo/compose.yaml @@ -6,8 +6,8 @@ services: - 'POSTGRES_USER=demo' - 'POSTGRES_PASSWORD=demo' ports: - - '5432:5432' + - '15432:5432' redis: image: 'redis:7-alpine' ports: - - '6379:6379' + - '16379:6379' diff --git a/devslab-kit-demo/docker-compose.yml b/devslab-kit-demo/docker-compose.yml deleted file mode 100644 index 1910bb9..0000000 --- a/devslab-kit-demo/docker-compose.yml +++ /dev/null @@ -1,32 +0,0 @@ -# Single-service compose file for the local "run it yourself" path. -# -# The CI / `./gradlew test` path does NOT use this file — Testcontainers spins -# up its own ephemeral PostgreSQL on a random port. This compose file exists -# so a human can do: -# -# docker compose up -d db -# ./gradlew bootRun -# -# ...without installing Postgres on their laptop. The credentials and port -# below match what application.yml reads. - -services: - db: - image: postgres:16-alpine - container_name: easy-paging-postgres-demo-db - environment: - POSTGRES_DB: easypaging - POSTGRES_USER: easypaging - POSTGRES_PASSWORD: easypaging - ports: - - "5432:5432" - healthcheck: - test: ["CMD-SHELL", "pg_isready -U easypaging -d easypaging"] - interval: 5s - timeout: 3s - retries: 10 - volumes: - - pgdata:/var/lib/postgresql/data - -volumes: - pgdata: diff --git a/devslab-kit-demo/src/main/resources/application.yaml b/devslab-kit-demo/src/main/resources/application.yaml index cf01d8c..1aee024 100644 --- a/devslab-kit-demo/src/main/resources/application.yaml +++ b/devslab-kit-demo/src/main/resources/application.yaml @@ -5,13 +5,13 @@ spring: # compose.yaml (Postgres + Redis) is started automatically on `bootRun` by # spring-boot-docker-compose; these defaults point at it. datasource: - url: ${DEVSLAB_DATASOURCE_URL:jdbc:postgresql://localhost:5432/demo} + url: ${DEVSLAB_DATASOURCE_URL:jdbc:postgresql://localhost:15432/demo} username: ${DEVSLAB_DATASOURCE_USERNAME:demo} password: ${DEVSLAB_DATASOURCE_PASSWORD:demo} data: redis: host: ${DEVSLAB_REDIS_HOST:localhost} - port: ${DEVSLAB_REDIS_PORT:6379} + port: ${DEVSLAB_REDIS_PORT:16379} jpa: open-in-view: false