模板配置

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}

猜你喜欢

转载自www.cnblogs.com/zhou-test/p/10262004.html