Subversion Repositories SmartDukaan

Rev

Rev 21615 | Rev 22079 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 21615 Rev 22073
Line 1... Line 1...
1
package com.spice.profitmandi.web.controller;
1
package com.spice.profitmandi.web.controller;
2
 
2
 
-
 
3
import java.util.Properties;
-
 
4
 
3
import org.slf4j.Logger;
5
import org.slf4j.Logger;
4
import org.slf4j.LoggerFactory;
6
import org.slf4j.LoggerFactory;
-
 
7
import org.springframework.core.io.Resource;
5
import org.springframework.stereotype.Controller;
8
import org.springframework.stereotype.Controller;
6
import org.springframework.ui.ModelMap;
9
import org.springframework.ui.Model;
7
import org.springframework.web.bind.annotation.ModelAttribute;
-
 
8
import org.springframework.web.bind.annotation.RequestMapping;
10
import org.springframework.web.bind.annotation.RequestMapping;
9
import org.springframework.web.bind.annotation.RequestMethod;
11
import org.springframework.web.bind.annotation.RequestMethod;
10
 
12
 
-
 
13
import com.spice.profitmandi.web.config.AppConfig;
-
 
14
 
11
@Controller
15
@Controller
12
public class DashboardController {
16
public class DashboardController {
13
 
17
 
14
	private static final Logger LOGGER = LoggerFactory.getLogger(DashboardController.class);
18
	private static final Logger LOGGER = LoggerFactory.getLogger(DashboardController.class);
15
	
19
	
16
	@RequestMapping(value = "/dashboard", method = RequestMethod.GET)
20
	@RequestMapping(value = "/dashboard", method = RequestMethod.GET)
17
	public String dashboard(@ModelAttribute("model") ModelMap model) {
21
	public String dashboard(Model model) throws Exception{
-
 
22
		Resource resource = AppConfig.getResource();
-
 
23
		Properties properties = new Properties();
-
 
24
		properties.load(resource.getInputStream());
-
 
25
		model.addAttribute("appContextPath", properties.getProperty("app.context.path"));
18
		return "dashboard";
26
		return "dashboard";
19
	}
27
	}
20
	
28
	
21
}
29
}