A real-world situation reported by 양**
Build the API for a feed screen. The feed shows posts, and each post shows its title, its author, and how many comments it has. GET /feed returns the posts to show on the feed. Complete FeedService.getFeed. Note: each post (Post) is already linked to its author (Author) and comments (Comment).
A problem where you complete a post feed list API on Spring Boot 3 and JPA (in-memory H2). GET /feed returns the posts to show on the feed, and each one carries its title, author name, and comment count. The controller owns only the HTTP boundary while the read logic lives in the service.
Every read API faces one decision: what to return in the response. A JPA entity carries its associations (author, comments), so you have to decide whether to return the entity as-is or shape it into what the screen needs. This question — who decides the shape of the response, and how — recurs across every read API, and this problem practices it on a post feed.