Subversion Repositories SmartDukaan

Rev

Rev 21615 | Rev 22079 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

package com.spice.profitmandi.web.controller;

import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.Resource;
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 com.spice.profitmandi.web.config.AppConfig;

@Controller
public class DashboardController {

        private static final Logger LOGGER = LoggerFactory.getLogger(DashboardController.class);
        
        @RequestMapping(value = "/dashboard", method = RequestMethod.GET)
        public String dashboard(Model model) throws Exception{
                Resource resource = AppConfig.getResource();
                Properties properties = new Properties();
                properties.load(resource.getInputStream());
                model.addAttribute("appContextPath", properties.getProperty("app.context.path"));
                return "dashboard";
        }
        
}