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: Apply logging and cleanup - Spring Tutorial
From the course: Learning Lombok: Streamlined Java Programming
Solution: Apply logging and cleanup
(upbeat music) - [Instructor] For this code challenge solution, we'll be using the same project code from 03_05_challenge, LombokDemo in IntelliJ. 03_06_solution codebase will match up to the 03_05 at the end. I'm going to be moving through these tasks quickly, so let's go ahead and begin. Our first task was to apply the Slf4j annotation to multiple classes and remove the static logger variables from those classes. Let's go ahead and start with our controllers. On our address controller at the top, we'll type @Slf4j. I'm going to copy this to speed up my process, and then I'm going to remove the static logger and the employee class. We'll do the same. Remove the static logger. The same in our employee image. Again, remove the static logger. Fibonacci controller. Again and remove the static logger. We'll go down to our service package and start with their address service. Again, paste in the Slf4j, remove our…
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
-
-
-
-
-
(Locked)
Simplify logging boilerplate code3m 42s
-
(Locked)
Cleaning up code and releasing resources3m 13s
-
(Locked)
Caching expensive one-time calculations3m 36s
-
(Locked)
Shorten your exception handling with SneakyThrows4m 50s
-
(Locked)
Challenge: Apply logging and cleanup2m 50s
-
(Locked)
Solution: Apply logging and cleanup3m 54s
-
(Locked)
-