From the course: Learning Lombok: Streamlined Java Programming
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Solution: Utilizing simplified Lombok POJOs - Spring Tutorial
From the course: Learning Lombok: Streamlined Java Programming
Solution: Utilizing simplified Lombok POJOs
(upbeat music) - [Instructor] For this exercise, I'm going to be using 0206 Challenge Project Code to complete the challenge tasks. By the time I'm done, it should more or less look like the project code in 0207 Solution. So first off, let's open up the employee entity class and we're going to default the created date to a new date. And we're going to annotate this with @ builder default then switching over to the address object, we're going to go ahead and annotate the top of this object with builder and we're going to scroll down to employee type, and again, we're going to apply the builder default, and we're going to set the default type to a string literal of home. At the bottom, we'll do the same for the created date. We'll set this to a new date and we're going to annotate this as well, with builder default. In the Lombok demo application, we're going to first start off by deleting this create date, since it…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Lombok implements a builder design pattern4m 55s
-
(Locked)
Simplifying null checks and removing bloat3m 58s
-
(Locked)
Simplify final local variable declaration4m 40s
-
(Locked)
Mutable local variables versus JEP 286 var4m 22s
-
(Locked)
Mutable setters using Lombok @With4m 17s
-
(Locked)
Challenge: Utilizing simplified Lombok POJOs3m 41s
-
(Locked)
Solution: Utilizing simplified Lombok POJOs8m 19s
-
-
-