Skip to content

Commit a1e7463

Browse files
TehreemNisaadamd1985
authored andcommitted
Spring Cloud Zookeeper Updated (eugenp#1665)
* Spring Cloud Zookeeper * Spring Cloud Zookeeper Updated * Spring Cloud Zookeeper Updated * Spring Cloud Zookeeper Updated
1 parent 576298d commit a1e7463

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

spring-cloud/spring-cloud-zookeeper/Greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingController.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
package com.baeldung.spring.cloud.greeting;
77

88
import org.springframework.beans.factory.annotation.Autowired;
9-
import org.springframework.web.bind.annotation.RequestMapping;
10-
import org.springframework.web.bind.annotation.RequestMethod;
9+
import org.springframework.web.bind.annotation.GetMapping;
1110
import org.springframework.web.bind.annotation.RestController;
1211

1312
@RestController
@@ -16,8 +15,7 @@ public class GreetingController {
1615
@Autowired
1716
private HelloWorldClient helloWorldClient;
1817

19-
@RequestMapping(value = "/get-greeting", method = RequestMethod.GET)
20-
18+
@GetMapping("/get-greeting")
2119
public String greeting() {
2220

2321
return helloWorldClient.HelloWorld();

spring-cloud/spring-cloud-zookeeper/HelloWorld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldController.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
*/
66
package com.baeldung.spring.cloud.helloworld;
77

8-
import org.springframework.web.bind.annotation.RequestMapping;
9-
import org.springframework.web.bind.annotation.RequestMethod;
8+
import org.springframework.web.bind.annotation.GetMapping;
109
import org.springframework.web.bind.annotation.RestController;
1110

1211
@RestController
1312
public class HelloWorldController {
1413

15-
@RequestMapping(path = "/helloworld", method = RequestMethod.GET)
14+
@GetMapping("/helloworld")
1615
public String HelloWorld() {
1716
return "Hello World!";
1817
}

0 commit comments

Comments
 (0)