Skip to content

Get rid of lombok @Data annotation#96

Merged
cbullinger merged 12 commits intomongodb:developmentfrom
ozgliderpilot:bugfix/get-rid-of-lombok-data-annotation
Apr 15, 2026
Merged

Get rid of lombok @Data annotation#96
cbullinger merged 12 commits intomongodb:developmentfrom
ozgliderpilot:bugfix/get-rid-of-lombok-data-annotation

Conversation

@ozgliderpilot
Copy link
Copy Markdown
Contributor

NB: This PR should be reviewed after #95 is reviewed and merged as it is stacked on it.

  • Use records for DTOs
  • Use simple @Getter and @Setter for MongoDB @Document
  • Remove generated constructors where @Builder is already used

…during `./mvnw clean spring-boot:run`. Introduce better way to exclude lombok jars from the build artefacts.
Remove duplicate lombok dependency, merge the two maven-compiler-plugin
blocks, drop redundant source/target/encoding settings inherited from
spring-boot-starter-parent, and pin the annotation processor version
via ${lombok.version}.
@ozgliderpilot ozgliderpilot marked this pull request as draft April 14, 2026 23:02
Replace compact constructors in SuccessResponse and ErrorResponse with
partial builder class declarations to provide proper defaults, and
remove now-redundant .success() and .timestamp() calls from all builder
sites. Use @with for DirectorStatisticsResult.averageRating to match the
pattern in MoviesByYearResult. Expand wildcard lombok import in Movie.
…sors

Add @tostring(onlyExplicitlyIncluded = true) to Movie, including id,
title, and year for meaningful debug output. Rename ApiResponse methods
from JavaBean style (isSuccess/getTimestamp) to record accessor style
(success/timestamp) and drop the bridge methods from ErrorResponse and
SuccessResponse since records already generate matching accessors.
…d style

Restore @AllArgsConstructor/@NoArgsConstructor(access = PROTECTED) on
Awards, Imdb, Tomatoes, Viewer, and Critic so Spring Data MongoDB can
reliably instantiate them without depending on compiler debug info.
Normalise record declaration spacing and replace FQN java.util.List
with an import in VectorSearchResult.
@ozgliderpilot ozgliderpilot marked this pull request as ready for review April 15, 2026 01:03
Copy link
Copy Markdown
Collaborator

@cbullinger cbullinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for implementing this refactor!

@cbullinger cbullinger merged commit 21bbf34 into mongodb:development Apr 15, 2026
4 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.

2 participants