title: Spring: how to pass objects from filters to controllers
body: <p>I'm trying to add a Filter that creates an object that is then to be used inside a controller in a Spring Boot application.</p>
  
  <p>The idea is to use the Filter as a "centralized" generator of this object - that is request-specific and useful only in a controller.
  I've tried to use the <code>HttpServletRequest request.getSession().setAttribute</code> method: I can access my object in the controller, but then it will be (clearly) added to the session.</p>
  
  <p>Are the Filters the right way to do so? If yes, where can I <em>keep</em> the temporary object generated by the filter to be used by the controllers?</p>