Spring Cloud Zookeeper Updated (#1626)
* Spring Cloud Zookeeper * Spring Cloud Zookeeper Updated * Spring Cloud Zookeeper Updated
This commit is contained in:
		
							parent
							
								
									3fb4e03a49
								
							
						
					
					
						commit
						6cafa3d5a7
					
				| @ -35,11 +35,6 @@ | |||||||
| 			<artifactId>spring-cloud-starter-feign</artifactId> | 			<artifactId>spring-cloud-starter-feign</artifactId> | ||||||
| 			<version>1.2.5.RELEASE</version> | 			<version>1.2.5.RELEASE</version> | ||||||
| 		</dependency> | 		</dependency> | ||||||
| 		<dependency> |  | ||||||
| 			<groupId>org.springframework.boot</groupId> |  | ||||||
| 			<artifactId>spring-boot-starter-thymeleaf</artifactId> |  | ||||||
| 			<version>1.5.2.RELEASE</version> |  | ||||||
| 		</dependency> |  | ||||||
| 	 <dependency> | 	 <dependency> | ||||||
| 	  <groupId>junit</groupId> | 	  <groupId>junit</groupId> | ||||||
| 	  <artifactId>junit</artifactId> | 	  <artifactId>junit</artifactId> | ||||||
|  | |||||||
| @ -5,16 +5,9 @@ | |||||||
|  */ |  */ | ||||||
| package com.baeldung.spring.cloud.greeting; | package com.baeldung.spring.cloud.greeting; | ||||||
| 
 | 
 | ||||||
| import org.springframework.beans.factory.annotation.Autowired; |  | ||||||
| import org.springframework.boot.SpringApplication; | import org.springframework.boot.SpringApplication; | ||||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||||
| import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | 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 | @SpringBootApplication | ||||||
| @EnableDiscoveryClient | @EnableDiscoveryClient | ||||||
|  | |||||||
| @ -6,16 +6,11 @@ | |||||||
| package com.baeldung.spring.cloud.greeting; | package com.baeldung.spring.cloud.greeting; | ||||||
| 
 | 
 | ||||||
| import org.springframework.beans.factory.annotation.Autowired; | 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.RequestMapping; | ||||||
| import org.springframework.web.bind.annotation.RequestMethod; | import org.springframework.web.bind.annotation.RequestMethod; | ||||||
| import org.springframework.web.bind.annotation.ResponseBody; |  | ||||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||||
| 
 | 
 | ||||||
| @Controller | @RestController | ||||||
| public class GreetingController { | public class GreetingController { | ||||||
| 
 | 
 | ||||||
| 	@Autowired | 	@Autowired | ||||||
| @ -23,10 +18,9 @@ public class GreetingController { | |||||||
| 
 | 
 | ||||||
| 	@RequestMapping(value = "/get-greeting", method = RequestMethod.GET) | 	@RequestMapping(value = "/get-greeting", method = RequestMethod.GET) | ||||||
| 
 | 
 | ||||||
| 	public String greeting(Model model) { | 	public String greeting() { | ||||||
| 
 | 
 | ||||||
| 		model.addAttribute("greeting", helloWorldClient.HelloWorld()); | 		return helloWorldClient.HelloWorld(); | ||||||
| 		return "greeting-view"; |  | ||||||
| 
 | 
 | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -5,8 +5,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient; | |||||||
| import org.springframework.cloud.netflix.feign.EnableFeignClients; | import org.springframework.cloud.netflix.feign.EnableFeignClients; | ||||||
| import org.springframework.cloud.netflix.feign.FeignClient; | import org.springframework.cloud.netflix.feign.FeignClient; | ||||||
| import org.springframework.context.annotation.Configuration; | 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.RequestMapping; | ||||||
| import org.springframework.web.bind.annotation.RequestMethod; | import org.springframework.web.bind.annotation.RequestMethod; | ||||||
| import org.springframework.web.bind.annotation.ResponseBody; | import org.springframework.web.bind.annotation.ResponseBody; | ||||||
| @ -36,12 +34,6 @@ public class HelloWorldClient { | |||||||
| 		String HelloWorld(); | 		String HelloWorld(); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/** |  | ||||||
| 	 * Initiate call to Validation. |  | ||||||
| 	 * |  | ||||||
| 	 * @param name |  | ||||||
| 	 * @return the response |  | ||||||
| 	 */ |  | ||||||
| 	public String HelloWorld() { | 	public String HelloWorld() { | ||||||
| 		return theClient.HelloWorld(); | 		return theClient.HelloWorld(); | ||||||
| 	} | 	} | ||||||
|  | |||||||
| @ -5,7 +5,6 @@ | |||||||
|  */ |  */ | ||||||
| package com.baeldung.spring.cloud.helloworld; | package com.baeldung.spring.cloud.helloworld; | ||||||
| 
 | 
 | ||||||
| import org.springframework.http.MediaType; |  | ||||||
| import org.springframework.web.bind.annotation.RequestMapping; | import org.springframework.web.bind.annotation.RequestMapping; | ||||||
| import org.springframework.web.bind.annotation.RequestMethod; | import org.springframework.web.bind.annotation.RequestMethod; | ||||||
| import org.springframework.web.bind.annotation.RestController; | import org.springframework.web.bind.annotation.RestController; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user