Spring Cloud Zookeeper Updated (#1626)

* Spring Cloud Zookeeper

* Spring Cloud Zookeeper Updated

* Spring Cloud Zookeeper Updated
This commit is contained in:
Tehreem 2017-04-11 13:38:29 +05:00 committed by adamd1985
parent 3fb4e03a49
commit 6cafa3d5a7
5 changed files with 3 additions and 30 deletions

View File

@ -35,11 +35,6 @@
<artifactId>spring-cloud-starter-feign</artifactId>
<version>1.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>1.5.2.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>

View File

@ -5,16 +5,9 @@
*/
package com.baeldung.spring.cloud.greeting;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@EnableDiscoveryClient

View File

@ -6,16 +6,11 @@
package com.baeldung.spring.cloud.greeting;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@Controller
@RestController
public class GreetingController {
@Autowired
@ -23,10 +18,9 @@ public class GreetingController {
@RequestMapping(value = "/get-greeting", method = RequestMethod.GET)
public String greeting(Model model) {
public String greeting() {
model.addAttribute("greeting", helloWorldClient.HelloWorld());
return "greeting-view";
return helloWorldClient.HelloWorld();
}

View File

@ -5,8 +5,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
@ -36,12 +34,6 @@ public class HelloWorldClient {
String HelloWorld();
}
/**
* Initiate call to Validation.
*
* @param name
* @return the response
*/
public String HelloWorld() {
return theClient.HelloWorld();
}

View File

@ -5,7 +5,6 @@
*/
package com.baeldung.spring.cloud.helloworld;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;