Skip to content

Instantly share code, notes, and snippets.

@ndemengel
Created November 20, 2016 21:28
Show Gist options
  • Save ndemengel/91baccb0d4c08782df871ac2a5cd82a6 to your computer and use it in GitHub Desktop.
Save ndemengel/91baccb0d4c08782df871ac2a5cd82a6 to your computer and use it in GitHub Desktop.
Sample Spring controller using Handlebars
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class HelloController {
@RequestMapping(path = "/hello", method = RequestMethod.GET)
public ModelAndView sayHelloTo(@RequestParam String name) {
return new ModelAndView("hello", "name", name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment