title: What's the harm to make a STATIC method in service layer -- Spring 3
body: <p>I know it is not a best design but just a thought from a Spring newbie.</p>
  
  <p>Now we can easily <code>autowire</code> any service method to each other conveniently in Spring framework. But What is the disadvantage to create a static factory method of the service class and call it everywhere?</p>
  
  <p>It's pretty common like this:</p>
  
  <pre><code>@Autowired
  CustomerService customerService;
  
  ....
  AccountDetail ad = customerService.getAccountDetail(accountId, type);
  </code></pre>
  
  <p>But this should work too:</p>
  
  <pre><code>AccountDetail ad = CustomerService.getAccountDetail(accountId, type); //if we make getAccountDetail(String, String) static
  </code></pre>
  
  <p>So why there is a design like autowire? It looks fancy and really cool, but the work behind this is still create one service bean instance on another service object.</p>
  
  <p>Seriously while Spring is all over the market so many posts and articles are talking about pros &amp; renovations. But is it guaranteeing better performance(like using autowire instead of static)?</p>