/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package controladores;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;


@Controller
@RequestMapping (value = "/home")
public class PruebaController {
    
    @RequestMapping (value ="/1" ,method = RequestMethod.GET)
    public ModelAndView prueba(){
        return new ModelAndView("home", "dato", "algun dato");
    }
    @RequestMapping (value ="/2" ,method = RequestMethod.GET)
    public String prueba2 (Model modelo){
         modelo.addAttribute("dato", "Algun dato");
        return "home";
    }
}
