【牛客网中级项目】第二章(第二次的bug)

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";
    }
}

【牛客网中级项目】第二章(第二次的bug)_第1张图片

你可能感兴趣的:(项目一笔记)