title: About the use of Beans.xml configuration file in Spring Framework application
body: <p>I am studying Spring MVC. Today, trying to understand how implement a JDBC DAO, I have found this &quot;Hello World&quot; in Spring (Spring, not Spring MVC) and I begin to see it (because I think that to realize a DAO I have to create a separate Spring Project that execute the access to the data...)</p>
  <p><a href="http://www.tutorialspoint.com/spring/spring_hello_world_example.htm" rel="noreferrer">http://www.tutorialspoint.com/spring/spring_hello_world_example.htm</a></p>
  <p>OK, this is a standalone application and this is not a web application, so it doesn't have the web application structure (WEB-INF folder, web.xml file and the dispatcher servlet configuration file that I have in my web app)</p>
  <p>In this example I have a <em>Beans.xml</em> configuration file that is used to assign unique IDs to different beans and to control the creation of objects with different values without impacting any of the Spring source files...</p>
  <p>For example in this example I use the <em>Beans.xml</em> file to pass the &quot;Hello World&quot; message value for &quot;message&quot; variable and so I can print this value without impacting <em>HelloWorld.java</em> and <em>MainApp.java</em> files</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  
  &lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
      xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
      xsi:schemaLocation=&quot;http://www.springframework.org/schema/beans
      http://www.springframework.org/schema/beans/spring-beans-3.0.xsd&quot;&gt;
  
     &lt;bean id=&quot;helloWorld&quot; class=&quot;com.tutorialspoint.HelloWorld&quot;&gt;
         &lt;property name=&quot;message&quot; value=&quot;Hello World!&quot;/&gt;
     &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  <p>So I have some question for you about it:</p>
  <ol>
  <li><p>Is this file the file that configure my <strong>Bean Factory</strong>? I think that, as well as I pass a text value as the value of a variable I could also inject a bean as a dependency of another bean.</p>
  <p>Is it right?</p>
  </li>
  <li><p>In this example, can I don't use the <em>Beans.xml</em> file and using in place of the annotation system?</p>
  </li>
  </ol>