package com.jiayue.ipfcst.client.controller;

import com.jiayue.ipfcst.client.utils.Constant;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * IndexController
 *
 * @author bizy
 * @version 1.0
 * @since 2019/4/9 13:35
 */
@Controller
public class IndexController {
	@RequestMapping("/")
	public String index(ModelMap map) {
		// 加入一个属性，用来在模板中读取
		map.addAttribute("stationCode", Constant.baseBean.getStationCode());
		map.addAttribute("cloudAddr", Constant.baseBean.getCloudAddr());
		map.addAttribute("status", Constant.STATUS);
		map.addAttribute("path", Constant.proBean.getFtpPath());
		// return模板文件的名称，对应src/main/resources/templates/index.html
		return "index";
	}


}
