Google News
logo
Java Springs - Interview Questions
What is the syntax to add a bean in the Spring application?
Syntax :
<? xml version ="1.0" encoding ="UTF-8"?>
<beansxmlns="HTTP://www.Springframework.org/schema/beans"xmlns:xsi="HTTP://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="HTTP://www.Springframework.org/schema/beans
HTTP://www.Springframework.org/schema/beans/Spring-beans.xsd">

<beanid="helloWorld"class="com.demoprogram.HelloWorld">
<propertyname="info"value="Hello World!"/>
</bean>
</beans>
Advertisement