title: Is it advantageous to create a Spring bean when I can access the only static method directly with class name
body: <p>I think my understanding of spring beans is a bit off.</p>
  
  <p>I was working on my project and I was thinking about this situation. </p>
  
  <p>Say I have class <code>Foo</code></p>
  
  <pre><code>class Foo(){   
     public void doSomething(Object a , Object b){ // input parameters does not matter actually.
        //do something
     }
  }
  </code></pre>
  
  <p>If I am using this class in another class like :</p>
  
  <pre><code>class Scheduler{
    ....
   @Autowired
   private Foo foo;
  
   someMethod(){
      foo.doSomeThind(a,b);
   }
    ....
  }
  </code></pre>
  
  <p>In the above case Instead of Autowiring the <code>Foo</code>, I can make <code>doSomeThing</code> static and directly use <code>Foo.doSomeThing(a,b)</code></p>
  
  <p>I was just wondering if there any advantage of creating a bean or if there any disadvantage of using static methods like this?   </p>
  
  <p>If they are same, When should I go for spring bean and when should do I simply use a static method?</p>