From cb3a7518c5304212ebbe64f9a3e2858e6917b77d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20R=C3=A4del?= Date: Fri, 19 Aug 2016 14:20:57 +0200 Subject: [PATCH] Refactored implementation of GreetingController --- .../eureka/client/GreetingControllerImpl.java | 22 ------------------- 1 file changed, 22 deletions(-) delete mode 100644 spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/GreetingControllerImpl.java diff --git a/spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/GreetingControllerImpl.java b/spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/GreetingControllerImpl.java deleted file mode 100644 index bc04099ae2..0000000000 --- a/spring-cloud-eureka/spring-cloud-eureka-client/src/main/java/com/baeldung/spring/cloud/eureka/client/GreetingControllerImpl.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.baeldung.spring.cloud.eureka.client; - -import com.netflix.discovery.EurekaClient; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Lazy; -import org.springframework.web.bind.annotation.RestController; - -@RestController -public class GreetingControllerImpl implements GreetingController { - @Autowired - @Lazy - private EurekaClient eurekaClient; - - @Value("${spring.application.name}") - private String appName; - - @Override - public String greeting() { - return String.format("Hello from '%s'!", eurekaClient.getApplication(appName).getName()); - } -}