1.返回一个网页
1.1问题:
在输入第一个indexcontroller方法,index后:
package com.nowcoder.toutiao.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class IndexController {
@RequestMapping(path = {"/","/index"})
@ResponseBody
public String index(){
return "home";
}
}