Understanding DTOs and entities in Spring Boot

Is it okay for your web controllers to return entity classes from the data access layer? Or should you decouple things using DTOs (data transfer objects)? What are the tradeoffs? Does it really matter? Find out in this live stream where Greg, principal developer on the Spring teams examines what's at stake and what impact it could have on your application. ==== Want to get a free tech e-book, be alerted to my discounts, and get even MORE content about SPRING BOOT? Then SIGN UP FOR MY NEWSLETTER: https://springbootlearning.com/join ==== ALSO SEE: 👀 ✅ Want to get PAID writing SPRING BOOT apps?    • Want to get PAID as a PRO CODER?   ✅ Want to learn how to build a SPRING BOOT + SPRING MVC app?    • SPRING BOOT + SPRING MVC: Learn how to ser...   ✅ Itching to query data with SPRING DATA?    • What is Spring Data and how does it work?   LIVE CODING: 💖 ✅ HOW TO create SPRING MVC app with Spring Boot:    • HOW TO create Spring MVC app with Spring Boot   ✅ SPRING MVC Method: HOW TO map web calls to your controllers:    • HOW TO map web calls to your controllers   RESOURCES: 👇 🍃 Spring Initializr: https://start.spring.io 🍃 Spring Boot: https://spring.io/projects/spring-boot 🍃 Grab your copy of Hacking with Spring Boot 2.4: Reactive Edition: https://greglturnquist.com/hacking-wi... GET MORE: 🎉 Get a FREE tech ebook at https://springbootlearning.com/newsle... Follow me on Twitter:   / springbootlearn   COFFEE: ☕ Grab a mug for your coffee (and a t-shirt): https://store.springbootlearning.com/ ☕️ Feel free to buy me a coffee: https://www.buymeacoffee.com/springbo... Click "subscribe" under the video (and hit that bell icon) to get notified when new videos come out. Or click here and then click “yes” when prompted: https://www.youtube.com/SpringBootLea... Got questions or suggestions for future topics? Drop ‘em in the comments! STUFF I LIKE TO USE: 😍 Studio gear: https://springbootlearning.com/kit Laptop stand: https://springbootlearning.com/twelve... Music: https://springbootlearning.com/epidem... Best place to run Spring Boot apps: https://tanzu.vmware.com/ DISCLOSURE: All opinions stated here are mine and do not necessarily reflect those of the Spring team nor of my employer. Any usage of "Spring", "Spring Boot", "Spring Framework", "VMware", "Pivotal", or anything else is completely unaffiliated with its owners. From time to time, I may post affiliate links for products I enjoy using. #springbootlearning © 2021 Greg L. Turnquist, All Rights Reserved

It’s okay to say “it depends!”
▶︎

It’s okay to say “it depends!”

Spring Boot DTO ↔ Entity Conversion | ModelMapper Made Easy
▶︎

Spring Boot DTO ↔ Entity Conversion | ModelMapper Made Easy

Use Data Transfer Objects (DTOs) in .NET the Right Way 🚀
▶︎

Use Data Transfer Objects (DTOs) in .NET the Right Way 🚀

Inside Spring Boot 4: Restructuring for the Future by Moritz Halbritter @ Spring I/O 2026
▶︎

Inside Spring Boot 4: Restructuring for the Future by Moritz Halbritter @ Spring I/O 2026

Why Aliens Would NEVER Invade Africa
▶︎

Why Aliens Would NEVER Invade Africa

Java Record, exploring the feature beyond the DTO
▶︎

Java Record, exploring the feature beyond the DTO

Forget Zune. Forget Vista. Copilot Is Microsoft's Biggest Failure
▶︎

Forget Zune. Forget Vista. Copilot Is Microsoft's Biggest Failure

JAVA DTO Pattern Tutorial | Simplify Your Code
▶︎

JAVA DTO Pattern Tutorial | Simplify Your Code

Java Reflection Explained - bɘniɒlqxƎ noiɟɔɘlʇɘЯ ɒvɒᒐ
▶︎

Java Reflection Explained - bɘniɒlqxƎ noiɟɔɘlʇɘЯ ɒvɒᒐ

Building a website with data...but no database! | #ProCoderShow EP 60
▶︎

Building a website with data...but no database! | #ProCoderShow EP 60

How To Use DTOs In .NET REST APIs
▶︎

How To Use DTOs In .NET REST APIs

The ULTIMATE Guide to Spring Boot: Spring Boot for Beginners
▶︎

The ULTIMATE Guide to Spring Boot: Spring Boot for Beginners

Something is jamming GPS over Europe. Here's what we found
▶︎

Something is jamming GPS over Europe. Here's what we found

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains
▶︎

Zig 2026: No-AI Policy, $670K Foundation, Left GitHub & Why Zig Isn’t 1.0 - Andrew Kelley Explains

Unfortunately, I Was Right
▶︎

Unfortunately, I Was Right

How to add Swagger to Spring Boot - Brain Bytes
▶︎

How to add Swagger to Spring Boot - Brain Bytes

The AI Take Over Has Completely Backfired and I Can't Be Happier
▶︎

The AI Take Over Has Completely Backfired and I Can't Be Happier

Modern Architecture 101 for New Engineers & Forgetful Experts - Jerry Nixon - NDC Copenhagen 2025
▶︎

Modern Architecture 101 for New Engineers & Forgetful Experts - Jerry Nixon - NDC Copenhagen 2025

SpringBoot : Spring Data JPA - One To Many & Join Query | Example | Java Techie
▶︎

SpringBoot : Spring Data JPA - One To Many & Join Query | Example | Java Techie

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker
▶︎

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker