package pl.java.scalatech.web;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import lombok.RequiredArgsConstructor;
import pl.java.scalatech.camel.nbp.NbpCurrentExchange;

@RestController
@RequiredArgsConstructor
class CurrencyController {
    
    private final NbpCurrentExchange ce;
    
    @GetMapping("/byCode/{code}")
    public String getMutlipierByCode(@PathVariable String code){
        return ce.getCurrentMultiplier(code);
    }
    
}

@@ -25,16 +25,140 @@
 h.web;%0A%0A
+import org.springframework.cloud.client.ServiceInstance;%0Aimport org.springframework.cloud.client.discovery.DiscoveryClient;%0A
 import o
@@ -344,93 +344,105 @@
 ort 
-lombok.RequiredArgsConstructor;%0Aimport pl.java.scalatech.camel.nbp.NbpCurrentExchange
+com.samsung.microservice.poc.camel.nbp.NbpCurrentExchange;%0A%0Aimport lombok.RequiredArgsConstructor
 ;%0A%0A@
@@ -508,20 +508,16 @@
 oller %7B%0A
-    
 %0A    pri
@@ -554,16 +554,54 @@
 ce;%0A    
+private final DiscoveryClient client;%0A
 %0A    @Ge
@@ -690,16 +690,17 @@
 ng code)
+ 
 %7B%0A      
@@ -705,43 +705,218 @@
     
-return ce.getCurrentMultiplier(code
+ServiceInstance localInstance = client.getLocalServiceInstance();%0A        return ce.getCurrentMultiplier(code) + %22 %22 + localInstance.getServiceId() + %22:%22 + localInstance.getHost() + %22:%22 + localInstance.getPort(
 );%0A 
@@ -920,15 +920,11 @@
 ;%0A    %7D%0A
-    
 %0A%7D%0A

Update CurrencyController.java