Understand the right way to develop APIs using Spring Boot and JPA.
Understand how to tune API query performance using Spring Boot and JPA.
Understand how to optimize practical performance using Spring Boot and JPA.
Want to use Spring Boot effectively in practice? Develop the power to solve even complex problems.
🚩 This course is a roadmap course.
This lecture is the second in a practical course on Java backend development. Please first review the roadmap for mastering Spring Boot and JPA(link) .
Practice! Using Spring Boot and JPA 2 - API Development and Performance Optimization
In the Java world, developing web applications using Spring Boot and JPA is a global trend. Consequently, many developers are learning and using these two technologies. However, effectively utilizing these technologies in diverse and complex real-world situations while also considering performance is not as easy as it might seem.
In practice, you need to go beyond functional development to solve technical problems. You need to develop applications that optimize performance in complex, data-intensive situations while also being easy to maintain.
Course Objectives
While Part 1 focused on implementing features while developing web applications, Part 2 goes beyond functional development and focuses on solving technical issues . We'll cover how to implement them properly , what performance issues typically arise in practice, and how to address them. We'll also help you resolve technical issues.
Implement the API properly
Even when developing a single API, using JPA introduces the concept of entities, leading to numerous concerns. Should entities be exposed directly to the API? Or should they be created as separate objects and returned? How should lazy loading be handled when returning entities? These questions often arise. We'll share practical know-how on how to implement these in a safe and maintainable way.
In practice, complex situations often arise where multiple tables must be joined to quickly retrieve data. However, this often requires the addition of collection data with one-to-many relationships, and additional paging may be required. This complicates the problem significantly, making it difficult to resolve with simple table joins. This article will share practical know-how on how to optimize these complex query performance issues with JPA and its limitations.
Performance tuning by coding complex examples in six steps.
We've prepared a six-step guide to help you develop an underperforming API, analyze why it's failing, and tune it step-by-step through coding . By following this guide, you'll naturally learn how to address complex performance issues in real-world situations.
Solving 90% of practical JPA performance issues
This course covers a variety of performance issues that frequently arise in practice, helping you resolve 90% of practical JPA performance issues. I've seen countless developers working on Spring Boot and JPA projects successfully implement functionalities, but struggle with performance issues at the end of the project. So, when I went to help them, I often found they didn't know how to optimize JPA performance.
I've seen a wide range of scenarios, from people who pulled all-nighters trying to figure out a solution, to those who, unsure of a solution, manually rewrote SQL instead of JPA and converted countless codes into SQL. However, when I actually went to help, it took less than five minutes to tune the system for optimal performance. I can still vividly see the look on the developer's face as they saw a query that used to take an hour, despite days of hard work, reduced to tens of seconds by adjusting JPA query options and making a few minor code changes. JPA inherently provides a wide range of performance tuning options , so with just a few options and code modifications, you can experiment with various performance optimizations.
If you understand what I'm talking about in this lecture, you'll be able to solve 90% of your practical performance problems.
Main Table of Contents
These days, rather than using view templates to directly generate HTML on the server and respond, many developers are loading JSON data into APIs and returning it. The goal of this article is to understand the considerations and proper design guidelines for developing APIs using Spring Boot and JPA, and to complete the API with performance in mind.
Part 2 develops a REST API based on the domain created in Part 1. We then step by step optimize the performance of the query API. This process provides a thorough and comprehensive explanation of JPA query tuning, a crucial practice.
API Development Basics : Develop a basic REST API for registration, modification, and querying.
Advanced API Development: We'll explain the key considerations and design guidelines for developing query APIs using JPA in practice. We'll address JPA lazy loading issues and explain various performance optimizations step-by-step.
Essential Optimizations for Practice: Covers OSIV topics that can lead to practical issues if not handled carefully when using Spring Boot and JPA.
How to learn
This course is largely hands-on . Therefore, you'll get the most out of it by following the lecture from beginning to end, coding on your own .
Please note that this course is intended for those who have some familiarity with Spring Boot and JPA and are capable of developing simple web applications. The goal is to help these individuals develop a deep technical understanding beyond functional implementation. Therefore, if you lack a solid understanding of Spring Boot and JPA, we recommend taking Part 1 first.
💻 Check out the player lecture!
We'll develop an API based on the domain model designed in Part 1 and demonstrate various performance optimization techniques. Therefore, we recommend taking Part 1 before Part 2.
The book is for those who want to study more in-depth content. You can think of it as a reference book. (Even if you don't have a book, separate materials for the lecture will be provided.)
Recommended for these people
Who is this course right for?
For those who use Spring Boot and JPA in their work but want to get better use out of the technology
I know Spring Boot and JPA, but I want to understand the correct way to develop APIs.
Those who know Spring Boot and JPA, but want to understand the performance optimization techniques required for practical use
I know Spring Boot and JPA, but I want to understand the in-depth content that is essential for practical use.
What if I tell you everything, Team Leader!
This lecture is full of know-hows that have been very helpful in my work.
Thank you for making such a great lecture :)
Thanks to the numerous Q&A's posted by students studying Spring and JPA together, if you have any questions while watching the lecture, 90% of them can be resolved by referring to the Q&A. This is because King Young-Hwan has been paying attention to the Q&A from the beginning... It is a lecture where I can earn money just by paying and listening.
I have completed the JPA Basics and Utilization 1 and 2.
There were many lectures that were so boring that it was hard to listen to them without playing them at high speed, but I couldn't play Younghan's lectures at high speed. The content was so rich and the lecture tension was good, so I was able to concentrate and listen to all the lectures. Thank you for the great lecture~!~!
Wow! Thank you, Jeongwon. Actually, I also think that tension is important, so when the tension dies down, I take it again. ㅋㅋㅋ I worked hard on this part, so I feel good to receive good feedback. ㅎㅎ
* You explain the best practices, but you also explain the bad practices, so I could understand why the improved ones are the best practices.
* You explain in detail the trade-offs of development convenience, performance, and maintenance. I haven't experienced much traffic yet, but I was able to understand what backend developers should consider to improve performance when the service grows and traffic increases.
* When I worked on improving performance, you showed me SQL queries one by one and explained how performance optimization is done, and also explained that this type of performance optimization is not always a silver bullet.
After listening to the explanation of Spring Data JPA and QueryDSL, I feel like I want to solidify my basics of DB and JPA.
Thank you for sharing your practical experience in a great lecture :)