Created
November 20, 2016 21:28
-
-
Save ndemengel/91baccb0d4c08782df871ac2a5cd82a6 to your computer and use it in GitHub Desktop.
Sample Spring controller using Handlebars
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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