|
|
<?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 id="student" class="com.ssm.ioc.Student">
|
|
|
<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>
|
|
|
|
|
|
|
|
|
<!-- 公告栏实体Bean -->
|
|
|
<!-- 公告栏实体Bean - 通过setter方法注入 -->
|
|
|
<bean id="announcement1" class="com.ssm.ioc.Announcement">
|
|
|
<property name="id" value="1001"/>
|
|
|
<property name="title" value="系统维护通知"/>
|
|
|
<property name="content" value="系统将于今晚22:00至23:00进行例行维护,期间暂停服务,请提前做好工作安排。"/>
|
|
|
<property name="publisher" value="管理员"/>
|
|
|
<property name="publishTime" value="2026-04-10 09:00:00"/>
|
|
|
<property name="status" value="1"/>
|
|
|
<property name="type" value="2"/> <!-- 2:重要 -->
|
|
|
<property name="expireDate" value="2026-04-20 23:59:59"/>
|
|
|
<property name="readCount" value="256"/>
|
|
|
</bean>
|
|
|
|
|
|
<!-- 公告栏实体Bean - 通过构造器注入 -->
|
|
|
<bean id="announcement2" class="com.ssm.ioc.Announcement">
|
|
|
<constructor-arg name="id" value="1002"/>
|
|
|
<constructor-arg name="title" value="五一劳动节放假安排"/>
|
|
|
<constructor-arg name="content" value="根据国家法定节假日安排,公司将于5月1日至5月5日放假,5月6日正常上班。"/>
|
|
|
<constructor-arg name="publisher" value="教务处"/>
|
|
|
<constructor-arg name="publishTime" value="2026-04-25 10:30:00"/>
|
|
|
<constructor-arg name="status" value="1"/>
|
|
|
<constructor-arg name="type" value="1"/> <!-- 1:通知 -->
|
|
|
<constructor-arg name="expireDate" value="2026-05-06 00:00:00"/>
|
|
|
<constructor-arg name="readCount" value="1024"/>
|
|
|
</bean>
|
|
|
|
|
|
<!-- 公告栏实体Bean - 紧急通知 -->
|
|
|
<bean id="announcement3" class="com.ssm.ioc.Announcement">
|
|
|
<property name="id" value="1003"/>
|
|
|
<property name="title" value="服务器紧急维护通知"/>
|
|
|
<property name="content" value="由于系统异常,服务器将于今日下午14:00-15:00紧急维护,请及时保存工作数据。"/>
|
|
|
<property name="publisher" value="技术部"/>
|
|
|
<property name="publishTime" value="2026-04-10 13:30:00"/>
|
|
|
<property name="status" value="1"/>
|
|
|
<property name="type" value="5"/> <!-- 5:紧急 -->
|
|
|
<property name="expireDate" value="2026-04-10 17:00:00"/>
|
|
|
<property name="readCount" value="512"/>
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
<!-- ==================== 1. 院系管理Bean配置(setter方式注入) ==================== -->
|
|
|
<bean id="department" class="com.ssm.ioc.Department">
|
|
|
<!-- 院系ID -->
|
|
|
<property name="deptId" value="1"/>
|
|
|
<!-- 院系名称 -->
|
|
|
<property name="deptName" value="计算机学院"/>
|
|
|
<!-- 院系编号 -->
|
|
|
<property name="deptNo" value="CS001"/>
|
|
|
<!-- 院系负责人 -->
|
|
|
<property name="deptManager" value="张教授"/>
|
|
|
<!-- 联系电话 -->
|
|
|
<property name="deptPhone" value="010-12345678"/>
|
|
|
<!-- 所属校区 -->
|
|
|
<property name="campus" value="主校区"/>
|
|
|
</bean>
|
|
|
<bean id="major" class="com.ssm.di.Major">
|
|
|
<property name="majorId" value="1001"/>
|
|
|
<property name="majorName" value="软件工程"/>
|
|
|
<property name="college" value="计算机学院"/>
|
|
|
<property name="years" value="4"/>
|
|
|
<property name="studentCount" value="120"/>
|
|
|
</bean>
|
|
|
|
|
|
|
|
|
</beans>
|