refactor(properties): Lombok @Getter/@Setter on @ConfigurationProperties#34
Closed
jlc488 wants to merge 1 commit into
Closed
refactor(properties): Lombok @Getter/@Setter on @ConfigurationProperties#34jlc488 wants to merge 1 commit into
jlc488 wants to merge 1 commit into
Conversation
…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.
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. |
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.
Extends your
CachePropertiesrefactor to the one other place with the same boilerplate.What
Replace hand-written accessors on the kit's
@ConfigurationPropertiesclasses with Lombok, keeping field declarations + javadoc (the Spring config processor uses those as property descriptions).@Getter/@Setter, manual accessors removed (your refactor).@Getteron the outer class (its nested holders arefinal→ getters only),@Getter/@Setteron each nested class.finalfields likeIdentity.jwtstay getter-only — identical behaviour to before.compileOnly+annotationProcessor(it previously had only the Spring config processor).Verification
./gradlew build --no-daemongreen, then re-verified from a cleangit worktreeof the committed SHA (commit-only, CI parity) — BUILD SUCCESSFUL.devslab.kit.bootstrap.*fromapplication.yamlthrough the generated setters — BootstrapStatusEndpointTests 2/0/0, SampleApplicationTests 5/0/0 (incl.bootstrapProvisionsAdminUser).No behaviour change — pure boilerplate reduction.