TestGit/02-Spring-Dependency-Inject.../target/classes/application.xml

11 lines
666 B
XML

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="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">
<bean name="teacher" class="edu.leijiaqi.entity.PETeacher"></bean>
<bean name="student" class="edu.leijiaqi.entity.Student">
<!-- <property name="teacher" ref="teacher"></property>-->
<constructor-arg name="teacher" ref="teacher"></constructor-arg>
<constructor-arg name="name" value="leijiaqi"></constructor-arg>
</bean>
</beans>