Skip to content

Sudarshan-Gowda/Spring5-BeanUsingXmlConfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Spring5-BeanUsingXmlConfig

Spring bean XML configuration example

This repo will demonstrate the creation of spring beans and populate application context in any spring application. This example uses xml configuration to define beans.

Bean Registartion in xml file

<bean id="technologyDetails"
	class="com.star.sud.bean.TechnologyDetails"></bean>

Accessing the bean though ApplicationContext

ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
	TechnologyDetails technologyDetails = context.getBean(TechnologyDetails.class);

About

Spring bean XML configuration example

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages