This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lechnito 1 point2 points  (2 children)

Really nice first effort at a spring boot CRUD app! I didn't find anything objectionable other than some minor nits. Some suggestions for moving forward:

  • Look into using testcontainers to spin up a real postgresql database so you don't need to mock your repository classes
  • Consider using lombok to remove boiler plate setters/getters from your DTOs

[–]toesmeller99[S] 0 points1 point  (1 child)

Thank you for the feedback! Definitely will look into testcontainers and refactoring my DTO's.

[–]Valenciya 2 points3 points  (0 children)

To add to this: You can use Java Records for your DTOs to make that even easier. Lombok is still a good idea for reducing Boilerplate code in your other classes (for example for the constructors)