Skip to content

feat: add devslab-kit-demo#64

Merged
jlc488 merged 3 commits into
mainfrom
feat/add-devslab-kit-demo
Jun 1, 2026
Merged

feat: add devslab-kit-demo#64
jlc488 merged 3 commits into
mainfrom
feat/add-devslab-kit-demo

Conversation

@jlc488
Copy link
Copy Markdown
Contributor

@jlc488 jlc488 commented May 31, 2026

A runnable demo for devslab-kit (the Spring Boot 4 platform starter) — a plain consumer app with no platform code of its own. Adding the starter + pointing it at Postgres/Redis brings up auth, RBAC + groups + ABAC, multi-tenancy, dynamic menus, audit logging, the first-admin bootstrap, and the admin REST API from auto-configuration.

What's in it

  • Standalone Gradle project (own wrapper, Spring Boot 4.0.6, Java 21) — matches the devslab-examples conventions; CI auto-discovers it via settings.gradle.kts.
  • compose.yaml (Postgres + Redis) auto-started on bootRun; Testcontainers (Postgres + Redis, @ServiceConnection) for the test.
  • application.yaml drives everything via devslab.kit.* — single/fixed tenant, JWT, cache.type=redis (the distributed cache), and the admin/admin bootstrap.
  • build.gradle.kts shows the consumer dep set the platform needs (web, security, JPA, Flyway, data-redis) — the kit stays unopinionated about the runtime.
  • Bilingual README (en + ko); root README.md + README.ko.md get a devslab-kit section, table row, and Maven Central badge.

Verification

Built locally green — DevslabKitDemoApplicationTests 3/0/0 against real Postgres + Redis (resolving devslab-kit 0.1.0 from mavenLocal).

⚠️ Merge order

The committed build resolves from mavenCentral() only, so CI here stays red until devslab-kit 0.1.0 publishes to Maven Central. Merge this after the release. (A commented mavenLocal() line is included for local runs before then.)

A runnable demo for devslab-kit (the Spring Boot 4 platform starter) — a plain
consumer app with no platform code of its own. Adding the starter + pointing it
at Postgres/Redis brings up auth, RBAC + groups + ABAC, multi-tenancy, dynamic
menus, audit logging, the first-admin bootstrap, and the admin REST API from
auto-configuration.

- Standalone Gradle project (own wrapper, Spring Boot 4.0.6, Java 21), matching
  the devslab-examples conventions.
- compose.yaml (Postgres + Redis) auto-started on bootRun via
  spring-boot-docker-compose; Testcontainers (Postgres + Redis, @Serviceconnection)
  for the test.
- application.yaml drives everything via devslab.kit.* — single/fixed tenant, JWT,
  cache.type=redis (the distributed cache), and the admin/admin bootstrap.
- build.gradle.kts shows the consumer dep set the platform needs (web, security,
  JPA, Flyway, data-redis) — the kit stays unopinionated about the runtime.
- Bilingual README (en + ko); root README + README.ko.md get a devslab-kit
  section, table row, and Maven Central badge.

Verified locally: ./gradlew build green, DevslabKitDemoApplicationTests 3/0/0
against real Postgres + Redis (resolving devslab-kit 0.1.0 from mavenLocal).

NOTE: the committed build resolves from mavenCentral() only, so CI here stays red
until devslab-kit 0.1.0 publishes to Maven Central. Merge after the release.
(A commented mavenLocal() line is included for local runs before then.)
jlc488 added 2 commits May 31, 2026 19:47
…ntext boots

A plain @SpringBootApplication consumer in its own package can't see the kit's
JPA entities/repositories (they live in kr.devslab.kit), so startup failed with
"Not a managed type: PlatformUserAccountEntity". @EntityScan alone did not fix it
under Spring Boot 4; the working combination (matching the kit's own sample-app)
is scanBasePackages + @AutoConfigurationPackage + @EnableJpaRepositories listing
both the app package and kr.devslab.kit.

- DevslabKitDemoApplication: add the three scan annotations + a comment explaining
  why a consumer needs them.
- README (en + ko): document this required step for 0.1.0, with the failure symptom.
- build.gradle.kts: keep mavenCentral() only for the committed build (a commented
  mavenLocal() line is there for local runs before 0.1.0 publishes).

Verified locally: ./gradlew clean build green, DevslabKitDemoApplicationTests
3/0/0 against real Postgres + Redis (devslab-kit 0.1.0 from mavenLocal).
…ootApplication, Testcontainers 2.x

The demo was authored before devslab-kit 0.1.0 shipped and assumed the consumer
had to wire the kit in by hand. With 0.1.0 now on Maven Central, those workarounds
both conflict with the kit's auto-configuration and use pre-SB4 Testcontainers
coordinates, so CI failed. Fixes, verified by a local green build against the real
0.1.0 artifact:

- DevslabKitDemoApplication: drop the scanBasePackages / @AutoConfigurationPackage /
  @EnableJpaRepositories trio (all listing kr.devslab.kit) for a plain
  @SpringBootApplication. 0.1.0 auto-registers the kit's entities, repositories and
  the admin web layer, so component-scanning kr.devslab.kit now double-registers
  those beans -> BeanDefinitionOverrideException on context load. The plain
  annotation is the demo's whole point ("add the starter, nothing else").
- build.gradle.kts: Spring Boot 4 manages Testcontainers 2.x, whose artifacts were
  renamed to the testcontainers-* prefix. Use testcontainers-junit-jupiter /
  testcontainers-postgresql (the old 1.x IDs resolved to no version under the SB4 BOM).
- TestcontainersConfiguration: import PostgreSQLContainer from its 2.x package
  (org.testcontainers.postgresql) and drop @RestartScope (needs spring-boot-devtools,
  not a dependency here -> compile error).
- README(.ko): replace the "one required step for 0.1.0" note with "no wiring
  required — a plain @SpringBootApplication suffices", matching shipped behaviour.

Local verification: ./gradlew clean build green — 3 tests, 0 failures; the demo boots
the full platform from devslab-kit-spring-boot-starter:0.1.0 (Maven Central) on
Testcontainers Postgres + Redis.
@jlc488 jlc488 merged commit 18b987a into main Jun 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant