Answer by David is correct - filter is a good way to implement such functionality in Spring Boot.
Spring Boot has a built-in endpoint which returns the information about last 100 requests like shown below:
[{ "timestamp": 1394343677415, "info": { "method": "GET", "path": "/trace", "headers": { "request": { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Connection": "keep-alive", "Accept-Encoding": "gzip, deflate", "User-Agent": "Mozilla/5.0 Gecko/Firefox", "Accept-Language": "en-US,en;q=0.5", "Cookie": "_ga=GA1.1.827067509.1390890128; ..." "Authorization": "Basic ...", "Host": "localhost:8080" }, "response": { "Strict-Transport-Security": "max-age=31536000 ; includeSubDomains", "X-Application-Context": "application:8080", "Content-Type": "application/json;charset=UTF-8", "status": "200" } } } },{ "timestamp": 1394343684465, ... }]
If your application is calling another services or querying the database consider using Sniffy for profiling - it will show you not only time spent on your server but also time spent in calling downstream systems. See a live demo here (Check the black widget in top bottom corner).
Disclaimer: I'm the author of Sniffy

spring-boot-actuatorand it will already be logged for you.