模板配置

 

 

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ViewController {
    @RequestMapping("/page")
    public String getPage(Model model){
        model.addAttribute ("name","哈哈哈");
        return "index";
    }
}

 

hhhhhhhhhh ${name}

 

posted @ 2019-01-13 10:24  小周lucky  阅读(289)  评论(0)    收藏  举报