From bb4a386806e1816d1d0b1c786ea45c1b7d77ba58 Mon Sep 17 00:00:00 2001 From: Razafinirina Date: Thu, 17 Mar 2022 22:24:55 +0100 Subject: [PATCH] ajout lombok --- 02.restful-web-services/pom.xml | 7 +++++++ .../helloworld/HelloWorldController.java | 3 +++ 2 files changed, 10 insertions(+) diff --git a/02.restful-web-services/pom.xml b/02.restful-web-services/pom.xml index f9c948e6..1beda551 100644 --- a/02.restful-web-services/pom.xml +++ b/02.restful-web-services/pom.xml @@ -99,6 +99,13 @@ spring-boot-starter-test test + + + org.projectlombok + lombok + + + diff --git a/02.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/helloworld/HelloWorldController.java b/02.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/helloworld/HelloWorldController.java index d383dce7..b3c07625 100644 --- a/02.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/helloworld/HelloWorldController.java +++ b/02.restful-web-services/src/main/java/com/in28minutes/rest/webservices/restfulwebservices/helloworld/HelloWorldController.java @@ -2,6 +2,7 @@ import java.util.Locale; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; @@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController; //Controller +@Slf4j @RestController public class HelloWorldController { @@ -30,6 +32,7 @@ public HelloWorldBean helloWorldBean() { ///hello-world/path-variable/in28minutes @GetMapping(path = "/hello-world/path-variable/{name}") public HelloWorldBean helloWorldPathVariable(@PathVariable String name) { + log.info("Hello Word with PathVariable"); return new HelloWorldBean(String.format("Hello World, %s", name)); }