Bài 1 / 3~5 phútModern Java trong SpringMiễn phí… lượt xem
Modern Java trong Spring — tổng quan
Records, virtual threads, RestClient, sealed types.
🚧 Module đang xây dựng. Trang này là skeleton lộ trình để theo dõi tiến độ — nội dung bài học sẽ được bổ sung dần.
Module này dạy gì
Records, virtual threads, RestClient, sealed types.
Lessons (dự kiến)
- Records làm DTO/value object — @Validated records
- Virtual Threads (Java 21) — spring.threads.virtual.enabled, khi nào win/lose
- RestClient & HTTP Service Client (@HttpExchange) — thay RestTemplate
- Pattern matching trong service layer
- Sealed types cho domain modeling — Result/Either pattern
- Mini-challenge: refactor controller dùng records + RestClient
Learning outcomes
- Implement records DTO + @Validated
- Choose virtual threads đúng case (win vs lose)
- Implement RestClient + @HttpExchange thay RestTemplate
Yêu cầu trước
Hoàn thành course Spring Security & Testing.
Bài này có giúp bạn hiểu bản chất không?
Hỏi đáp về bài này
Chưa có câu hỏi
Có gì chưa rõ trong bài? Đặt câu hỏi đầu tiên — câu trả lời từ cộng đồng giúp bạn (và người sau).
Đặt câu hỏi đầu tiên