Posts

Showing posts with the label Spring

Differences between BeanFactory and ApplicationContext

Read this article to know what are the differences between BeanFactory and ApplicationContext in Spring Framework. BeanFactory and ApplicationContext interfaces are acts as IOC container. BeanFactory locates in org.springframework.beans.factory package and ApplicationContext locates in org.springframework.context path. ApplicationContext build on top of BeanFactory. So, ApplicationContext will provide the additional functionalities over BeanFactory. Simple integration with Spring AOP, Message Resource Handling (I18N), Event Propagation and application layer specific context(WebApplicationContext) are additional features available with ApplicationContext. Because of these features ApplicationContext is better to use than the BeanFactory. Instantiation of BeanFactory and ApplicationContext: BeanFactory: BeanFactory will use the XmlBeanFactory() class to instantiate. XmlBeanFactory() will use the Resource object to load the bean configuration file. Resource resource = new

How to create spring application by using eclipse IDE

Image
To create spring application by using eclipse IDE, we have to follow below steps. There are majorly 5 steps we mentioned for how to create spring application by using eclipse IDE. That are, Create Java Project Add spring jar files Create the bean class Create XML file to provide values Create the Test class Create Java Project:         Follow these suggestions to create a new Java Project in Eclipse IDE. File --> New --> Java Project         Click 'Next' and then click 'Finish'. Add Spring libraries:         Once creating the project you can download the Spring core module libraries from the Internet and add it into your creating project. Spring core library files:         The below which I mentioned library files are related to Spring core module. In that which are mandatory and which are optional library files also I defined in below. Download those all library files from Internet and add into newly creating Spring