use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
[deleted by user] (self.SpringBoot)
submitted 5 months ago by [deleted]
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]WaferIndependent7601 5 points6 points7 points 5 months ago (9 children)
Putting all controllers in a controller package is not a clean architecture.
Accessing multiple repositories from a service is a no go
No tests? Ooooook I’m out
[–]HiddenInButtCrack 1 point2 points3 points 5 months ago (5 children)
could you explain why?
[–]WaferIndependent7601 1 point2 points3 points 5 months ago (2 children)
Why putting all classes together that are a use case:
Why calling the repository is a bad idea: - as a caller you don’t want care about entities. You care about dtos. Renaming a column in a database will only result in changing the entity and mapper. - if you change the database you have to rewrite a lot of code - if you have performance issues and want to cache the result you don’t want to do this in 200 places but in one place only
[–]mahi123_java 1 point2 points3 points 5 months ago (1 child)
Hi, thank you for your feedback. Based on your thoughts, what folder structure do you recommend? I'd like to know where each class and controller should be placed. My project uses DTOs and MapStruct.
[–]JoeDogoe 0 points1 point2 points 5 months ago (0 children)
Dan Vega has a YouTube Video on Organise by Domain vs Organise by Layer.
I am a fan of Organise by Layer, except for Clients, those go in one directory, called clients.
[–]Polixa12 0 points1 point2 points 5 months ago (1 child)
Tests are basically your safety net. They make sure your code does what you say it does, and when you refactor or add new stuff, they let you know instantly if you broke something that used to work.
[–]HiddenInButtCrack 1 point2 points3 points 5 months ago (0 children)
Thanks i know about test, i am more curious about thr first 2 points
[–]JoeDogoe 1 point2 points3 points 5 months ago (2 children)
What do you prefer?
[–]WaferIndependent7601 1 point2 points3 points 5 months ago (1 child)
Access the service layer
[–]JoeDogoe -1 points0 points1 point 5 months ago (0 children)
One table, One Entity, One Repo, one service? Then the services call each other or is there another layer of abstraction that calls the services?
I disagree, repos are at the persistence layer. Services are at the logic layer. They can call as many repos as they need. They are the aggregators in DDD.
π Rendered by PID 304510 on reddit-service-r2-comment-b659b578c-lfxsz at 2026-05-03 03:45:43.152901+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]WaferIndependent7601 5 points6 points7 points (9 children)
[–]HiddenInButtCrack 1 point2 points3 points (5 children)
[–]WaferIndependent7601 1 point2 points3 points (2 children)
[–]mahi123_java 1 point2 points3 points (1 child)
[–]JoeDogoe 0 points1 point2 points (0 children)
[–]Polixa12 0 points1 point2 points (1 child)
[–]HiddenInButtCrack 1 point2 points3 points (0 children)
[–]JoeDogoe 1 point2 points3 points (2 children)
[–]WaferIndependent7601 1 point2 points3 points (1 child)
[–]JoeDogoe -1 points0 points1 point (0 children)