Is there a nice way to have Spring's @Controller
classes to call a specific method once per request?
Right now I'm using a method annotated with @InitBinder
for this purpose, but this is suboptimal as @InitBinder
methods get called several times per request. I just want to do some initialization / update stuff to use in my controllers.
What I'm looking for is something like Rails' before_filter
, but as far as I can tell there's no functionality like that in Spring.