Java tutorial
/* * 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 org.ucll.ip.spring_ip_project.controller; import domain.MaintenanceSystem; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.ModelAndView; /** * * @author wouteradriaens */ @Controller @RequestMapping(value = "/mapinfo") public class MapController { @Autowired private MaintenanceSystem system; @RequestMapping(method = RequestMethod.GET) public ModelAndView getMapInfo() { return new ModelAndView("mapinfo", "mapinfo", system.getMapInfo()); } }