title: Why don't I see any main method in this Java dynamic web project?
body: <p>I was trying to understand how the Web Services work and I came across <a href="http://www.dreamsyssoft.com/blog/blog.php?/archives/7-Simple-REST-Web-Service-in-Java-with-Spring-and-CXF.html" rel="nofollow noreferrer"><strong>this tutorial</strong></a>.</p>
  <p>Now, I've seen Spring being used in enterprise applications and always wondered where the main method was and how everything worked? And whenever I would go to a Spring tutorial they'll start with beanFactory and Contexts and what not, all in a main Java method and from there just keep getting beans as required. This is totally different from what I see in the applications.</p>
  <p>How exactly does Spring work in this case? What is the sequence of calls? I guess there will be some hidden main method somewhere, but I am not sure of that.</p>
  <p>Normally if I were to run a simple Java project from command line, I'd do <code>java mainClass</code>. Now how would it happen in this case?</p>