java-tutorials/spring-core/src/main/resources/classpathxmlapplicationcontext-example.xml

18 lines
898 B
XML
Raw Normal View History

2016-12-11 18:27:47 +08:00
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2016-12-12 09:23:40 +01:00
xmlns:context="http://www.springframework.org/schema/context"
xmlns="http://www.springframework.org/schema/beans"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
2016-12-11 18:27:47 +08:00
<context:annotation-config/>
<bean id="student" class="com.baeldung.applicationcontext.Student" destroy-method="destroy">
<property name="no" value="15"/>
<property name="name" value="Tom"/>
</bean>
<bean id="math" class="com.baeldung.applicationcontext.Course">
<property name="name" value="math"/>
</bean>
<bean name="teacher" class="com.baeldung.applicationcontext.Teacher"/>
</beans>