title: Should utilities in Spring context be static or injected?
body: <p>I'm writing some utlility methods that helps constructing complex object structures for webservice requests.</p>
  
  <p>When using <code>Spring</code>: is it better to provide these classes as static utilities or inject/autowire them?</p>
  
  <p>Example:</p>
  
  <pre><code>//the service used to build different parts for the webservice request
  class RequestService {
      public addCurrency(Req req) {
          //create currency xml object
          req.addCurrency(cur);
      }
  
      public addPassengers(Req req, List&lt;String&gt; names) {
          for (String name : names) {
              req.getPassengers().add(passenger);
              //create passengers
          }
      }
  }
  class WebserviceClient {
       void runWithStatic() {
           Req req = new Req();
           RequestService.addCurrency(req, ..);
           RequestService.addPassengers(req, ..);
           send(req);
       } 
  
       //or
       @Autowired
       private RequestService reqService;
  
       void runWithInjected() {
           Req req = new Req();
           reqService.addCurrency(req, ..);
           reqService.addPassengers(req, ..);
           send(req);
       } 
  }
  </code></pre>
  
  <p>Is there one approach one would prefer from the overal spring design point of view?</p>