Spring 3 web request interceptor - how do I get BindingResult?

后端 未结 2 1457
青春惊慌失措
青春惊慌失措 2021-01-21 07:40

I realy appreciate Spring 3 anoation driven mapping of Web Controllers

I have a lot of Controllers with signatures like:

@RequestMapping(value = \"solici         


        
2条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 08:24

    After execution of controller method BindingResult is stored as a model attribute named BindingResult.MODEL_KEY_PREFIX + , later model attributes are merged into request attributes. So, before merging you can use Hurda's own answer, after merging use:

    request.getAttribute(BindingResult.MODEL_KEY_PREFIX + "solicitation")
    

提交回复
热议问题