title: Autowiring session in Spring?
body: <p>I'm new to spring and I've written a method that uses the HttpSession object. I use the method qite often. Right now I pass the parameter as a argument to the method. But that means that everywhere I use the method, I need to pass it in as a parameter, which means the method calling it needs the parameter HttpSession as parameter. I was wondering if I could somehow pass the session automatically (@Autowire?) so I dont need to pass it every time I use the method:</p>
  
  <p>As an example:</p>
  
  <pre><code>public User getUser(HttpSession session){
     //DoStuff
  }
  </code></pre>
  
  <p>Everywhere I call the method I need to pass in the session:</p>
  
  <pre><code>public void addItem(@RequestParam(value="id") int id, HttpSession session){
          super.getUser(session);
         //doStuff
  }
  </code></pre>
  
  <p>I don't want the HttpSession session in the signature, whenever I have to call getUser(...), Is there a way to let Spring fill in this session in getUser(), automatically?</p>