4 import org.springframework.stereotype.Controller;
5 import org.springframework.ui.Model;
6 import org.springframework.web.bind.annotation.GetMapping;
7 import org.springframework.web.bind.annotation.RequestParam;
11 * Fetches data from a remote-webserver and renders it as HTML.
15 public class HtmlController
17 RemoteContentService service;
20 public HtmlController(RemoteContentService service)
22 this.service = service;
27 public String fetch(Model model, @RequestParam String path)
29 model.addAttribute("text", service.getRemoteText(path));