pegasus974

IndexController

Jun 9th, 2016
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. /*
  2.  * SpringMVC
  3.  * CopyRight Rech Informática Ltda. Todos os direitos reservados.
  4.  */
  5. package com.fernando.controller;
  6.  
  7. import org.springframework.stereotype.Controller;
  8. import org.springframework.ui.Model;
  9. import org.springframework.web.bind.annotation.RequestMapping;
  10. import org.springframework.web.bind.annotation.RequestMethod;
  11.  
  12. /**
  13.  * Descrição da classe.
  14.  */
  15. @Controller
  16. public class IndexController {
  17.  
  18.     @RequestMapping("/index")
  19.     //@RequestMapping(value = "/index",method = RequestMethod.GET)
  20.     public String index(Model model) {
  21.         model.addAttribute("message", "Hello World!");
  22.         return "index";
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment