A real-world situation reported by λ°**
Build the detail API for a team document library. The current user id is passed in a request header, and the user can open a team document to see its title, body, and last-updated date. Complete GET /documents/{id}. Read the current user id from the X-User-Id header. Implement DocumentService.getDocument and add the needed tests.
Complete a Spring Boot 3 detail API for a team document library. The request header provides the user id, and the response returns the document title, body, and last-updated date.
In work document systems, the same endpoint can show different data depending on the current user. The controller reads request values, while the service owns the lookup rules for the current user and the document. This problem practices that backend flow.