SpringBoot以form形式接受单值

  • A+
所属分类:SpringBoot

controller里:

@PostMapping("{prodNo}/edit")
    @RequestMapping(value = "/{prodNo}/edit", method = { RequestMethod.GET, RequestMethod.POST })
    public ModelAndView edit(FormEntity formEntity, BindingResult result){
}

FormEntity包含prodNo字段即可用formEntity.prodNo取得。

 

ZPY

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: