예제 #1
0
 @RequestMapping("/{tutorial}/images/{image:[a-zA-Z0-9._-]+}")
 public ResponseEntity<byte[]> loadImage(
     @PathVariable String tutorial, @PathVariable String image) {
   return new ResponseEntity<>(tutorials.find(tutorial).getImage(image), HttpStatus.OK);
 }
예제 #2
0
 @RequestMapping("/{tutorial}")
 public String viewTutorial(@PathVariable String tutorial, Model model) {
   model.addAttribute("tutorialId", tutorial);
   model.addAttribute("tutorial", tutorials.find(tutorial));
   return "guides/tutorial/show";
 }