diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a6caaf --- /dev/null +++ b/README.md @@ -0,0 +1,80 @@ +# 简介 +这是个简单的教务系统网站,并且结合了图书订购功能,希望这个小DEMO能对大家学习有帮助 + +# 使用技术 + +IoC容器:spring + +web框架:springmvc + +orm框架:mybatis + +安全框架:shiro + +数据源:dbcp2 + +日志: sl4j + +Json: Gson + +前端框架:Bootstrap + +# 起步: + +1.初始化项目 + +1)下载Mysql,创建一个数据库名字为giit,导入create.sql与populate.sql,直接运行其中sql即可 + +2)下载Tomcat + +3)使用Intellij Idea导入项目,之后配置项目启动方式,使用刚才下载好的Tomcat + +4)运行 + +![image](https://pic4.zhimg.com/v2-87231f2eb533cdab3d3e04c7a89457af_b.png) + +# 使用简介: + +1.权限介绍: + +根据导入的populate.sql,运行网站初始时会存在四个权限角色: + +1).管理员,账号为admin + +2).学生,账号为student + +3).教师,账号为teache + +4).供应商,账号为supplier + +*密码均为123456* + +# 功能介绍: +## 1.基本信息功能: +其中可以设置一些基本的学校信息,也就是数据库中的实体-关系,之后就可以基于这些基本的关系信息进行更加复杂的功能,例如选课后可以记录多少学生选择了这门课程,只会教师提交图书后计算图书总数可以通过其中的关系得到 + +1)系部信息 + +2)专业信息 + +3)班级信息 + +4)课程信息 + +5)学生管理 + +![image](https://pic1.zhimg.com/v2-44688d7a989ae25d9db6767a50a208f8_b.png) + + +## 2.图书管理功能: +1)教师上传图书 + +2)秘书审批图书 + +3)查看已审核图书 + +![image](https://pic3.zhimg.com/v2-3ff2f0da17e8609f85da3b61671cf0de_b.png) + +# 数据库表结构: +![image](http://7xi78h.com1.z0.glb.clouddn.com/db.png) + diff --git a/pom.xml b/pom.xml index c525808..e2493d4 100644 --- a/pom.xml +++ b/pom.xml @@ -256,13 +256,13 @@ tomcat8x - /home/c0de8ug/software/apache-tomcat-8.0.28 + /Users/dongning/Documents/java/程序包/apache-tomcat-8.0.45 300000 existing - /home/c0de8ug/software/apache-tomcat-8.0.28 + /Users/dongning/Documents/java/程序包/apache-tomcat-8.0.45 diff --git a/src/main/resources/db.properties b/src/main/resources/db.properties index 7732dfa..e4b4340 100644 --- a/src/main/resources/db.properties +++ b/src/main/resources/db.properties @@ -1,4 +1,4 @@ jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/giit +jdbc.url=jdbc:mysql://localhost/giit?useSSL=false&useUnicode=true&characterEncoding=utf-8 jdbc.username=root -jdbc.password=0313 +jdbc.password=123456 diff --git a/src/main/webapp/hello.html b/src/main/webapp/hello.html index 4952598..2bcc50b 100644 --- a/src/main/webapp/hello.html +++ b/src/main/webapp/hello.html @@ -1,6 +1,7 @@ + Web Introduce +
diff --git a/target/classes/com/giit/www/college/dao/BookDao.xml b/target/classes/com/giit/www/college/dao/BookDao.xml new file mode 100644 index 0000000..f9b03e7 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/BookDao.xml @@ -0,0 +1,21 @@ + + + + + + + + INSERT INTO book(book_title,isbn,date_of_printing,author,press,category,unit_price) + VALUES(#{bookTitle},#{isbn},#{dateOfPrinting},#{author},#{press},#{category},#{unitPrice}) + + + + + + DELETE FROM book WHERE book_title = #{bookTitle} AND isbn = #{isbn} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/ClazzDao.xml b/target/classes/com/giit/www/college/dao/ClazzDao.xml new file mode 100644 index 0000000..6477267 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/ClazzDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + INSERT INTO class(class_id,class_name,year,spec_name) VALUES (#{clazzId},#{className},#{year},#{specName}) + + + + DELETE FROM class WHERE class_id = #{value} + + + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/CourseDao.xml b/target/classes/com/giit/www/college/dao/CourseDao.xml new file mode 100644 index 0000000..9c39a96 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/CourseDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + DELETE FROM course WHERE course_title=#{value} + + + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/DeptDao.xml b/target/classes/com/giit/www/college/dao/DeptDao.xml new file mode 100644 index 0000000..f1c8d59 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/DeptDao.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + UPDATE department SET dept_name = #{deptName} WHERE dept_id = #{deptId} + + + + INSERT INTO department(dept_name) VALUES(#{value}) + + + + DELETE FROM department WHERE dept_id = #{value} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/OrderBookDao.xml b/target/classes/com/giit/www/college/dao/OrderBookDao.xml new file mode 100644 index 0000000..3ea6df3 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/OrderBookDao.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO order_book(staff_id,sec_id,book_title,isbn,remark,approval) VALUES(#{staffId},#{secId},#{bookTitle},#{isbn},#{remark},#{approval}) + + + + + + + + + + + + + DELETE FROM order_book WHERE sec_id = #{secId} AND book_title = #{bookTitle} AND isbn = #{isbn} + + + + UPDATE order_book SET approval = 1 WHERE sec_id = #{secId} AND book_title = #{bookTitle} AND isbn=#{isbn} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/SectionDao.xml b/target/classes/com/giit/www/college/dao/SectionDao.xml new file mode 100644 index 0000000..6cc7ecc --- /dev/null +++ b/target/classes/com/giit/www/college/dao/SectionDao.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO section(course_title,year,staff_id) VALUES(#{courseTitle},#{year},#{staffId}) + + + + DELETE FROM section WHERE sec_id = #{value} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/SpecDao.xml b/target/classes/com/giit/www/college/dao/SpecDao.xml new file mode 100644 index 0000000..478dfc7 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/SpecDao.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE speciality SET spec_name = #{newSpecName} WHERE spec_name = #{specName} + + + + INSERT INTO speciality(dept_name,spec_name) VALUES(#{deptName},#{specName}) + + + + DELETE FROM speciality WHERE spec_name = #{value} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/StaffDao.xml b/target/classes/com/giit/www/college/dao/StaffDao.xml new file mode 100644 index 0000000..65c8504 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/StaffDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + UPDATE staff SET spec_name = #{newSpecName} WHERE spec_name = #{specName} + + + + INSERT INTO staff(staff_id,staff_name) VALUES(#{staffId},#{staffName}) + + + + DELETE FROM staff WHERE staff_id = #{value} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/StudentDao.xml b/target/classes/com/giit/www/college/dao/StudentDao.xml new file mode 100644 index 0000000..bed5638 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/StudentDao.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + INSERT INTO student + ( + student_id,student_name,id_card,year,class_name, + telephone_number,student_origin_base,gender,pic_path + ) + VALUES + ( + #{studentId}, + #{studentName}, + #{idCard}, + #{year}, + #{className}, + #{telephoneNumber}, + #{studentOriginBase}, + #{gender}, + #{picPath}) + + + DELETE FROM student WHERE student_id = #{value} + + + + UPDATE student + SET student_name = #{studentName},id_card = #{IdCard}, + year = #{year},class_name = #{className},telephone_number = #{telephoneNumber}, + student_origin_base = #{studentOriginBase},gender = #{gender},photo = #{photo} + WHERE student_id = #{studentId} + + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/TakesDao.xml b/target/classes/com/giit/www/college/dao/TakesDao.xml new file mode 100644 index 0000000..d56c7f1 --- /dev/null +++ b/target/classes/com/giit/www/college/dao/TakesDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + INSERT INTO takes(student_id,sec_Id) VALUES(#{stdId},#{secId}) + + + + DELETE FROM takes WHERE student_id = #{stdId} AND sec_id = #{secId} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/college/dao/TimetableDao.xml b/target/classes/com/giit/www/college/dao/TimetableDao.xml new file mode 100644 index 0000000..255f1bf --- /dev/null +++ b/target/classes/com/giit/www/college/dao/TimetableDao.xml @@ -0,0 +1,16 @@ + + + + + + + + INSERT INTO timetable(sec_id,time,week,weeks,classroom) VALUES(#{secId},#{time},#{week},#{weeks},#{classroom}) + + + + DELETE FROM timetable WHERE sec_id = #{value} + + \ No newline at end of file diff --git a/target/classes/com/giit/www/system/dao/ResourceDao.xml b/target/classes/com/giit/www/system/dao/ResourceDao.xml new file mode 100644 index 0000000..466a480 --- /dev/null +++ b/target/classes/com/giit/www/system/dao/ResourceDao.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/target/classes/com/giit/www/system/dao/RoleDao.xml b/target/classes/com/giit/www/system/dao/RoleDao.xml new file mode 100644 index 0000000..f6c6e98 --- /dev/null +++ b/target/classes/com/giit/www/system/dao/RoleDao.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + INSERT INTO role(role,description,resource_ids,available) VALUES(#{role},#{description},#{resourceIdsStr},#{available}) + + + + UPDATE role SET role=#{role}, description=#{description}, resource_ids=#{resourceIde}, available=#{avaliable} where id={id} + + + + DELETE FROM role where id=#{id} + + + + + + + + + \ No newline at end of file diff --git a/target/classes/com/giit/www/system/dao/UserDao.xml b/target/classes/com/giit/www/system/dao/UserDao.xml new file mode 100644 index 0000000..864ab68 --- /dev/null +++ b/target/classes/com/giit/www/system/dao/UserDao.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + UPDATE user SET password = #{password} ,authority = #{authority} WHERE user_id = #{userId} + + + + UPDATE user SET password = #{password} WHERE user_id = #{userId} + + + + INSERT INTO user(user_id,password,salt,role_ids,locked) VALUES(#{userId},#{password},#{salt},#{roleIdsStr},#{locked}) + + + + + + DELETE FROM user WHERE user_id = #{value} + + + + \ No newline at end of file diff --git a/target/classes/db.properties b/target/classes/db.properties index 7732dfa..e4b4340 100644 --- a/target/classes/db.properties +++ b/target/classes/db.properties @@ -1,4 +1,4 @@ jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/giit +jdbc.url=jdbc:mysql://localhost/giit?useSSL=false&useUnicode=true&characterEncoding=utf-8 jdbc.username=root -jdbc.password=0313 +jdbc.password=123456 diff --git a/target/classes/mybatis-config.xml b/target/classes/mybatis-config.xml new file mode 100644 index 0000000..4009578 --- /dev/null +++ b/target/classes/mybatis-config.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/target/classes/spring-mvc-shiro.xml b/target/classes/spring-mvc-shiro.xml new file mode 100644 index 0000000..212e848 --- /dev/null +++ b/target/classes/spring-mvc-shiro.xml @@ -0,0 +1,17 @@ + + + + + + + + + + \ No newline at end of file diff --git a/target/classes/spring-mvc.xml b/target/classes/spring-mvc.xml new file mode 100644 index 0000000..19c5e9c --- /dev/null +++ b/target/classes/spring-mvc.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/classes/spring-shiro.xml b/target/classes/spring-shiro.xml new file mode 100644 index 0000000..1ca55af --- /dev/null +++ b/target/classes/spring-shiro.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /login = authc + /logout = logout + + + + + \ No newline at end of file diff --git a/target/classes/spring.xml b/target/classes/spring.xml new file mode 100644 index 0000000..5183bd8 --- /dev/null +++ b/target/classes/spring.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/giit/META-INF/MANIFEST.MF b/target/giit/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4056bda --- /dev/null +++ b/target/giit/META-INF/MANIFEST.MF @@ -0,0 +1,5 @@ +Manifest-Version: 1.0 +Built-By: dongning +Created-By: IntelliJ IDEA +Build-Jdk: 1.8.0_60 + diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/BookDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/BookDao.xml new file mode 100644 index 0000000..f9b03e7 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/BookDao.xml @@ -0,0 +1,21 @@ + + + + + + + + INSERT INTO book(book_title,isbn,date_of_printing,author,press,category,unit_price) + VALUES(#{bookTitle},#{isbn},#{dateOfPrinting},#{author},#{press},#{category},#{unitPrice}) + + + + + + DELETE FROM book WHERE book_title = #{bookTitle} AND isbn = #{isbn} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/ClazzDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/ClazzDao.xml new file mode 100644 index 0000000..6477267 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/ClazzDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + INSERT INTO class(class_id,class_name,year,spec_name) VALUES (#{clazzId},#{className},#{year},#{specName}) + + + + DELETE FROM class WHERE class_id = #{value} + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/CourseDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/CourseDao.xml new file mode 100644 index 0000000..9c39a96 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/CourseDao.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + DELETE FROM course WHERE course_title=#{value} + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/DeptDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/DeptDao.xml new file mode 100644 index 0000000..f1c8d59 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/DeptDao.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + UPDATE department SET dept_name = #{deptName} WHERE dept_id = #{deptId} + + + + INSERT INTO department(dept_name) VALUES(#{value}) + + + + DELETE FROM department WHERE dept_id = #{value} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/OrderBookDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/OrderBookDao.xml new file mode 100644 index 0000000..3ea6df3 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/OrderBookDao.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO order_book(staff_id,sec_id,book_title,isbn,remark,approval) VALUES(#{staffId},#{secId},#{bookTitle},#{isbn},#{remark},#{approval}) + + + + + + + + + + + + + DELETE FROM order_book WHERE sec_id = #{secId} AND book_title = #{bookTitle} AND isbn = #{isbn} + + + + UPDATE order_book SET approval = 1 WHERE sec_id = #{secId} AND book_title = #{bookTitle} AND isbn=#{isbn} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/SectionDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/SectionDao.xml new file mode 100644 index 0000000..6cc7ecc --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/SectionDao.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO section(course_title,year,staff_id) VALUES(#{courseTitle},#{year},#{staffId}) + + + + DELETE FROM section WHERE sec_id = #{value} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/SpecDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/SpecDao.xml new file mode 100644 index 0000000..478dfc7 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/SpecDao.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE speciality SET spec_name = #{newSpecName} WHERE spec_name = #{specName} + + + + INSERT INTO speciality(dept_name,spec_name) VALUES(#{deptName},#{specName}) + + + + DELETE FROM speciality WHERE spec_name = #{value} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/StaffDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/StaffDao.xml new file mode 100644 index 0000000..65c8504 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/StaffDao.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + UPDATE staff SET spec_name = #{newSpecName} WHERE spec_name = #{specName} + + + + INSERT INTO staff(staff_id,staff_name) VALUES(#{staffId},#{staffName}) + + + + DELETE FROM staff WHERE staff_id = #{value} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/StudentDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/StudentDao.xml new file mode 100644 index 0000000..bed5638 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/StudentDao.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + INSERT INTO student + ( + student_id,student_name,id_card,year,class_name, + telephone_number,student_origin_base,gender,pic_path + ) + VALUES + ( + #{studentId}, + #{studentName}, + #{idCard}, + #{year}, + #{className}, + #{telephoneNumber}, + #{studentOriginBase}, + #{gender}, + #{picPath}) + + + DELETE FROM student WHERE student_id = #{value} + + + + UPDATE student + SET student_name = #{studentName},id_card = #{IdCard}, + year = #{year},class_name = #{className},telephone_number = #{telephoneNumber}, + student_origin_base = #{studentOriginBase},gender = #{gender},photo = #{photo} + WHERE student_id = #{studentId} + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/TakesDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/TakesDao.xml new file mode 100644 index 0000000..d56c7f1 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/TakesDao.xml @@ -0,0 +1,20 @@ + + + + + + + + + + INSERT INTO takes(student_id,sec_Id) VALUES(#{stdId},#{secId}) + + + + DELETE FROM takes WHERE student_id = #{stdId} AND sec_id = #{secId} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/college/dao/TimetableDao.xml b/target/giit/WEB-INF/classes/com/giit/www/college/dao/TimetableDao.xml new file mode 100644 index 0000000..255f1bf --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/college/dao/TimetableDao.xml @@ -0,0 +1,16 @@ + + + + + + + + INSERT INTO timetable(sec_id,time,week,weeks,classroom) VALUES(#{secId},#{time},#{week},#{weeks},#{classroom}) + + + + DELETE FROM timetable WHERE sec_id = #{value} + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/system/dao/ResourceDao.xml b/target/giit/WEB-INF/classes/com/giit/www/system/dao/ResourceDao.xml new file mode 100644 index 0000000..466a480 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/system/dao/ResourceDao.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/system/dao/RoleDao.xml b/target/giit/WEB-INF/classes/com/giit/www/system/dao/RoleDao.xml new file mode 100644 index 0000000..f6c6e98 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/system/dao/RoleDao.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + INSERT INTO role(role,description,resource_ids,available) VALUES(#{role},#{description},#{resourceIdsStr},#{available}) + + + + UPDATE role SET role=#{role}, description=#{description}, resource_ids=#{resourceIde}, available=#{avaliable} where id={id} + + + + DELETE FROM role where id=#{id} + + + + + + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/com/giit/www/system/dao/UserDao.xml b/target/giit/WEB-INF/classes/com/giit/www/system/dao/UserDao.xml new file mode 100644 index 0000000..864ab68 --- /dev/null +++ b/target/giit/WEB-INF/classes/com/giit/www/system/dao/UserDao.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + UPDATE user SET password = #{password} ,authority = #{authority} WHERE user_id = #{userId} + + + + UPDATE user SET password = #{password} WHERE user_id = #{userId} + + + + INSERT INTO user(user_id,password,salt,role_ids,locked) VALUES(#{userId},#{password},#{salt},#{roleIdsStr},#{locked}) + + + + + + DELETE FROM user WHERE user_id = #{value} + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/db.properties b/target/giit/WEB-INF/classes/db.properties index 7732dfa..e4b4340 100644 --- a/target/giit/WEB-INF/classes/db.properties +++ b/target/giit/WEB-INF/classes/db.properties @@ -1,4 +1,4 @@ jdbc.driver=com.mysql.jdbc.Driver -jdbc.url=jdbc:mysql://localhost:3306/giit +jdbc.url=jdbc:mysql://localhost/giit?useSSL=false&useUnicode=true&characterEncoding=utf-8 jdbc.username=root -jdbc.password=0313 +jdbc.password=123456 diff --git a/target/giit/WEB-INF/classes/mybatis-config.xml b/target/giit/WEB-INF/classes/mybatis-config.xml new file mode 100644 index 0000000..4009578 --- /dev/null +++ b/target/giit/WEB-INF/classes/mybatis-config.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/spring-mvc-shiro.xml b/target/giit/WEB-INF/classes/spring-mvc-shiro.xml new file mode 100644 index 0000000..212e848 --- /dev/null +++ b/target/giit/WEB-INF/classes/spring-mvc-shiro.xml @@ -0,0 +1,17 @@ + + + + + + + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/spring-mvc.xml b/target/giit/WEB-INF/classes/spring-mvc.xml new file mode 100644 index 0000000..19c5e9c --- /dev/null +++ b/target/giit/WEB-INF/classes/spring-mvc.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/spring-shiro.xml b/target/giit/WEB-INF/classes/spring-shiro.xml new file mode 100644 index 0000000..1ca55af --- /dev/null +++ b/target/giit/WEB-INF/classes/spring-shiro.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /login = authc + /logout = logout + + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/classes/spring.xml b/target/giit/WEB-INF/classes/spring.xml new file mode 100644 index 0000000..5183bd8 --- /dev/null +++ b/target/giit/WEB-INF/classes/spring.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/target/giit/WEB-INF/view/admin/system/resource/resource.jsp b/target/giit/WEB-INF/view/admin/system/resource/resource.jsp new file mode 100644 index 0000000..b928fda --- /dev/null +++ b/target/giit/WEB-INF/view/admin/system/resource/resource.jsp @@ -0,0 +1,68 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + +<%----%> + +
+
+
+

用户管理

+
+
+
+
+
+
+
+ 用户信息 +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + +
角色名称角色描述拥有的资源操作
${role}${role}${role}${role} + 删除 +
+ 添加角色 +
+ +
+ +
+ +
+ +
+
+ + +
+
+ + + + + + diff --git a/target/giit/WEB-INF/view/admin/system/resource/resource_add.jsp b/target/giit/WEB-INF/view/admin/system/resource/resource_add.jsp new file mode 100644 index 0000000..2b4b2c0 --- /dev/null +++ b/target/giit/WEB-INF/view/admin/system/resource/resource_add.jsp @@ -0,0 +1,56 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + +
+
+
+

用户管理

+
+
+
+
+
+
+
+ 用户信息 +
+ +
+
+
+ + + + + + + + + +
+
+ +
+ +
+ +
+ +
+
+ + +
+ + + + + + + + + diff --git a/target/giit/WEB-INF/view/admin/system/role/role.jsp b/target/giit/WEB-INF/view/admin/system/role/role.jsp new file mode 100644 index 0000000..bc1c7f3 --- /dev/null +++ b/target/giit/WEB-INF/view/admin/system/role/role.jsp @@ -0,0 +1,66 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + +<%----%> + +
+
+
+

角色管理

+
+
+
+
+
+
+
+ 角色信息 +
+ +
+
+ + + + + + + + + + + + + + + + + + + +
角色名称角色描述拥有的资源操作
${role.role}${role.description}${role.resourceIdsStr} + 删除 +
+ 添加角色 +
+ +
+ +
+ +
+ +
+
+ + +
+ + + + + + + diff --git a/target/giit/WEB-INF/view/admin/system/role/role_add.jsp b/target/giit/WEB-INF/view/admin/system/role/role_add.jsp new file mode 100644 index 0000000..87a384b --- /dev/null +++ b/target/giit/WEB-INF/view/admin/system/role/role_add.jsp @@ -0,0 +1,55 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + +
+
+
+

用户管理

+
+
+
+
+
+
+
+ 用户信息 +
+ +
+
+
+ + + + + <%----%> + <%----%> + + +
+
+ +
+ +
+ +
+ +
+
+ + +
+ + + + + + + + + diff --git a/target/giit/WEB-INF/view/admin/system/user/user.jsp b/target/giit/WEB-INF/view/admin/system/user/user.jsp new file mode 100644 index 0000000..4c50618 --- /dev/null +++ b/target/giit/WEB-INF/view/admin/system/user/user.jsp @@ -0,0 +1,70 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + +<%----%> + +
+
+
+

用户管理

+
+
+
+
+
+
+
+ 用户信息 +
+ +
+
+ + + + + + + + <%----%> + + + + + + + + + + + <%----%> + + + + +
用户名密码权限邮箱
${user.userId}${user.password}${user.roleIdsStr}email修改 + 删除 +
+ 添加用户 +
+ +
+ +
+ +
+ +
+
+ + +
+ + + + + + + diff --git a/target/giit/WEB-INF/view/admin/system/user/user_add.jsp b/target/giit/WEB-INF/view/admin/system/user/user_add.jsp new file mode 100644 index 0000000..2eb2dec --- /dev/null +++ b/target/giit/WEB-INF/view/admin/system/user/user_add.jsp @@ -0,0 +1,59 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> + + + +
+
+
+

用户管理

+
+
+
+
+
+
+
+ 用户信息 +
+ +
+
+
+ + + + + + + + + + + +
+
+ +
+ +
+ +
+ +
+
+ + +
+ + + + + diff --git a/target/giit/WEB-INF/view/admin/system/user/user_update.jsp b/target/giit/WEB-INF/view/admin/system/user/user_update.jsp new file mode 100644 index 0000000..4bf9a78 --- /dev/null +++ b/target/giit/WEB-INF/view/admin/system/user/user_update.jsp @@ -0,0 +1,61 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> + + + +
+
+
+

用户管理

+
+
+
+
+
+
+
+ 用户信息 +
+ +
+
+
+ + + +

+ + + + + +
+ 角色列表: + + (按住shift键多选) +
+ + +
+
+ +
+ +
+ +
+ +
+
+ + +
+ + + + + diff --git a/target/giit/WEB-INF/view/unauthorized.jsp b/target/giit/WEB-INF/view/unauthorized.jsp new file mode 100644 index 0000000..394e5ff --- /dev/null +++ b/target/giit/WEB-INF/view/unauthorized.jsp @@ -0,0 +1,11 @@ +<%@ page contentType="text/html;charset=UTF-8" language="java" %> + + + 没有权限 + + + + +
您没有权限
+ + \ No newline at end of file diff --git a/src/main/webapp/hello.html~ b/target/giit/hello.html similarity index 62% rename from src/main/webapp/hello.html~ rename to target/giit/hello.html index 2f564b0..2bcc50b 100644 --- a/src/main/webapp/hello.html~ +++ b/target/giit/hello.html @@ -1,7 +1,7 @@ - + Web Introduce +
@@ -50,7 +51,6 @@

尊敬的面试官你好,以下是网站和个人的简略介绍

- --->点我直接跳转到项目首页

网站技术选型
数据库表结构:点我查看
IoC容器:spring
@@ -63,7 +63,12 @@

尊敬的面试官你好,以下是网站和个人的简略介绍

前端框架:Bootstrap

- 可改进的地方(成吨的问题所以只能说改进了└(^o^)┘)
+ 使用的小技术:
+ 1.教师订购图书页面orderbook.jsp使用了ajax提交json与后台交互实现局部刷新
+

+ +

+ 可改进的地方(成吨的问题所以只能说改进了):
1.完善基本的业务功能
2.实现网站对机器的性能等监控(这个不会,很有兴趣去实现,了解到Driud好像有相关的资料)
3.阅读Shiro源码更好使用shiro,并且把权限控制从角色改变为资源粒度
@@ -76,27 +81,24 @@

尊敬的面试官你好,以下是网站和个人的简略介绍

目前所了解过的书籍(略为只扫读过一遍,稍微详细为仔细阅读过或者有写代码和练习)
略:
- 《数据结构与算法》(表,栈,队列,二叉树,散列表,希尔,快排,堆排,归并,并查集,最小生成树,最短路径,拓扑排序,动态规划)
- 《算法导论》(之后通过sky大大的博客了解了一下java集合源码http://www.cnblogs.com/skywang12345/p/3323085.html)
+ 《数据结构与算法》(表,栈,队列,二叉树,散列表,希尔,快排,堆排,归并,快排,并查集,图的最小生成树,最短路径,拓扑排序相关算法,动态规划)
《设计模式》
- 《Mysql必知必会》->使用到了该图书管理网站
- 《Operating system-Internal and Design principle》(英文版)->从MIT的JOS了解了操作系统的启动bootload加载内核
- 《数据库系统概念》->该书以学校的组织结构进行描述业务需求,融入到了该网站中
+ 《Operating system-Internal and Design principle》(英文版)
+ 《数据库系统概念》
+ 《算法导论》
《java核心卷1》
《Java网络编程》
- 《Http权威指南》->对图书管理网站的编写有指南作用,边读边查,对http协议的整个框架有了解便于感觉出错的位置
- 《Java NIO》->Tomcat有NIO的connector,先提前阅读有个知识准备
+ 《Http权威指南》
+ 《Java NIO》
《深入剖析Tomcat》(之后阅读了Tomcat8源码)
稍微详细:
《汇编语言》
《C Primer Plus》
- 《Windows程序设计》->写过五子棋,贪吃蛇
- 《Head First JSP & Servlet》(英文版)->该图书管理网站原来用jstl+servlet写过部分之后学习ssm就用它进行了代替
- 《深入理解计算机》->习题完成80%,onenote也有笔记
- 不足:
- 对操作系统学习的时候应该做完所有MIT JOS实验
- 对算法学习的时候应该使用leetcode做题,锻炼对问题的解决思路,光看不进行输出容易忘
+ 《Windows程序设计》
+ 《Head First JSP & Servlet》(英文版)
+ 《深入理解计算机》
+

@@ -104,4 +106,4 @@

尊敬的面试官你好,以下是网站和个人的简略介绍

- + \ No newline at end of file diff --git a/target/giit/img/1.png b/target/giit/img/1.png new file mode 100644 index 0000000..1c7522e Binary files /dev/null and b/target/giit/img/1.png differ