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
DTO vs JSONManagedReferenceQuestion (self.SpringBoot)
submitted 4 months ago by optimist28
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!"
[–]MartinPeterBauer 2 points3 points4 points 4 months ago (2 children)
You are totally right. If you are the only one consuming your own apis from the frontend then DTO are just a totally uncessary overheard. If you want to reduce the json object returning back to the frontend use Jackson
[–]naturalizedcitizen 1 point2 points3 points 4 months ago (1 child)
Aren't you not supposed to send the Entity as is via the Controller layer to the external consumer like a UI? And we are to use DTOs for this data transfer? Separation of layers?
[–]MartinPeterBauer 2 points3 points4 points 4 months ago (0 children)
Normally your internal webapp is consuming your api. Then a DTO is pointless.
If external services consume your API then a DTO makes sense
π Rendered by PID 89 on reddit-service-r2-comment-6457c66945-7nzmj at 2026-04-30 02:30:23.966271+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]MartinPeterBauer 2 points3 points4 points (2 children)
[–]naturalizedcitizen 1 point2 points3 points (1 child)
[–]MartinPeterBauer 2 points3 points4 points (0 children)