Guest User

Untitled

a guest
Aug 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. @SpringBootApplication
  2. public class Application {
  3.  
  4. public static void main(String[] args) {
  5. ApplicationContext ctx = SpringApplication.run(Application.class, args);
  6.  
  7. System.out.println("Let's inspect the beans provided by Spring Boot:");
  8.  
  9. }
  10. }
  11.  
  12. @Controller
  13. public class GreetingController {
  14. @GetMapping("/greeting")
  15. public String greeting(@RequestParam(name = "name", required = false, defaultValue = "World") String name,
  16. Model model) {
  17. model.addAttribute("name", name);
  18. return "greeting";
  19. }
  20. }
Add Comment
Please, Sign In to add comment