package cn.netkiller.web;
import java.util.HashMap;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class IndexController {
@RequestMapping("/welcome")
@ResponseBody
public String welcome() {
String message = "Welcome";
return message;
}
@RequestMapping("/index")
public ModelAndView index() {
String message = "Helloworld";
return new ModelAndView("index").addObject("message", message);
}
}