1 package de.juplo.integrationtest;
4 import org.springframework.beans.factory.annotation.Autowired;
5 import org.springframework.beans.factory.annotation.Value;
6 import org.springframework.stereotype.Controller;
7 import org.springframework.ui.Model;
8 import org.springframework.web.bind.annotation.GetMapping;
9 import org.springframework.web.bind.annotation.RequestParam;
10 import org.springframework.web.reactive.function.client.WebClient;
14 * Fetches data from remote-webserver and renders them as HTML.
18 public class RemoteContentController
23 public RemoteContentController(@Value("${remote.host}")String remoteHost)
25 webClient = WebClient.create(remoteHost);
30 public String renderRemoteText(Model model, @RequestParam String path)
38 .bodyToMono(String.class).block());