feat: add devslab-kit-demo#64
Merged
Merged
Conversation
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.)
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
settings.gradle.kts.bootRun; Testcontainers (Postgres + Redis,@ServiceConnection) for the test.devslab.kit.*— single/fixed tenant, JWT,cache.type=redis(the distributed cache), and theadmin/adminbootstrap.README.md+README.ko.mdget a devslab-kit section, table row, and Maven Central badge.Verification
Built locally green —
DevslabKitDemoApplicationTests3/0/0 against real Postgres + Redis (resolving devslab-kit 0.1.0 from mavenLocal).The committed build resolves from
mavenCentral()only, so CI here stays red until devslab-kit0.1.0publishes to Maven Central. Merge this after the release. (A commentedmavenLocal()line is included for local runs before then.)