@@ -0,0 +1,2200 @@
+import java.util.Random;%0A%0Aimport org.springframework.web.bind.annotation.GetMapping;%0Aimport org.springframework.web.bind.annotation.PathVariable;%0Aimport org.springframework.web.bind.annotation.PostMapping;%0Aimport org.springframework.web.bind.annotation.RequestMapping;%0Aimport org.springframework.web.bind.annotation.RestController;%0Aimport org.springframework.web.client.RestTemplate;%0A%0Aimport com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;%0A%0Aimport lombok.RequiredArgsConstructor;%0Aimport lombok.SneakyThrows;%0Aimport lombok.extern.slf4j.Slf4j;%0A%0A@RestController%0A@RequiredArgsConstructor%0A@Slf4j%0Apublic class ComputeController %7B%0A%0A    private String welcome = %22Welcome to Feign%22;%0A %0A    private final RestTemplate restTemplate;%0A    private final Random random = new Random();%0A    %0A    @GetMapping(%22/message/%7Bname%7D%22)%0A    @HystrixCommand(fallbackMethod = %22cache%22)%0A    public String add(@PathVariable(value = %22name%22) String name) %7B            %0A        String url = %22http://nbp-service/nbp/byCode/USD%22;%0A        calculate();%0A        String response = restTemplate.getForObject(url, String.class);%0A        String result = welcome + %22 %22 + name + %22  current usd value : %22 + response;%0A        log.info(%22result : %7B%7D%22,result);%0A        return result;%0A    %7D%0A    %0A    String cache(String name) %7B%0A        log.info(%22+++ token : %7B%7D%22, name);%0A        return %22I welcome you the great ! %22 + name + %22 currency : 3,666%22 ;%0A    %7D%0A  %0A    @SneakyThrows%0A    void calculate() %7B%0A        if (random.nextInt(10) %3C 3) %7B%0A            Thread.sleep(random.nextInt(2000));%0A            throw new RuntimeException(%22!!!! too slow%22);%0A        %7D        %0A    %7D%0A    %0A    @RequestMapping(%22/nbp/hello%22)%0A    @HystrixCommand(fallbackMethod=%22fallback%22)%0A    public String nbp() %7B        %0A        String url = %22http://nbp-service/nbp/hello%22;%0A        calculate();%0A        return restTemplate.getForObject(url, String.class);%0A    %7D%0A    %0A    %0A    %0A    String fallback()%7B%0A        return %22Service is temporarily slow ..%22;%0A    %7D%0A        %0A    @PostMapping(%22/message/%7Bgreeting%7D%22)%0A    public void updateGreeting(@PathVariable(value = %22greeting%22) String greeting) %7B%0A        welcome = greeting;%0A        log.info(%22Greeting update to %7B%7D%22, welcome);%0A    %7D%0A%7D%0A

Create ComputeController.java