springboot 返回页面

在Django里叫render

案例

@Controller
public class TestController {
    @GetMapping("/test")
    public String isTest(Model model){
        // 前后端传递数据
        model.addAttribute("msg", "Hello World");
        return "text1";
    }
}

猜你喜欢

转载自www.cnblogs.com/wt7018/p/13369105.html