Google News
logo
Java Springs - Interview Questions
What is a Spring Configuration File?
Since Spring is based on the concept of Dependency Injection, all the classes, interfaces, and their dependencies are stored in a file termed as the spring configuration file. It is a .xml file. The spring container uses this file to control the lifecycle of spring beans. A bean is configured as:
<bean id = "..." class = "..." init-method = "..." lazy-init="true" destroy-method="....">
      <!-- bean dependencies and configurations -->
</bean>
Advertisement