为了账号安全,请及时绑定邮箱和手机立即绑定

页面能跳转但是用model 传值前台收不到。

@RequestMapping("goTest")
public String goTest(ModelMap mod){
    TestUser user = new TestUser();
    user.setName("111");
    user.setId(1);
    user.setBirthday(new Date());
    String message="9999999999";
    mod.addAttribute("user",user);
    System.out.println("Test-----------");
    return "thymeleaf/test";
}


正在回答

1 回答

是不是注解写错了,传值要用@Controller!


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

页面能跳转但是用model 传值前台收不到。

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信