I found a solution.
The idea is to register a custom WebArgumentResolver
for the AnnotationMethodHandlerAdapter
, which handles a custom annotation – @SessionAttribute
(or @SessionParam
).
One note to the code posted there is that param.getParameterName()
can be used if no value
is specified.