본 강의는 자바 백엔드 개발의 실전 코스를 완성하는 마지막 강의입니다. 스프링 부트와 JPA 실무 완전 정복 로드맵을 우선 확인해주세요. (링크)
김영한의 실전! Querydsl
최신 자바 백엔드는 주로 스프링 부트와 JPA, 스프링 데이터 JPA를 조합해서 사용합니다. 그런데 이런 조합으로 해결하지 못하는 한계점이 바로 복잡한 쿼리와 동적 쿼리 문제입니다.
실무에서는 보통 복잡한 쿼리를 다루고, 여기에 더해서 동적 쿼리를 사용할 일도 많습니다. 비즈니스 도메인에 따라서 쿼리를 작성하는 일이 개발 업무의 절반 이상인 경우도 있습니다. 이러한 문제들을 깔끔하게 해결해주는 기술이 바로 Querydsl입니다.
한계를 뛰어넘고 싶다면, JPA + Querydsl은 선택이 아닌 필수입니다.
Querydsl은 자바 언어의 한계를 넘어서, 쿼리를 문자가 아니라 진짜 자바 코드로 작성할 수 있게 도와줍니다. 정말 많은 개발자들이 고민해온 동적 쿼리 문제를 깔끔하게 해결할 뿐만 아니라, 문법 오류도 컴파일 시점에 모두 잡아줍니다. 자바 코드로 작성하지만 SQL, JPQL과 문법이 거의 같기 때문에 쉽게 학습할 수 있고, 또 쉽게 복잡한 쿼리도 작성할 수 있습니다.
스프링 부트와 JPA라는 기반 위에, 스프링 데이터 JPA와 Querydsl이라는 두 환상적인 프레임워크를 더하면 개발이 정말 즐거워집니다. 지금까지 조금이라도 단순하고 반복이라 생각했던 개발 코드들이 확연히 줄어듭니다. 개발자는 핵심 비즈니스 로직을 개발하는데, 집중할 수 있습니다. 그리고 Querydsl 덕분에 쿼리를 작성하는 것 조차도 자바 코드로 작성할 수 있어서 즐겁습니다. 복잡한 실무에서 스프링 데이터 JPA와 Querydsl의 조합은 선택이 아니라 필수입니다.
이 강의에서는 Querydsl의 완전 기초부터 다양한 실무 프로젝트에서 쌓은 노하우들까지 Querydsl에 관한 모든 내용을 전달해 드립니다.
In fact, pure JPA was fun, but after learning about DataJPA, I felt, “Wow, it’s so convenient...”. I’m experiencing this once again. It’s truly the flower of JPA.
I was struck by Younghan’s words that development would become so much fun if you knew about Querydsl. While listening to the previous lecture, I wondered how good Querydsl was that he recommended it so much.
One thing that has changed noticeably is that my fingers are increasingly idle.
While writing a query by opening parentheses and double quotation marks with em.createQuery,
I used to write queries directly with @Query when they were a bit complicated and long, but now I just type s, f, w, f and IntelliJ does it all;; I think my fingers are becoming more and more lazy.
This is why Younghan often talked about Querydsl in the previous lectures! ㅎㅎㅎ
But at the end of the lecture, the saying, 'There is no free lunch in the world' came to mind.
I felt that both DataJPA and Querydsl should be used based on an understanding of pure JPA. If you look at the internal code, it is ultimately an abstraction of pure JPA. Anything convenient has a price. I should go review the basics again to use it better ㅎㅎ
JPA's father, Younghan. He is really the best!
I recommend this lecture!
Finally, I finished the JPA roadmap with this lecture.
Personally,
I had moved from Java backend development to Python backend development,
and I wanted to go back to Java,
so I had to study the changed Spring development environment again,
and I was wondering how to study, and I found Younghan's lecture on Infraon, and that's how I ended up here.
I had a gut feeling that the sample lecture content was extraordinary(?), so I ended up watching all the lectures(?) and I'm really satisfied. It was also a good opportunity to decide the direction of my development studies that I had been wandering around.
Thank you.
I sincerely congratulate you on completing the roadmap. Just the fact that you have made it this far shows that you are a perfect fit for the Java backend developer. I am sure that if you continue to study in the direction you have chosen, you will become a better developer. If you have any questions while studying, please feel free to ask me anytime^^! I will always cheer you on!
I needed to learn Querydsl in a short period of time to apply dynamic queries, and it was very helpful that you explained in detail how to use it in practice with clear explanations. Now all that's left is to apply it. Thank you! :)
[Spring Complete Conquest] Roadmap, [Spring Boot and JPA] Roadmap, I've done them all.
Sigh~~~ I don't want to see Younghan again on Inflearn (it was so hard ㅠㅠㅠ)
I've never left a course review, but I'll leave one word for the first and last time.
[When it comes to Spring, don't be stingy with your money, and take Younghan's lecture.]
(Younghan was a creep to me)