package com.pas.controller;

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

@Controller
public class GenericController {
	@RequestMapping("/")
    public String pageDefault(Model model) {
        model.addAttribute("message", "Hello world!!");
 
        return "welcome";
    }
	
	@RequestMapping("/welcome")
	public ModelAndView pageWelcome() {
		
		return new ModelAndView("welcome", "message", "Bienvenidos a Park&Save!!");
	}
	
	@RequestMapping("/login")
	public String autentificationApp(Model model) {
		
		return "loginForm";
	}
}