"Spring Boot REST Client Logging Made Easy
Dan Vega
View ChannelAbout
Dan Vega is a Java Champion, Spring Developer Advocate at Broadcom and lifelong learner. He has been developing software for the web for over 23 years and his superpower is problem-solving. Dan is a blogger, YouTuber, podcast host, course creator, and speaker. He is a lifelong learner and his passion is sharing his knowledge with the developer community. Dan lives near Cleveland Ohio with his beautiful wife and 2 daughters. When he isnβt writing code or teaching he enjoys spending time with his family, lifting weights, running, or reading a good book.
Latest Posts
Video Description
Spring Boot REST Client Logging Tutorial π Learn how to implement clean, efficient request/response logging for Spring Boot's REST Client! In this comprehensive tutorial, we'll build a reusable solution that gives you exactly the logging information you need, without the overwhelming verbosity of the underlying HTTP client logging. What You'll Learn β’ How to create a custom request interceptor for logging β’ Techniques for handling request/response body streams effectively β’ Implementation of reusable logging solutions across multiple REST clients β’ Best practices for clean, informative logging in Spring Boot applications Tutorial Chapters 00:00:00 Introduction & Question Overview 00:00:54 Problem Explanation & Approaches 00:02:51 Project Setup with Spring Boot 00:03:47 Creating the Base Project Structure 00:04:54 Implementing Post Client & Model 00:08:36 Initial Logging Implementation 00:12:28 Creating Todo Package & Classes 00:14:19 Building Custom Request Interceptor 00:16:34 Implementing Response Logging 00:19:01 Buffering HTTP Response Solution 00:21:38 Final Demo & Conclusion ## Code & Resources π GitHub Repository: https://github.com/danvega/rc-logging π Spring Boot Documentation: https://docs.spring.io/spring-boot/docs/current/reference/html/ π JSON Placeholder (Testing API): https://jsonplaceholder.typicode.com/ ## Technologies Used β’ Spring Boot 3.2+ β’ Spring Web β’ Java 17 β’ Maven π If you found this tutorial helpful, please give it a like and subscribe for more Spring Boot content! β Have questions? Drop them in the comments below! ππ»Connect with me: Website: https://www.danvega.dev Twitter: https://twitter.com/therealdanvega Github: https://github.com/danvega LinkedIn: https://www.linkedin.com/in/danvega Newsletter: https://www.danvega.dev/newsletter SUBSCRIBE TO MY CHANNEL: http://bit.ly/2re4GH0 β€οΈ
Upgrade Your Gaming Setup
AI-recommended products based on this video

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

Logitech K400 Plus Wireless Touch TV Keyboard With Easy Media Control and Built-in Touchpad, HTPC Keyboard for PC-connected TV, Windows, Android, Chrome OS, Laptop, Tablet - Black

Logitech M185 Wireless Mouse, 2.4GHz with USB Mini Receiver, 12-Month Battery Life, 1000 DPI Optical Tracking, Ambidextrous, Compatible with PC, Mac, Laptop - Black

Razer BlackShark V2 X Gaming Headset: 50mm Drivers - Cardioid Mic - Memory Foam Cushion - Lightweight- Comfortable, Noise Isolating Earcups - for PC, PS4, PS5, Switch - 3.5mm Audio Jack - Black ECOLOGO

New SteelSeries Arctis Nova Pro for Xbox Multi-System Gaming Headset - Premium Hi-Fi Drivers - Hi-Res Audio - 360Β° Spatial - GameDAC Gen 2 - Quad-DAC - ClearCast Gen 2 Mic - Xbox, PC, PS5/PS4, Switch

NEW SteelSeries Arctis Nova 3 Multi-Platform Gaming Headset - Signature Arctis Sound - ClearCast Gen 2 Mic - PC, PS5/PS4, Xbox Series X|S, Switch, Mobile

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook

Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac, Black

Redragon M612 Predator RGB Gaming Mouse, 8000 DPI Wired Optical Mouse with 11 Programmable Buttons & 5 Backlit Modes, Software Supports DIY Keybinds Rapid Fire Button

Lenovo M210 RGB Wired Gaming Mouse for PC, Laptop, Computer with Windows & Chrome OS - 3 Zone RGB, 8000 DPI Adjustable Sensor, 7 Programmable Buttons β Palm Grip Mouse for Gamers (Black)

Lenovo Legion KM310 RGB Wired Gaming Keyboard & Mouse Combo - K310 Keyboard w/Silent Operation & Compact Water-Resistant Design - M300S Mouse with 8000 Adjustable DPI, 220 IPS, 6 Programmable Buttons

Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac, Black

VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook

Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac, Black

Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac, Black

Logitech G203 Wired Gaming Mouse, 8,000 DPI, Rainbow Optical Effect LIGHTSYNC RGB, 6 Programmable Buttons, On-Board Memory, Screen Mapping, PC/Mac Computer and Laptop Compatible - Black

Logitech G305 LIGHTSPEED Wireless Gaming Mouse, Hero 12K Sensor, 12,000 DPI, Lightweight, 6 Programmable Buttons, 250h Battery Life, On-Board Memory, PC/Mac - Black

VersionTECH. Gaming Mouse Ergonomic Wired Computer Mouse with 7 Colors LED Backlight, 4 DPI Settings Up to 3600 DPI Compatible for Chromebook Windows 7/8/10/11 XP/Mac/Linux Gamer/Notebook/MacBook

Logitech G502 HERO High Performance Wired Gaming Mouse, HERO 25K Sensor, 25,600 DPI, RGB, Adjustable Weights, 11 Programmable Buttons, On-Board Memory, PC / Mac, Black




