• 大小: 12.5MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-01
  • 语言: Java
  • 标签: JAVA  

资源简介

用JAVA编写的班级管理系统,可以管理系部,班级,课程等项目

资源截图

代码片段和文件信息

package com.test;

import junit.framework.TestCase;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathxmlApplicationContext;

import com.test.dao.ClazzDao;
import com.test.dao.DepartmentDao;
import com.test.dao.StudentDao;
import com.test.entity.Clazz;
import com.test.entity.Department;
import com.test.entity.Student;



public class Test extends TestCase {


public void test(){
ApplicationContext context=new ClassPathxmlApplicationContext(“applicationContext.xml“);
ClazzDao cd=(ClazzDao)context.getBean(“clazzDao“);
Clazz c=cd.getClazz(1);
System.out.println(c.getDepartment().getDepartName());
}

public void test1(){
ApplicationContext context=new ClassPathxmlApplicationContext(“applicationContext.xml“);
StudentDao sd=(StudentDao)context.getBean(“studentDao“);
Student s=sd.getStudent(1);
System.out.println(s.getStuname());
}
public void test2(){
ApplicationContext context=new ClassPathxmlApplicationContext(“applicationContext.xml“);
StudentDao sd=(StudentDao)context.getBean(“studentDao“);
Student s=new Student();
s.setStuname(“xiaogou“);
sd.insert(s);
}
public void test3(){
ApplicationContext context=new ClassPathxmlApplicationContext(“applicationContext.xml“);
ClazzDao cd=(ClazzDao)context.getBean(“clazzDao“);
Clazz c=new Clazz();
c.setClassName(“0832“);
cd.insert(c);
}
public void test4(){
ApplicationContext context=new ClassPathxmlApplicationContext(“applicationContext.xml“);
DepartmentDao dd=(DepartmentDao)context.getBean(“departmentDao“);
Department d=new Department();
d.setDepartName(“xinxigongchengxi“);
dd.insert(d);
}
public void test5(){
ApplicationContext context=new ClassPathxmlApplicationContext(“applicationContext.xml“);
DepartmentDao dd=(DepartmentDao)context.getBean(“departmentDao“);
Department d=dd.getDepartment(1);
System.out.println(d.getDepartName());
}
public void test6(){
ApplicationContext context=new ClassPathxmlApplicationContext(“applicationContext.xml“);
StudentDao sd=(StudentDao)context.getBean(“studentDao“);
ClazzDao cd=(ClazzDao)context.getBean(“clazzDao“);
Clazz c=cd.getClazz(1);
Student s=new Student();
s.setStuname(“xiaogoucui“);
s.setClazz(c);
sd.insert(s);
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    .CA....      2218  2010-07-24 09:57  ssh0832\.classpath

    .CA....       294  2010-07-24 09:57  ssh0832\.mymetadata

    .CA....      1413  2010-05-21 10:36  ssh0832\.project

    .CA....      3844  2010-05-25 12:37  ssh0832\src\applicationContext.xml

    .CA....      2079  2010-05-21 10:36  ssh0832\src\com\test\action\ClazzAction.java

    .CA....      2105  2010-05-25 12:28  ssh0832\src\com\test\action\CourseAction.java

    .CA....      1346  2010-05-21 10:36  ssh0832\src\com\test\action\DepartmentAction.java

    .CA....      1965  2010-05-25 11:01  ssh0832\src\com\test\action\StudentAction.java

    .CA....      2408  2010-05-21 10:36  ssh0832\src\com\test\action\UserAction.java

    .CA....       324  2010-05-21 10:36  ssh0832\src\com\test\dao\ClazzDao.java

    .CA....       293  2010-05-25 11:20  ssh0832\src\com\test\dao\CourseDao.java

    .CA....       345  2010-05-21 10:36  ssh0832\src\com\test\dao\DepartmentDao.java

    .CA....      1195  2010-05-21 10:36  ssh0832\src\com\test\dao\impl\ClazzDaoImpl.java

    .CA....      1257  2010-05-25 12:06  ssh0832\src\com\test\dao\impl\CourseDaoImpl.java

    .CA....      1252  2010-05-21 10:36  ssh0832\src\com\test\dao\impl\DepartmentDaoImpl.java

    .CA....      1287  2010-05-25 08:53  ssh0832\src\com\test\dao\impl\StudentDaoImpl.java

    .CA....      2329  2010-05-21 10:36  ssh0832\src\com\test\dao\impl\UserDaoImpl.java

    .CA....       341  2010-05-25 08:48  ssh0832\src\com\test\dao\StudentDao.java

    .CA....       383  2010-05-21 10:36  ssh0832\src\com\test\dao\UserDao.java

    .CA....       507  2010-05-25 11:01  ssh0832\src\com\test\entity\Clazz.hbm.xml

    .CA....       555  2010-05-21 10:36  ssh0832\src\com\test\entity\Clazz.java

    .CA....       505  2010-05-25 11:16  ssh0832\src\com\test\entity\Course.hbm.xml

    .CA....       532  2010-05-25 11:14  ssh0832\src\com\test\entity\Course.java

    .CA....       435  2010-05-21 10:36  ssh0832\src\com\test\entity\Department.hbm.xml

    .CA....       390  2010-05-21 10:36  ssh0832\src\com\test\entity\Department.java

    .CA....       501  2010-05-25 08:49  ssh0832\src\com\test\entity\Student.hbm.xml

    .CA....       480  2010-05-21 10:49  ssh0832\src\com\test\entity\Student.java

    .CA....       456  2010-05-21 10:36  ssh0832\src\com\test\entity\User.hbm.xml

    .CA....       489  2010-05-21 10:36  ssh0832\src\com\test\entity\User.java

    .CA....       548  2010-05-21 10:36  ssh0832\src\com\test\interceptor\LoinCheckInterceptor.java

............此处省略127个文件信息

评论

共有 条评论