title: What is the simplest main() method for a Spring application?
body: <p>I wrote the following, but it exits immediately:</p>
  
  <pre><code>public static void main(String[] args) {
      new ClassPathXmlApplicationContext("/springtests/test01.xml");
  }
  </code></pre>
  
  <p><code>test01.xml</code> contains multiple beans with some threads (daemons) which connects to the network etc.</p>
  
  <p>How to wait or something?</p>