Subversion Repositories SmartDukaan

Rev

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

Rev 22079 Rev 22080
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
 
-
 
5
import org.slf4j.Logger;
3
import org.slf4j.Logger;
6
import org.slf4j.LoggerFactory;
4
import org.slf4j.LoggerFactory;
7
import org.springframework.beans.factory.annotation.Value;
5
import org.springframework.beans.factory.annotation.Value;
8
import org.springframework.core.io.Resource;
-
 
9
import org.springframework.stereotype.Controller;
6
import org.springframework.stereotype.Controller;
10
import org.springframework.ui.Model;
7
import org.springframework.ui.Model;
11
import org.springframework.web.bind.annotation.RequestMapping;
8
import org.springframework.web.bind.annotation.RequestMapping;
12
import org.springframework.web.bind.annotation.RequestMethod;
9
import org.springframework.web.bind.annotation.RequestMethod;
13
 
10
 
14
import com.spice.profitmandi.web.config.AppConfig;
-
 
15
 
-
 
16
@Controller
11
@Controller
17
public class DashboardController {
12
public class DashboardController {
18
 
13
 
19
	private static final Logger LOGGER = LoggerFactory.getLogger(DashboardController.class);
14
	private static final Logger LOGGER = LoggerFactory.getLogger(DashboardController.class);
20
	
15
	
21
	@Value("${app.context.path}")
16
	@Value("${app.context.path}")
22
	private String appContextPath;
17
	private String appContextPath;
23
	
18
	
24
	@RequestMapping(value = "/dashboard", method = RequestMethod.GET)
19
	@RequestMapping(value = "/dashboard", method = RequestMethod.GET)
25
	public String dashboard(Model model) throws Exception{
20
	public String dashboard(Model model) throws Exception{
26
		Resource resource = AppConfig.getResource();
-
 
27
		Properties properties = new Properties();
-
 
28
		properties.load(resource.getInputStream());
-
 
29
		model.addAttribute("appContextPath", appContextPath);
21
		model.addAttribute("appContextPath", appContextPath);
30
		return "dashboard";
22
		return "dashboard";
31
	}
23
	}
32
	
24
	
33
}
25
}