Spring Cloud Zookeeper Updated (#1665)
* Spring Cloud Zookeeper * Spring Cloud Zookeeper Updated * Spring Cloud Zookeeper Updated * Spring Cloud Zookeeper Updated
This commit is contained in:
parent
576298dc7b
commit
a1e7463a42
@ -6,8 +6,7 @@
|
||||
package com.baeldung.spring.cloud.greeting;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@ -16,8 +15,7 @@ public class GreetingController {
|
||||
@Autowired
|
||||
private HelloWorldClient helloWorldClient;
|
||||
|
||||
@RequestMapping(value = "/get-greeting", method = RequestMethod.GET)
|
||||
|
||||
@GetMapping("/get-greeting")
|
||||
public String greeting() {
|
||||
|
||||
return helloWorldClient.HelloWorld();
|
||||
|
@ -5,14 +5,13 @@
|
||||
*/
|
||||
package com.baeldung.spring.cloud.helloworld;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
public class HelloWorldController {
|
||||
|
||||
@RequestMapping(path = "/helloworld", method = RequestMethod.GET)
|
||||
@GetMapping("/helloworld")
|
||||
public String HelloWorld() {
|
||||
return "Hello World!";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user