主要原因是封装的类型与表单传入的字段类型无法匹配

controller接受post方法,将字段封装成user,因此表单传入的类型必须完全匹配User中的字段类型

    @RequestMapping(value="/reg",method=RequestMethod.POST)
    public String reg(Model model,User user){
            ...
    }

 

相关文章:

  • 2021-11-08
  • 2022-01-18
  • 2022-12-23
  • 2021-12-22
  • 2021-05-14
  • 2022-01-13
  • 2022-12-23
  • 2021-07-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-05-01
  • 2021-09-17
  • 2021-09-26
  • 2021-04-15
相关资源
相似解决方案