Spring mvc @RequestAttribute annotation similar to @RequestParam

I would like to add an annotation similar to @RequestParam, although it pulls the values ​​from the request attribute, not the request parameter ...

Is there an example or explanation of how to create my own annotation for this, as well as a handler / binder?

thank

+1
source share
2 answers

A blog entry titled "Extending Spring MVC Annotation Controller" answers your question. Google to find it, since Stackoverflow will not allow me to create a direct link.

Basically you create the @RequestAttribute annotation and then the custom WebArgumentResolver.

@RequestAttribute @SessionAttribute.

svn .

http://impala-extensions.googlecode.com/svn/trunk/impala-extension-mvc/src/org/impalaframework/extension/mvc/

+3

Spring 4.3 @RequestAttribute Spring MVC, @RequestAttribute

0

Source: https://habr.com/ru/post/1766816/


All Articles