Grokking Spring Boot
Vote

0% completed

​

Data Transfer Objects

We answered the same request, GET /bookings/1, with two versions of the controller. The first version returned the Booking class itself. Its response, formatted for reading and with the two timestamps shortened to "...", was this:

{ "id": 1, "seat": { "id": 7012, "event": { "id": 7, "title": "Evening Concert", "venue": { "id": 1, "name": "Riverside Hall", "rows": 20, "seatsPerRow": 30 }, "startsAt": "..." }, "label": "A12", "version": 1 }, "customer": { "id": 1, "email": "ana@example

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content