Skip to content

Instantly share code, notes, and snippets.

@r-winkler
Created April 30, 2016 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-winkler/4ef517b1b5ce666a2d142c83bc8ab45d to your computer and use it in GitHub Desktop.
Save r-winkler/4ef517b1b5ce666a2d142c83bc8ab45d to your computer and use it in GitHub Desktop.
@RestController
public class HelloController {
@RequestMapping("/hello")
public String sayHello(HttpServletResponse response) throws InterruptedException {
response.setHeader("Cache-Control", "max-age=5");
TimeUnit.SECONDS.sleep(2);
return "Hello World!";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment