In our previous Articles we saw XML Based container configuration and Annotation based container configuration in detail. In this Article we are going to look at how Spring applications can be configured using Java classes and few annotations with a simple example. Two main annotations on Java based container configuration in Spring are @Configuration and […]
Tag: configuration
In Spring Framework we have three different ways to configure an IoC Container. XML Based Container Configuration Bean configuration will be in the form of XML meta-data. Refer this example for better understanding. Annotation Based Container Configuration Annotations will be used to configure each bean and its properties. Java Based Container Configuration Using Java Based […]
Generally we provide dependencies of a Bean using the <ref/> attribute in Spring Configuration Meta-Data as like below. The “employeeController” bean is directly depending on the “employeeManager” bean. But, all the dependencies of a Bean will not direct like this. Some dependencies will be indirectly referred into the Bean Object. For Example : EmployeeController class […]
Spring IoC Container
What is IoC Container ? Inversion of Control container is nothing but a set of Interfaces and Classes implemented using DI pattern and it is responsible for Instantiating, Assembling and Configuring the Beans that is defined in Configuration Meta-data. org.springframework.beans and org.springframework.context are the base package for Spring IoC container and BeanFactory, ApplicationContext are the […]