- Java version "1.7"
- Tomcat version "7.0"
- Mysql version "5.6.36"
- JUnit version "4.0"
- Struts version "2.3.4"
- Hibernate version "4.3.11.Final"
- Mysql-JDBC version "5.1.42"
The path: StudentManagementSystem/src/hibernate.xml
change:
<property name="connection.username"> (Your Mysql Connection Username)</property>
<property name="connection.password"> (Your Mysql Connection Password) </property>
<property name="connection.url">jdbc:mysql://localhost:3306/ (Your DateBase name) </property>
The path: StudentManagementSystem/test/entity/TestStudents.java
运行方法testSchemaExport(): Run As JUnit Test
注:如果遇到错误请仔检查自己的数据库账号密码以及数据库名称
,方法执行成功之后会在数据库中生成两个表,分别为:students(表1)
、users(表2)
,顾名思义,students表中存放学生数据,users中存放登陆信息,此系统暂时不支持创建用户,请自行在user表中输入自己定义的用户名以及密码。
The path: StudentManagementSystem/test/entity/TestStudents.java
运行方法testSaveStudents(): Run As JUnit Test