
package com.platform.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.platform.utils.Configs;

@Controller
public class DefaultController {
	
	public final static Logger log = Logger.getLogger(DefaultController.class);
	
	/** 首页
	 * @param req
	 * @param res
	 * @return
	 */
	@RequestMapping("/")
	public ModelAndView defaultHandler(HttpServletRequest req, HttpServletResponse res){
		//处理不匹配的请求		
		log.info("index");		
		return new ModelAndView("index");
	}
	
	/** 测试
	 * @param req
	 * @param res
	 * @return
	 */
	@RequestMapping("/test")
	public ModelMap test(HttpServletRequest req, HttpServletResponse res){
		log.info(Configs.EXTRACT_LOG_LOCALTION);
		return new ModelMap();
	}
	
}

