|
|
|
|
@ -2,22 +2,18 @@
|
|
|
|
|
<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
|
|
|
|
|
<<<<<<< HEAD
|
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
|
|
|
|
|
|
|
|
<!-- 配置Student实体类的Bean,采用Setter方法注入 -->
|
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
|
|
|
<bean id="student" class="com.ssm.di.Student">
|
|
|
|
|
<!-- 依赖注入属性值,根据实际需求修改属性值 -->
|
|
|
|
|
<property name="studentId" value="2026001"/>
|
|
|
|
|
<property name="studentName" value="张三"/>
|
|
|
|
|
<property name="className" value="计科2班"/>
|
|
|
|
|
<property name="major" value="计算机科学与技术"/>
|
|
|
|
|
<property name="age" value="20"/>
|
|
|
|
|
<property name="phone" value="13800138000"/>
|
|
|
|
|
<property name="studentId" value="2025001"/>
|
|
|
|
|
<property name="studentName" value="张三"/>
|
|
|
|
|
<property name="className" value="计科2班"/>
|
|
|
|
|
<property name="major" value="计算机科学与技术"/>
|
|
|
|
|
<property name="age" value="20"/>
|
|
|
|
|
<property name="phone" value="13800138000"/>
|
|
|
|
|
</bean>
|
|
|
|
|
</beans>
|
|
|
|
|
=======
|
|
|
|
|
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- ==================== 1. 院系管理Bean配置(setter方式注入) ==================== -->
|
|
|
|
|
<bean id="department" class="com.ssm.ioc.Department">
|
|
|
|
|
@ -35,16 +31,5 @@
|
|
|
|
|
<property name="campus" value="主校区"/>
|
|
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
|
<!-- ==================== 其他小组实体Bean可在此处继续配置(如学生、专业、班级等) ==================== -->
|
|
|
|
|
<!-- 示例:专业Bean(与院系关联,ref引用department) -->
|
|
|
|
|
<!--
|
|
|
|
|
<bean id="major" class="com.ssm.di.xml.Major">
|
|
|
|
|
<property name="majorId" value="1"/>
|
|
|
|
|
<property name="majorName" value="计算机科学与技术"/>
|
|
|
|
|
<property name="majorCode" value="CS001"/>
|
|
|
|
|
<property name="department" ref="department"/>
|
|
|
|
|
</bean>
|
|
|
|
|
-->
|
|
|
|
|
|
|
|
|
|
</beans>
|
|
|
|
|
>>>>>>> origin/main
|
|
|
|
|
|