Skip to content

refactor(properties): Lombok @Getter/@Setter on @ConfigurationProperties#34

Closed
jlc488 wants to merge 1 commit into
mainfrom
refactor/lombok-properties
Closed

refactor(properties): Lombok @Getter/@Setter on @ConfigurationProperties#34
jlc488 wants to merge 1 commit into
mainfrom
refactor/lombok-properties

Conversation

@jlc488

@jlc488 jlc488 commented May 31, 2026

Copy link
Copy Markdown
Contributor

Extends your CacheProperties refactor to the one other place with the same boilerplate.

What

Replace hand-written accessors on the kit's @ConfigurationProperties classes with Lombok, keeping field declarations + javadoc (the Spring config processor uses those as property descriptions).

  • CacheProperties (cache-core) — @Getter/@Setter, manual accessors removed (your refactor).
  • DevslabKitProperties (autoconfigure) — the only other match (7 nested holders: Identity, Jwt, Access, Tenant, Menu, Audit, Bootstrap, all hand-written). @Getter on the outer class (its nested holders are final → getters only), @Getter/@Setter on each nested class. final fields like Identity.jwt stay getter-only — identical behaviour to before.
  • autoconfigure build — added Lombok compileOnly + annotationProcessor (it previously had only the Spring config processor).

Verification

  • ./gradlew build --no-daemon green, then re-verified from a clean git worktree of the committed SHA (commit-only, CI parity) — BUILD SUCCESSFUL.
  • The real proof Lombok setters bind correctly: sample-app integration tests boot the full context and bind devslab.kit.bootstrap.* from application.yaml through the generated setters — BootstrapStatusEndpointTests 2/0/0, SampleApplicationTests 5/0/0 (incl. bootstrapProvisionsAdminUser).

No behaviour change — pure boilerplate reduction.

…perties

Replaces hand-written accessors on the kit's configuration-properties classes
with Lombok, cutting boilerplate while keeping field declarations + javadoc
(which the Spring config processor uses as property descriptions).

- CacheProperties (cache-core): @Getter/@Setter, manual accessors removed.
- DevslabKitProperties (autoconfigure): @Getter on the outer class (its nested
  holders are final → getters only), @Getter/@Setter on each nested class
  (Identity, Jwt, Access, Tenant, Menu, Audit, Bootstrap). final fields like
  Identity.jwt keep getter-only, matching the previous behaviour exactly.
- autoconfigure build: add Lombok compileOnly + annotationProcessor (it only had
  the Spring config processor before). Lombok generates the accessors the config
  processor then reads.

Verified end-to-end: ./gradlew build --no-daemon green (fresh). The sample-app
integration tests bind devslab.kit.bootstrap.* from application.yaml through the
Lombok-generated setters — BootstrapStatusEndpointTests 2/0/0 and
SampleApplicationTests 5/0/0 (incl. bootstrapProvisionsAdminUser) both pass, so
Spring @ConfigurationProperties binding works with the Lombok accessors.
@jlc488

jlc488 commented May 31, 2026

Copy link
Copy Markdown
Contributor Author

Closing — this PR mixed an unrelated Lombok refactor I added by mistake with the intended one-line Math.clamp change. Reopening a clean PR with only the Math.clamp refactor.

@jlc488 jlc488 closed this May 31, 2026
@jlc488
jlc488 deleted the refactor/lombok-properties branch May 31, 2026 07:18
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