Subversion Repositories SmartDukaan

Rev

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

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