├── .classpath ├── .project ├── .settings ├── .jsdtscope ├── org.eclipse.jdt.core.prefs ├── org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs ├── org.eclipse.m2e.core.prefs ├── org.eclipse.wst.common.component ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.jsdt.ui.superType.container ├── org.eclipse.wst.jsdt.ui.superType.name └── org.eclipse.wst.validation.prefs ├── .springBeans ├── README.md ├── pom.xml ├── result-image ├── add.png ├── delete.png ├── index.png ├── process.png └── update.png ├── src ├── main │ ├── java │ │ └── com │ │ │ └── wantao │ │ │ ├── bean │ │ │ ├── Department.java │ │ │ ├── DepartmentExample.java │ │ │ ├── Employee.java │ │ │ ├── EmployeeExample.java │ │ │ └── Message.java │ │ │ ├── controller │ │ │ ├── DepartmentController.java │ │ │ └── EmployeeController.java │ │ │ ├── dao │ │ │ ├── DepartmentMapper.java │ │ │ └── EmployeeMapper.java │ │ │ └── service │ │ │ ├── DepartmentService.java │ │ │ └── EmployeeService.java │ ├── resources │ │ ├── jdbc.properties │ │ ├── log4j.properties │ │ ├── mapper │ │ │ ├── DepartmentMapper.xml │ │ │ └── EmployeeMapper.xml │ │ ├── mgb.xml │ │ ├── mybatis-config.xml │ │ ├── spring.xml │ │ └── springmvc.xml │ └── webapp │ │ ├── META-INF │ │ └── MANIFEST.MF │ │ ├── WEB-INF │ │ ├── views │ │ │ └── show.jsp │ │ └── web.xml │ │ ├── index-1.jsp │ │ ├── index.jsp │ │ ├── js │ │ ├── index-1.js │ │ └── index.js │ │ └── static │ │ ├── bootstrap-3.3.7-dist │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ │ └── jquery-3.2.1.min.js └── test │ └── java │ └── com │ └── wantao │ └── test │ ├── DaoTest.java │ ├── DaoTest2.java │ ├── EmployeeControllerTest.java │ └── MGBTest.java ├── ssm_crud.sql ├── target ├── classes │ ├── com │ │ └── wantao │ │ │ ├── bean │ │ │ ├── Department.class │ │ │ ├── DepartmentExample$Criteria.class │ │ │ ├── DepartmentExample$Criterion.class │ │ │ ├── DepartmentExample$GeneratedCriteria.class │ │ │ ├── DepartmentExample.class │ │ │ ├── Employee.class │ │ │ ├── EmployeeExample$Criteria.class │ │ │ ├── EmployeeExample$Criterion.class │ │ │ ├── EmployeeExample$GeneratedCriteria.class │ │ │ ├── EmployeeExample.class │ │ │ └── Message.class │ │ │ ├── controller │ │ │ ├── DepartmentController.class │ │ │ └── EmployeeController.class │ │ │ ├── dao │ │ │ ├── DepartmentMapper.class │ │ │ └── EmployeeMapper.class │ │ │ └── service │ │ │ ├── DepartmentService.class │ │ │ └── EmployeeService.class │ ├── jdbc.properties │ ├── log4j.properties │ ├── mapper │ │ ├── DepartmentMapper.xml │ │ └── EmployeeMapper.xml │ ├── mgb.xml │ ├── mybatis-config.xml │ ├── spring.xml │ └── springmvc.xml ├── m2e-wtp │ └── web-resources │ │ └── META-INF │ │ ├── MANIFEST.MF │ │ └── maven │ │ └── com.wantao │ │ └── ssm-crud │ │ ├── pom.properties │ │ └── pom.xml ├── maven-archiver │ └── pom.properties ├── maven-status │ └── maven-compiler-plugin │ │ ├── compile │ │ └── default-compile │ │ │ ├── createdFiles.lst │ │ │ └── inputFiles.lst │ │ └── testCompile │ │ └── default-testCompile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst ├── ssm-crud-0.0.1-SNAPSHOT.war ├── ssm-crud-0.0.1-SNAPSHOT │ ├── META-INF │ │ └── MANIFEST.MF │ ├── WEB-INF │ │ ├── classes │ │ │ ├── com │ │ │ │ └── wantao │ │ │ │ │ ├── bean │ │ │ │ │ ├── Department.class │ │ │ │ │ ├── DepartmentExample$Criteria.class │ │ │ │ │ ├── DepartmentExample$Criterion.class │ │ │ │ │ ├── DepartmentExample$GeneratedCriteria.class │ │ │ │ │ ├── DepartmentExample.class │ │ │ │ │ ├── Employee.class │ │ │ │ │ ├── EmployeeExample$Criteria.class │ │ │ │ │ ├── EmployeeExample$Criterion.class │ │ │ │ │ ├── EmployeeExample$GeneratedCriteria.class │ │ │ │ │ ├── EmployeeExample.class │ │ │ │ │ └── Message.class │ │ │ │ │ ├── controller │ │ │ │ │ ├── DepartmentController.class │ │ │ │ │ └── EmployeeController.class │ │ │ │ │ ├── dao │ │ │ │ │ ├── DepartmentMapper.class │ │ │ │ │ └── EmployeeMapper.class │ │ │ │ │ └── service │ │ │ │ │ ├── DepartmentService.class │ │ │ │ │ └── EmployeeService.class │ │ │ ├── jdbc.properties │ │ │ ├── log4j.properties │ │ │ ├── mapper │ │ │ │ ├── DepartmentMapper.xml │ │ │ │ └── EmployeeMapper.xml │ │ │ ├── mgb.xml │ │ │ ├── mybatis-config.xml │ │ │ ├── spring.xml │ │ │ └── springmvc.xml │ │ ├── lib │ │ │ ├── aspectjweaver-1.9.2.jar │ │ │ ├── c3p0-0.9.1.2.jar │ │ │ ├── classmate-1.3.1.jar │ │ │ ├── commons-logging-1.2.jar │ │ │ ├── hibernate-validator-5.3.5.Final.jar │ │ │ ├── jackson-annotations-2.9.0.jar │ │ │ ├── jackson-core-2.9.7.jar │ │ │ ├── jackson-databind-2.9.7.jar │ │ │ ├── jboss-logging-3.3.0.Final.jar │ │ │ ├── jsqlparser-1.0.jar │ │ │ ├── jstl-1.2.jar │ │ │ ├── log4j-1.2.17.jar │ │ │ ├── mybatis-3.4.5.jar │ │ │ ├── mybatis-generator-core-1.3.5.jar │ │ │ ├── mybatis-spring-1.3.2.jar │ │ │ ├── mysql-connector-java-5.1.38.jar │ │ │ ├── pagehelper-5.1.3.jar │ │ │ ├── slf4j-api-1.7.12.jar │ │ │ ├── slf4j-log4j12-1.7.12.jar │ │ │ ├── spring-aop-5.1.3.RELEASE.jar │ │ │ ├── spring-aspects-5.1.3.RELEASE.jar │ │ │ ├── spring-beans-5.1.3.RELEASE.jar │ │ │ ├── spring-context-5.1.3.RELEASE.jar │ │ │ ├── spring-core-5.1.3.RELEASE.jar │ │ │ ├── spring-expression-5.1.3.RELEASE.jar │ │ │ ├── spring-jcl-5.1.3.RELEASE.jar │ │ │ ├── spring-jdbc-5.1.3.RELEASE.jar │ │ │ ├── spring-tx-5.1.3.RELEASE.jar │ │ │ ├── spring-web-5.1.3.RELEASE.jar │ │ │ ├── spring-webmvc-5.1.3.RELEASE.jar │ │ │ └── validation-api-1.1.0.Final.jar │ │ ├── views │ │ │ └── show.jsp │ │ └── web.xml │ ├── index-1.jsp │ ├── index.jsp │ ├── js │ │ ├── index-1.js │ │ └── index.js │ └── static │ │ ├── bootstrap-3.3.7-dist │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ │ └── jquery-3.2.1.min.js ├── surefire-reports │ ├── TEST-com.wantao.test.DaoTest.xml │ ├── TEST-com.wantao.test.EmployeeControllerTest.xml │ ├── TEST-com.wantao.test.MGBTest.xml │ ├── com.wantao.test.DaoTest.txt │ ├── com.wantao.test.EmployeeControllerTest.txt │ └── com.wantao.test.MGBTest.txt └── test-classes │ └── com │ └── wantao │ └── test │ ├── DaoTest.class │ ├── DaoTest2.class │ ├── EmployeeControllerTest.class │ └── MGBTest.class └── tree.txt /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ssm-crud 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.wst.common.project.facet.core.builder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.validation.validationbuilder 20 | 21 | 22 | 23 | 24 | org.springframework.ide.eclipse.core.springbuilder 25 | 26 | 27 | 28 | 29 | org.springframework.ide.eclipse.boot.validation.springbootbuilder 30 | 31 | 32 | 33 | 34 | org.eclipse.m2e.core.maven2Builder 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.ide.eclipse.core.springnature 41 | org.eclipse.jem.workbench.JavaEMFNature 42 | org.eclipse.wst.common.modulecore.ModuleCoreNature 43 | org.eclipse.jdt.core.javanature 44 | org.eclipse.m2e.core.maven2Nature 45 | org.eclipse.wst.common.project.facet.core.nature 46 | org.eclipse.wst.jsdt.core.jsNature 47 | 48 | 49 | -------------------------------------------------------------------------------- /.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate 4 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 5 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 6 | org.eclipse.jdt.core.compiler.compliance=1.8 7 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 8 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 9 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 10 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 13 | org.eclipse.jdt.core.compiler.release=disabled 14 | org.eclipse.jdt.core.compiler.source=1.8 15 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs: -------------------------------------------------------------------------------- 1 | XDOCLETBUILDERACTIVE=true 2 | XDOCLETHOME= 3 | XDOCLETUSEGLOBAL=true 4 | XDOCLETVERSION=1.2.1 5 | eclipse.preferences.version=1 6 | -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /.springBeans: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | 6 | 7 | 8 | 9 | 10 | src/main/resources/spring.xml 11 | src/main/resources/springmvc.xml 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # java-project0 2 | ----------------------------------------------------------------------------------------------------------------------------- 3 | ### 2019-5-30 13:39更新
4 | 最近很多人加我qq问我这个项目运行怎么报错,我当时是能运行成功的,下面截图为证明。于是我就自己git clone 了下来一运行,真的报错,一直也没时间解决,今天没什么事情,于是把这些问题全部解决了,现在应该不会报错了,如果有问题可以加我qq895484122,大家可以一起探讨 5 | ## 运行步骤 6 | 1.首先你要安装git 7 | 2.git clone git@github.com:wantao666/java-project0.git 8 | 3.将项目导入eclipse 9 | 4.新建数据库ssm_crud,运行项目里面的ssm_crud.sql文件 10 | 5.将jdbc.properties和mgb.xml文件中的数据库密码改为你自己的 11 | 6.运行成功 12 | 13 | 14 | 15 | 16 | ----------------------------------------------------------------------------------------------------------------------------- 17 | ```SSM-CRUD 18 | ### 19 | 项目目录:tree.txt(使用指令 tree /f >tree.txt 生成) 20 | 功能点: 21 | 1.分页 22 | 2.数据校验: 23 | .jquery前端校验+jsr303后端校验 24 | 3.ajax 25 | 4.rest风格 26 | 27 | 技术点: 28 | 1.基础框架 ssm(spring+springmvc+mybatis) 29 | 2.数据库 mysql 30 | 3.项目管理 maven 31 | 4.分页 pagehelper 32 | 5.逆向工程 mybatis-gennerate 33 | 34 | 过程: 35 | 1.创建maven工程 36 | 2.引入项目依赖jar包 37 | .spring 38 | .springmvc 39 | .mybatis 40 | .数据库连接池,驱动包 41 | .其他(jstl servlet-api junit) 42 | .bootstrap,jquery 43 | 3.编写配置文件 44 | web.xml spring.xml springmvc.xml mybatis-config.xml xxxMapper.xml 使用逆向工程生成bean和mapper 45 | 4.测试dao层 46 | 5.crud 47 | 1.查询: /emps get 48 | 1.访问index.jsp 49 | 2.index.jsp页面发送出查员工列表请求 50 | 3.EmployeeController接受请求,查出员工数据 51 | 3.跳转到show页面 52 | 2.查询-ajax:(实现客户端无关心,brower,android,ios) 53 | 1.index.jsp页面发送ajax请求 54 | 2.服务器将查出的数据以json形式返回给浏览器 55 | 3.浏览器收到json字符串,通过js改变dom来改变页面 56 | 4.返回json 57 | 3.新增:/emp post 58 | 1.在index页面点击新增 59 | 2.弹出新增对话框 60 | 3.查出部门的列表,显示在对话框中 61 | 4.用户输入数据新增 62 | 5.完成校验: 63 | .jquery前端校验+.ajax用户名重复性校验+.重要数据后端校验(JSR303) 64 | 3.修改:/emp put 65 | 1.点击编辑 66 | 2.在模态框中显示修改用户信息 67 | 3.点击修改完成 68 | 4.删除"/emp delete 69 | 1.批量删除 70 | 2.单个删除 71 | ``` 72 | 项目截图:
73 | 首页 74 | 75 | 添加 76 | 77 | 修改 78 | 79 | 删除 80 | 81 | 流程 82 | 83 | 参考视频 84 | 点击我 85 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | com.wantao 6 | ssm-crud 7 | 0.0.1-SNAPSHOT 8 | war 9 | 10 | 11 | 12 | org.apache.maven.plugins 13 | maven-compiler-plugin 14 | 3.3 15 | 16 | 1.8 17 | 1.8 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | org.springframework 26 | spring-web 27 | 5.1.3.RELEASE 28 | 29 | 30 | org.springframework 31 | spring-webmvc 32 | 5.1.3.RELEASE 33 | 34 | 35 | 36 | 37 | com.fasterxml.jackson.core 38 | jackson-databind 39 | 2.9.7 40 | 41 | 42 | 43 | 44 | org.hibernate 45 | hibernate-validator 46 | 5.3.5.Final 47 | 48 | 49 | 50 | 51 | 52 | org.springframework 53 | spring-beans 54 | 5.1.3.RELEASE 55 | 56 | 57 | org.springframework 58 | spring-context 59 | 5.1.3.RELEASE 60 | 61 | 62 | org.springframework 63 | spring-core 64 | 5.1.3.RELEASE 65 | 66 | 67 | org.springframework 68 | spring-expression 69 | 5.1.3.RELEASE 70 | 71 | 72 | 73 | org.springframework 74 | spring-jdbc 75 | 5.1.3.RELEASE 76 | 77 | 78 | 79 | org.springframework 80 | spring-aspects 81 | 5.1.3.RELEASE 82 | 83 | 84 | 85 | org.springframework 86 | spring-test 87 | 5.1.3.RELEASE 88 | test 89 | 90 | 91 | 92 | 93 | commons-logging 94 | commons-logging 95 | 1.2 96 | 97 | 98 | 99 | 100 | 101 | org.mybatis 102 | mybatis 103 | 3.4.5 104 | 105 | 106 | 107 | org.mybatis 108 | mybatis-spring 109 | 1.3.2 110 | 111 | 112 | 113 | org.mybatis.generator 114 | mybatis-generator-core 115 | 1.3.5 116 | 117 | 118 | 119 | com.github.pagehelper 120 | pagehelper 121 | 5.1.3 122 | 123 | 124 | 125 | org.slf4j 126 | slf4j-api 127 | 1.7.12 128 | 129 | 130 | org.slf4j 131 | slf4j-log4j12 132 | 1.7.12 133 | 134 | 135 | log4j 136 | log4j 137 | 1.2.17 138 | 139 | 140 | 141 | 142 | 143 | c3p0 144 | c3p0 145 | 0.9.1.2 146 | 147 | 148 | mysql 149 | mysql-connector-java 150 | 5.1.38 151 | 152 | 153 | 154 | 155 | jstl 156 | jstl 157 | 1.2 158 | 159 | 160 | 161 | javax.servlet 162 | javax.servlet-api 163 | 3.1.0 164 | provided 165 | 166 | 167 | 168 | junit 169 | junit 170 | 4.12 171 | test 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /result-image/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/result-image/add.png -------------------------------------------------------------------------------- /result-image/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/result-image/delete.png -------------------------------------------------------------------------------- /result-image/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/result-image/index.png -------------------------------------------------------------------------------- /result-image/process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/result-image/process.png -------------------------------------------------------------------------------- /result-image/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/result-image/update.png -------------------------------------------------------------------------------- /src/main/java/com/wantao/bean/Department.java: -------------------------------------------------------------------------------- 1 | package com.wantao.bean; 2 | 3 | public class Department { 4 | private Integer deptId; 5 | 6 | private String deptName; 7 | 8 | public Integer getDeptId() { 9 | return deptId; 10 | } 11 | 12 | public void setDeptId(Integer deptId) { 13 | this.deptId = deptId; 14 | } 15 | 16 | public String getDeptName() { 17 | return deptName; 18 | } 19 | 20 | public void setDeptName(String deptName) { 21 | this.deptName = deptName == null ? null : deptName.trim(); 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/com/wantao/bean/DepartmentExample.java: -------------------------------------------------------------------------------- 1 | package com.wantao.bean; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class DepartmentExample { 7 | protected String orderByClause; 8 | 9 | protected boolean distinct; 10 | 11 | protected List oredCriteria; 12 | 13 | public DepartmentExample() { 14 | oredCriteria = new ArrayList(); 15 | } 16 | 17 | public void setOrderByClause(String orderByClause) { 18 | this.orderByClause = orderByClause; 19 | } 20 | 21 | public String getOrderByClause() { 22 | return orderByClause; 23 | } 24 | 25 | public void setDistinct(boolean distinct) { 26 | this.distinct = distinct; 27 | } 28 | 29 | public boolean isDistinct() { 30 | return distinct; 31 | } 32 | 33 | public List getOredCriteria() { 34 | return oredCriteria; 35 | } 36 | 37 | public void or(Criteria criteria) { 38 | oredCriteria.add(criteria); 39 | } 40 | 41 | public Criteria or() { 42 | Criteria criteria = createCriteriaInternal(); 43 | oredCriteria.add(criteria); 44 | return criteria; 45 | } 46 | 47 | public Criteria createCriteria() { 48 | Criteria criteria = createCriteriaInternal(); 49 | if (oredCriteria.size() == 0) { 50 | oredCriteria.add(criteria); 51 | } 52 | return criteria; 53 | } 54 | 55 | protected Criteria createCriteriaInternal() { 56 | Criteria criteria = new Criteria(); 57 | return criteria; 58 | } 59 | 60 | public void clear() { 61 | oredCriteria.clear(); 62 | orderByClause = null; 63 | distinct = false; 64 | } 65 | 66 | protected abstract static class GeneratedCriteria { 67 | protected List criteria; 68 | 69 | protected GeneratedCriteria() { 70 | super(); 71 | criteria = new ArrayList(); 72 | } 73 | 74 | public boolean isValid() { 75 | return criteria.size() > 0; 76 | } 77 | 78 | public List getAllCriteria() { 79 | return criteria; 80 | } 81 | 82 | public List getCriteria() { 83 | return criteria; 84 | } 85 | 86 | protected void addCriterion(String condition) { 87 | if (condition == null) { 88 | throw new RuntimeException("Value for condition cannot be null"); 89 | } 90 | criteria.add(new Criterion(condition)); 91 | } 92 | 93 | protected void addCriterion(String condition, Object value, String property) { 94 | if (value == null) { 95 | throw new RuntimeException("Value for " + property + " cannot be null"); 96 | } 97 | criteria.add(new Criterion(condition, value)); 98 | } 99 | 100 | protected void addCriterion(String condition, Object value1, Object value2, String property) { 101 | if (value1 == null || value2 == null) { 102 | throw new RuntimeException("Between values for " + property + " cannot be null"); 103 | } 104 | criteria.add(new Criterion(condition, value1, value2)); 105 | } 106 | 107 | public Criteria andDeptIdIsNull() { 108 | addCriterion("dept_id is null"); 109 | return (Criteria) this; 110 | } 111 | 112 | public Criteria andDeptIdIsNotNull() { 113 | addCriterion("dept_id is not null"); 114 | return (Criteria) this; 115 | } 116 | 117 | public Criteria andDeptIdEqualTo(Integer value) { 118 | addCriterion("dept_id =", value, "deptId"); 119 | return (Criteria) this; 120 | } 121 | 122 | public Criteria andDeptIdNotEqualTo(Integer value) { 123 | addCriterion("dept_id <>", value, "deptId"); 124 | return (Criteria) this; 125 | } 126 | 127 | public Criteria andDeptIdGreaterThan(Integer value) { 128 | addCriterion("dept_id >", value, "deptId"); 129 | return (Criteria) this; 130 | } 131 | 132 | public Criteria andDeptIdGreaterThanOrEqualTo(Integer value) { 133 | addCriterion("dept_id >=", value, "deptId"); 134 | return (Criteria) this; 135 | } 136 | 137 | public Criteria andDeptIdLessThan(Integer value) { 138 | addCriterion("dept_id <", value, "deptId"); 139 | return (Criteria) this; 140 | } 141 | 142 | public Criteria andDeptIdLessThanOrEqualTo(Integer value) { 143 | addCriterion("dept_id <=", value, "deptId"); 144 | return (Criteria) this; 145 | } 146 | 147 | public Criteria andDeptIdIn(List values) { 148 | addCriterion("dept_id in", values, "deptId"); 149 | return (Criteria) this; 150 | } 151 | 152 | public Criteria andDeptIdNotIn(List values) { 153 | addCriterion("dept_id not in", values, "deptId"); 154 | return (Criteria) this; 155 | } 156 | 157 | public Criteria andDeptIdBetween(Integer value1, Integer value2) { 158 | addCriterion("dept_id between", value1, value2, "deptId"); 159 | return (Criteria) this; 160 | } 161 | 162 | public Criteria andDeptIdNotBetween(Integer value1, Integer value2) { 163 | addCriterion("dept_id not between", value1, value2, "deptId"); 164 | return (Criteria) this; 165 | } 166 | 167 | public Criteria andDeptNameIsNull() { 168 | addCriterion("dept_name is null"); 169 | return (Criteria) this; 170 | } 171 | 172 | public Criteria andDeptNameIsNotNull() { 173 | addCriterion("dept_name is not null"); 174 | return (Criteria) this; 175 | } 176 | 177 | public Criteria andDeptNameEqualTo(String value) { 178 | addCriterion("dept_name =", value, "deptName"); 179 | return (Criteria) this; 180 | } 181 | 182 | public Criteria andDeptNameNotEqualTo(String value) { 183 | addCriterion("dept_name <>", value, "deptName"); 184 | return (Criteria) this; 185 | } 186 | 187 | public Criteria andDeptNameGreaterThan(String value) { 188 | addCriterion("dept_name >", value, "deptName"); 189 | return (Criteria) this; 190 | } 191 | 192 | public Criteria andDeptNameGreaterThanOrEqualTo(String value) { 193 | addCriterion("dept_name >=", value, "deptName"); 194 | return (Criteria) this; 195 | } 196 | 197 | public Criteria andDeptNameLessThan(String value) { 198 | addCriterion("dept_name <", value, "deptName"); 199 | return (Criteria) this; 200 | } 201 | 202 | public Criteria andDeptNameLessThanOrEqualTo(String value) { 203 | addCriterion("dept_name <=", value, "deptName"); 204 | return (Criteria) this; 205 | } 206 | 207 | public Criteria andDeptNameLike(String value) { 208 | addCriterion("dept_name like", value, "deptName"); 209 | return (Criteria) this; 210 | } 211 | 212 | public Criteria andDeptNameNotLike(String value) { 213 | addCriterion("dept_name not like", value, "deptName"); 214 | return (Criteria) this; 215 | } 216 | 217 | public Criteria andDeptNameIn(List values) { 218 | addCriterion("dept_name in", values, "deptName"); 219 | return (Criteria) this; 220 | } 221 | 222 | public Criteria andDeptNameNotIn(List values) { 223 | addCriterion("dept_name not in", values, "deptName"); 224 | return (Criteria) this; 225 | } 226 | 227 | public Criteria andDeptNameBetween(String value1, String value2) { 228 | addCriterion("dept_name between", value1, value2, "deptName"); 229 | return (Criteria) this; 230 | } 231 | 232 | public Criteria andDeptNameNotBetween(String value1, String value2) { 233 | addCriterion("dept_name not between", value1, value2, "deptName"); 234 | return (Criteria) this; 235 | } 236 | } 237 | 238 | public static class Criteria extends GeneratedCriteria { 239 | 240 | protected Criteria() { 241 | super(); 242 | } 243 | } 244 | 245 | public static class Criterion { 246 | private String condition; 247 | 248 | private Object value; 249 | 250 | private Object secondValue; 251 | 252 | private boolean noValue; 253 | 254 | private boolean singleValue; 255 | 256 | private boolean betweenValue; 257 | 258 | private boolean listValue; 259 | 260 | private String typeHandler; 261 | 262 | public String getCondition() { 263 | return condition; 264 | } 265 | 266 | public Object getValue() { 267 | return value; 268 | } 269 | 270 | public Object getSecondValue() { 271 | return secondValue; 272 | } 273 | 274 | public boolean isNoValue() { 275 | return noValue; 276 | } 277 | 278 | public boolean isSingleValue() { 279 | return singleValue; 280 | } 281 | 282 | public boolean isBetweenValue() { 283 | return betweenValue; 284 | } 285 | 286 | public boolean isListValue() { 287 | return listValue; 288 | } 289 | 290 | public String getTypeHandler() { 291 | return typeHandler; 292 | } 293 | 294 | protected Criterion(String condition) { 295 | super(); 296 | this.condition = condition; 297 | this.typeHandler = null; 298 | this.noValue = true; 299 | } 300 | 301 | protected Criterion(String condition, Object value, String typeHandler) { 302 | super(); 303 | this.condition = condition; 304 | this.value = value; 305 | this.typeHandler = typeHandler; 306 | if (value instanceof List) { 307 | this.listValue = true; 308 | } else { 309 | this.singleValue = true; 310 | } 311 | } 312 | 313 | protected Criterion(String condition, Object value) { 314 | this(condition, value, null); 315 | } 316 | 317 | protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { 318 | super(); 319 | this.condition = condition; 320 | this.value = value; 321 | this.secondValue = secondValue; 322 | this.typeHandler = typeHandler; 323 | this.betweenValue = true; 324 | } 325 | 326 | protected Criterion(String condition, Object value, Object secondValue) { 327 | this(condition, value, secondValue, null); 328 | } 329 | } 330 | } -------------------------------------------------------------------------------- /src/main/java/com/wantao/bean/Employee.java: -------------------------------------------------------------------------------- 1 | package com.wantao.bean; 2 | 3 | public class Employee { 4 | private Integer empId; 5 | 6 | private String empName; 7 | 8 | private String gender; 9 | 10 | private String email; 11 | 12 | private Integer dId; 13 | 14 | private Department department; 15 | 16 | 17 | public Department getDepartment() { 18 | return department; 19 | } 20 | 21 | public void setDepartment(Department department) { 22 | this.department = department; 23 | } 24 | 25 | public Integer getEmpId() { 26 | return empId; 27 | } 28 | 29 | public void setEmpId(Integer empId) { 30 | this.empId = empId; 31 | } 32 | 33 | public String getEmpName() { 34 | return empName; 35 | } 36 | 37 | public void setEmpName(String empName) { 38 | this.empName = empName == null ? null : empName.trim(); 39 | } 40 | 41 | public String getGender() { 42 | return gender; 43 | } 44 | 45 | public void setGender(String gender) { 46 | this.gender = gender == null ? null : gender.trim(); 47 | } 48 | 49 | public String getEmail() { 50 | return email; 51 | } 52 | 53 | public void setEmail(String email) { 54 | this.email = email == null ? null : email.trim(); 55 | } 56 | 57 | public Integer getdId() { 58 | return dId; 59 | } 60 | 61 | public void setdId(Integer dId) { 62 | this.dId = dId; 63 | } 64 | } -------------------------------------------------------------------------------- /src/main/java/com/wantao/bean/Message.java: -------------------------------------------------------------------------------- 1 | package com.wantao.bean; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * @author wantao 8 | * @date 2019-01-31 20:05 9 | * @description: json的通用返回类 10 | */ 11 | public class Message { 12 | // 200 成功 404 失败 13 | private int code; 14 | private String msg; 15 | // 服务器要返回给浏览器的数据 16 | private Map data = new HashMap(); 17 | 18 | public static Message success() { 19 | Message message = new Message(); 20 | message.setCode(200); 21 | message.setMsg("处理成功"); 22 | return message; 23 | } 24 | 25 | public static Message fail() { 26 | Message message = new Message(); 27 | message.setCode(404); 28 | message.setMsg("处理失败"); 29 | return message; 30 | } 31 | 32 | public Message add(String key, Object value) { 33 | this.data.put(key, value); 34 | return this; 35 | } 36 | 37 | public Message() { 38 | super(); 39 | // TODO Auto-generated constructor stub 40 | } 41 | 42 | public int getCode() { 43 | return code; 44 | } 45 | 46 | public void setCode(int code) { 47 | this.code = code; 48 | } 49 | 50 | public String getMsg() { 51 | return msg; 52 | } 53 | 54 | public void setMsg(String msg) { 55 | this.msg = msg; 56 | } 57 | 58 | public Map getData() { 59 | return data; 60 | } 61 | 62 | public void setData(Map data) { 63 | this.data = data; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/wantao/controller/DepartmentController.java: -------------------------------------------------------------------------------- 1 | package com.wantao.controller; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.ResponseBody; 7 | 8 | import com.wantao.bean.Message; 9 | import com.wantao.service.DepartmentService; 10 | 11 | @Controller 12 | public class DepartmentController { 13 | @Autowired 14 | DepartmentService departmentService; 15 | 16 | @GetMapping(value = "/depts") 17 | @ResponseBody 18 | public Message getAllDepts() { 19 | return Message.success().add("depts", departmentService.getAllDepts()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/wantao/controller/EmployeeController.java: -------------------------------------------------------------------------------- 1 | package com.wantao.controller; 2 | 3 | import java.io.UnsupportedEncodingException; 4 | import java.util.ArrayList; 5 | import java.util.HashMap; 6 | import java.util.List; 7 | import java.util.Map; 8 | import java.util.logging.Logger; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import javax.validation.Valid; 13 | 14 | import org.springframework.beans.factory.annotation.Autowired; 15 | import org.springframework.stereotype.Controller; 16 | import org.springframework.ui.Model; 17 | import org.springframework.validation.BindingResult; 18 | import org.springframework.validation.FieldError; 19 | import org.springframework.validation.annotation.Validated; 20 | import org.springframework.web.bind.annotation.DeleteMapping; 21 | import org.springframework.web.bind.annotation.GetMapping; 22 | import org.springframework.web.bind.annotation.PathVariable; 23 | import org.springframework.web.bind.annotation.PostMapping; 24 | import org.springframework.web.bind.annotation.PutMapping; 25 | import org.springframework.web.bind.annotation.RequestParam; 26 | import org.springframework.web.bind.annotation.ResponseBody; 27 | 28 | import com.github.pagehelper.PageHelper; 29 | import com.github.pagehelper.PageInfo; 30 | import com.wantao.bean.Employee; 31 | import com.wantao.bean.Message; 32 | import com.wantao.service.EmployeeService; 33 | 34 | /** 35 | * @author wantao 36 | * @date 2019-01-31 14:33 37 | * @description: talk is cheap show me your code 38 | */ 39 | /** 40 | * @author wantao 41 | * @date 2019-02-02 21:28 42 | * @description: talk is cheap show me your code 43 | */ 44 | /** 45 | * @author wantao 46 | * @date 2019-02-02 21:28 47 | * @description: talk is cheap show me your code 48 | */ 49 | @Controller 50 | public class EmployeeController { 51 | Logger logger = Logger.getLogger("EmployeeController.class"); 52 | @Autowired 53 | EmployeeService employeeService; 54 | 55 | /** 56 | * @param 57 | * @return String 58 | * @description:查询所有员工(分页查询) 59 | */ 60 | // @GetMapping(value = "emps") 61 | // public String showEmployees(@RequestParam(defaultValue = "1", name = "pn") Integer pn,Model model) { 62 | // PageHelper.startPage(pn, 5);// 后面紧跟的查询为分页查询 63 | // List employees = employeeService.findAllEmployee(); 64 | // PageInfo pageInfo=new PageInfo(employees,5);//用pageInfo封装然后交给页面 65 | // model.addAttribute("pageInfo",pageInfo); 66 | // return "show"; 67 | // } 68 | 69 | /** 70 | * @param 71 | * @return PageInfo 72 | * @description:查询所有员工(分页查询),以ajax方式返回 73 | */ 74 | @GetMapping(value = "/emps") 75 | @ResponseBody 76 | public Message showEmployeesWithJson(@RequestParam(defaultValue = "1", name = "pn") Integer pn, Model model) { 77 | PageHelper.startPage(pn, 5);// 后面紧跟的查询为分页查询 78 | List employees = employeeService.findAllEmployee(); 79 | PageInfo pageInfo = new PageInfo(employees, 5);// 用pageInfo封装然后交给页面 80 | return Message.success().add("pageInfo", pageInfo); 81 | } 82 | 83 | /** 84 | * @param 85 | * @return Message 86 | * @description:新增用户 支持jsr303,导入hibernate validator 87 | */ 88 | @PostMapping(value = "/emp") 89 | @ResponseBody 90 | public Message saveEmployee(@Valid Employee employee, BindingResult result) { 91 | // System.out.println(employee); 92 | if (result.hasErrors()) {// 后端校验失败,返回校验失败的信息 93 | Map map = new HashMap<>(); 94 | List errors = result.getFieldErrors(); 95 | for (FieldError error : errors) { 96 | map.put(error.getField(), error.getDefaultMessage()); 97 | } 98 | return Message.fail().add("errorField", map); 99 | } else { 100 | employeeService.saveEmployee(employee); 101 | return Message.success(); 102 | } 103 | } 104 | 105 | /** 106 | * @param 107 | * @return Message 108 | * @description:检测用户是否存在 success表示用户不存在可用,fail表示用户存在不可用 109 | */ 110 | @PostMapping(value = "/checkSameEmployee") 111 | @ResponseBody 112 | public Message checkSameEmployee(@RequestParam("empName") String empName) { 113 | if (employeeService.checkSameEmployee(empName)) {// 用户名不存在 114 | // logger.info(empName+"不存在"); 115 | return Message.success(); 116 | } else { 117 | // logger.info(empName+"存在"); 118 | return Message.fail(); 119 | } 120 | } 121 | 122 | /** 123 | * @param 124 | * @return Message 125 | * @description:修改前将要修改的employee查询出来表单回显 126 | */ 127 | @GetMapping(value = "/emp/{id}") 128 | @ResponseBody 129 | public Message getEmployee(@PathVariable("id") Integer id) { 130 | Employee employee = employeeService.getEmployee(id); 131 | return Message.success().add("employee", employee); 132 | } 133 | 134 | /** 135 | * @param 136 | * @return Message 137 | * @description:员工更新 这里ajax请求直接发put请求而不是post请求,那么所有的参数都会获取不到,因为tomcat只会封装post的数据 138 | * 也就是说request.getParameter("empId")为空,springmvc也无法封装Bean 139 | * 解决方法: 1.发送post方法,通过HiddenHttpMethodFilter 140 | * 2.发送put请求,通过HttpPutFormContentFilter 141 | */ 142 | @PutMapping(value = "/emp/{empId}") 143 | @ResponseBody 144 | public Message saveUpdateEmployee(Employee employee) { 145 | // System.out.println(employee); 146 | logger.info(employee.toString()); 147 | employeeService.updateEmployee(employee); 148 | return Message.success(); 149 | } 150 | 151 | /** 152 | * @param 153 | * @return Message 154 | * @description:单个批量删除 单个删除:1 批量删除:1-2-3 155 | */ 156 | @DeleteMapping(value = "/emp/{empIds}") 157 | @ResponseBody 158 | public Message deleteEmployee(@PathVariable("empIds") String empIds) { 159 | if (empIds.contains("-")) { 160 | String[] ids = empIds.split("-"); 161 | List idsList = new ArrayList<>(); 162 | for (String id : ids) { 163 | idsList.add(Integer.parseInt(id)); 164 | } 165 | employeeService.deleteBatch(idsList); 166 | } else { 167 | employeeService.deleteEmployee(Integer.parseInt(empIds)); 168 | } 169 | return Message.success(); 170 | } 171 | } 172 | -------------------------------------------------------------------------------- /src/main/java/com/wantao/dao/DepartmentMapper.java: -------------------------------------------------------------------------------- 1 | package com.wantao.dao; 2 | 3 | import com.wantao.bean.Department; 4 | import com.wantao.bean.DepartmentExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface DepartmentMapper { 9 | long countByExample(DepartmentExample example); 10 | 11 | int deleteByExample(DepartmentExample example); 12 | 13 | int deleteByPrimaryKey(Integer deptId); 14 | 15 | int insert(Department record); 16 | 17 | int insertSelective(Department record); 18 | 19 | List selectByExample(DepartmentExample example); 20 | 21 | Department selectByPrimaryKey(Integer deptId); 22 | 23 | int updateByExampleSelective(@Param("record") Department record, @Param("example") DepartmentExample example); 24 | 25 | int updateByExample(@Param("record") Department record, @Param("example") DepartmentExample example); 26 | 27 | int updateByPrimaryKeySelective(Department record); 28 | 29 | int updateByPrimaryKey(Department record); 30 | } -------------------------------------------------------------------------------- /src/main/java/com/wantao/dao/EmployeeMapper.java: -------------------------------------------------------------------------------- 1 | package com.wantao.dao; 2 | 3 | import com.wantao.bean.Employee; 4 | import com.wantao.bean.EmployeeExample; 5 | import java.util.List; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | public interface EmployeeMapper { 9 | long countByExample(EmployeeExample example); 10 | 11 | int deleteByExample(EmployeeExample example); 12 | 13 | int deleteByPrimaryKey(Integer empId); 14 | 15 | int insert(Employee record); 16 | 17 | int insertSelective(Employee record); 18 | 19 | List selectByExample(EmployeeExample example); 20 | 21 | List selectByExampleWithDept(EmployeeExample example); 22 | 23 | Employee selectByPrimaryKey(Integer empId); 24 | 25 | Employee selectByPrimaryKeyWithDept(Integer empId); 26 | 27 | int updateByExampleSelective(@Param("record") Employee record, @Param("example") EmployeeExample example); 28 | 29 | int updateByExample(@Param("record") Employee record, @Param("example") EmployeeExample example); 30 | 31 | int updateByPrimaryKeySelective(Employee record); 32 | 33 | int updateByPrimaryKey(Employee record); 34 | } -------------------------------------------------------------------------------- /src/main/java/com/wantao/service/DepartmentService.java: -------------------------------------------------------------------------------- 1 | package com.wantao.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.wantao.bean.Department; 9 | import com.wantao.bean.Message; 10 | import com.wantao.dao.DepartmentMapper; 11 | 12 | @Service 13 | public class DepartmentService { 14 | @Autowired 15 | private DepartmentMapper departmentMapper; 16 | public Message getAllDepts() { 17 | List departments=departmentMapper.selectByExample(null); 18 | return Message.success().add("depts",departments); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/wantao/service/EmployeeService.java: -------------------------------------------------------------------------------- 1 | package com.wantao.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.wantao.bean.Employee; 9 | import com.wantao.bean.EmployeeExample; 10 | import com.wantao.bean.EmployeeExample.Criteria; 11 | import com.wantao.dao.EmployeeMapper; 12 | 13 | @Service 14 | public class EmployeeService { 15 | @Autowired 16 | EmployeeMapper employeeMapper; 17 | 18 | public List findAllEmployee() { 19 | return employeeMapper.selectByExampleWithDept(null); 20 | } 21 | 22 | /** 23 | * @param 24 | * @return void 25 | * @description 新增用户 26 | */ 27 | public void saveEmployee(Employee employee) { 28 | employeeMapper.insertSelective(employee); 29 | } 30 | 31 | /** 32 | * @param 33 | * @return boolean 34 | * @description 数据库中是否有empName,有返回false.没有返回true 35 | */ 36 | public boolean checkSameEmployee(String empName) { 37 | EmployeeExample example = new EmployeeExample(); 38 | Criteria criteria = example.createCriteria(); 39 | criteria.andEmpNameEqualTo(empName); 40 | long count = employeeMapper.countByExample(example); 41 | return count == 0; 42 | } 43 | 44 | public Employee getEmployee(Integer id) { 45 | Employee employee = employeeMapper.selectByPrimaryKey(id); 46 | return employee; 47 | } 48 | 49 | public void updateEmployee(Employee employee) { 50 | employeeMapper.updateByPrimaryKeySelective(employee); 51 | } 52 | 53 | public void deleteEmployee(Integer empId) { 54 | employeeMapper.deleteByPrimaryKey(empId); 55 | } 56 | 57 | public void deleteBatch(List ids) { 58 | 59 | EmployeeExample example = new EmployeeExample(); 60 | Criteria criteria = example.createCriteria(); 61 | criteria.andEmpIdIn(ids); 62 | employeeMapper.deleteByExample(example); 63 | 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driverClass=com.mysql.jdbc.Driver 2 | jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ssm_crud?useSSL=false&characterEncoding=utf-8 3 | jdbc.user=root 4 | jdbc.password=#你自己的数据库密码 5 | -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG,Console 2 | log4j.appender.Console=org.apache.log4j.ConsoleAppender 3 | log4j.appender.Console.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n 5 | log4j.logger.org.apache=INFO 6 | log4j.logger.com.wantao.dao=DEBUG 7 | log4j.logger.com.springframework=DEBUG 8 | log4j.logger.com.ibatis=DEBUG 9 | log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG 10 | log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG 11 | log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG 12 | log4j.logger.java.sql.Connection=DEBUG 13 | log4j.logger.java.sql.Statement=DEBUG 14 | log4j.logger.java.sql.PreparedStatement=DEBUG 15 | log4j.logger.java.sql.ResultSet=DEBUG -------------------------------------------------------------------------------- /src/main/resources/mapper/DepartmentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | and ${criterion.condition} 17 | 18 | 19 | and ${criterion.condition} #{criterion.value} 20 | 21 | 22 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 23 | 24 | 25 | and ${criterion.condition} 26 | 27 | #{listItem} 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | and ${criterion.condition} 46 | 47 | 48 | and ${criterion.condition} #{criterion.value} 49 | 50 | 51 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 52 | 53 | 54 | and ${criterion.condition} 55 | 56 | #{listItem} 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | dept_id, dept_name 68 | 69 | 83 | 89 | 90 | delete from tb_dept 91 | where dept_id = #{deptId,jdbcType=INTEGER} 92 | 93 | 94 | delete from tb_dept 95 | 96 | 97 | 98 | 99 | 100 | insert into tb_dept (dept_id, dept_name) 101 | values (#{deptId,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR}) 102 | 103 | 104 | insert into tb_dept 105 | 106 | 107 | dept_id, 108 | 109 | 110 | dept_name, 111 | 112 | 113 | 114 | 115 | #{deptId,jdbcType=INTEGER}, 116 | 117 | 118 | #{deptName,jdbcType=VARCHAR}, 119 | 120 | 121 | 122 | 128 | 129 | update tb_dept 130 | 131 | 132 | dept_id = #{record.deptId,jdbcType=INTEGER}, 133 | 134 | 135 | dept_name = #{record.deptName,jdbcType=VARCHAR}, 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | update tb_dept 144 | set dept_id = #{record.deptId,jdbcType=INTEGER}, 145 | dept_name = #{record.deptName,jdbcType=VARCHAR} 146 | 147 | 148 | 149 | 150 | 151 | update tb_dept 152 | 153 | 154 | dept_name = #{deptName,jdbcType=VARCHAR}, 155 | 156 | 157 | where dept_id = #{deptId,jdbcType=INTEGER} 158 | 159 | 160 | update tb_dept 161 | set dept_name = #{deptName,jdbcType=VARCHAR} 162 | where dept_id = #{deptId,jdbcType=INTEGER} 163 | 164 | -------------------------------------------------------------------------------- /src/main/resources/mapper/EmployeeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | and ${criterion.condition} 32 | 33 | 34 | and ${criterion.condition} #{criterion.value} 35 | 36 | 37 | and ${criterion.condition} #{criterion.value} and 38 | #{criterion.secondValue} 39 | 40 | 41 | and ${criterion.condition} 42 | 43 | #{listItem} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and 68 | #{criterion.secondValue} 69 | 70 | 71 | and ${criterion.condition} 72 | 73 | #{listItem} 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | emp_id, emp_name, gender, email, d_id 85 | 86 | 87 | emp_id, emp_name, gender, email, d_id,dept_id,dept_name 88 | 89 | 103 | 109 | 123 | 129 | 130 | delete from tb_emp 131 | where emp_id = #{empId,jdbcType=INTEGER} 132 | 133 | 134 | delete from tb_emp 135 | 136 | 137 | 138 | 139 | 140 | insert into tb_emp (emp_id, emp_name, gender, 141 | email, d_id) 142 | values (#{empId,jdbcType=INTEGER}, #{empName,jdbcType=VARCHAR}, 143 | #{gender,jdbcType=CHAR}, 144 | #{email,jdbcType=VARCHAR}, #{dId,jdbcType=INTEGER}) 145 | 146 | 147 | insert into tb_emp 148 | 149 | 150 | emp_id, 151 | 152 | 153 | emp_name, 154 | 155 | 156 | gender, 157 | 158 | 159 | email, 160 | 161 | 162 | d_id, 163 | 164 | 165 | 166 | 167 | #{empId,jdbcType=INTEGER}, 168 | 169 | 170 | #{empName,jdbcType=VARCHAR}, 171 | 172 | 173 | #{gender,jdbcType=CHAR}, 174 | 175 | 176 | #{email,jdbcType=VARCHAR}, 177 | 178 | 179 | #{dId,jdbcType=INTEGER}, 180 | 181 | 182 | 183 | 189 | 190 | update tb_emp 191 | 192 | 193 | emp_id = #{record.empId,jdbcType=INTEGER}, 194 | 195 | 196 | emp_name = #{record.empName,jdbcType=VARCHAR}, 197 | 198 | 199 | gender = #{record.gender,jdbcType=CHAR}, 200 | 201 | 202 | email = #{record.email,jdbcType=VARCHAR}, 203 | 204 | 205 | d_id = #{record.dId,jdbcType=INTEGER}, 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | update tb_emp 214 | set emp_id = #{record.empId,jdbcType=INTEGER}, 215 | emp_name = #{record.empName,jdbcType=VARCHAR}, 216 | gender = #{record.gender,jdbcType=CHAR}, 217 | email = #{record.email,jdbcType=VARCHAR}, 218 | d_id = #{record.dId,jdbcType=INTEGER} 219 | 220 | 221 | 222 | 223 | 224 | update tb_emp 225 | 226 | 227 | emp_name = #{empName,jdbcType=VARCHAR}, 228 | 229 | 230 | gender = #{gender,jdbcType=CHAR}, 231 | 232 | 233 | email = #{email,jdbcType=VARCHAR}, 234 | 235 | 236 | d_id = #{dId,jdbcType=INTEGER}, 237 | 238 | 239 | where emp_id = #{empId,jdbcType=INTEGER} 240 | 241 | 242 | update tb_emp 243 | set emp_name = #{empName,jdbcType=VARCHAR}, 244 | gender = #{gender,jdbcType=CHAR}, 245 | email = #{email,jdbcType=VARCHAR}, 246 | d_id = #{dId,jdbcType=INTEGER} 247 | where emp_id = #{empId,jdbcType=INTEGER} 248 | 249 | -------------------------------------------------------------------------------- /src/main/resources/mgb.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 39 |
40 | 42 |
43 |
44 |
45 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/resources/springmvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/main/webapp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/show.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | show 9 | <% 10 | pageContext.setAttribute("APP_PATH", request.getContextPath()); 11 | %> 12 | 14 | 16 | 18 | 19 | 20 | 21 |
22 | 23 |
24 |
SSM-CRUD
25 |
26 | 27 |
28 |
29 |
30 | 33 | 36 |
37 |
38 | 39 |
40 | 41 |
42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 67 | 68 | 69 |
#empNamegenderemaildeptNameoprate
${emp.empId }${emp.empName }${emp.gender }${emp.email}${emp.department.deptName } 60 | 63 | 66 |
70 |
71 |
72 | 73 |
74 | 75 |
76 |

当前第${pageInfo.pageNum}页,共${pageInfo.pages}页,共${pageInfo.total }条记录

77 |
78 | 79 |
80 | 114 |
115 |
116 |
117 | 118 | 119 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Archetype Created Web Application 7 | 9 | 10 | 11 | contextConfigLocation 12 | classpath:spring.xml 13 | 14 | 15 | 16 | 17 | org.springframework.web.context.ContextLoaderListener 18 | 19 | 21 | 22 | springDispatcherServlet 23 | org.springframework.web.servlet.DispatcherServlet 24 | 25 | contextConfigLocation 26 | classpath:springmvc.xml 27 | 28 | 1 29 | 30 | 31 | 32 | 33 | springDispatcherServlet 34 | / 35 | 36 | 37 | 38 | CharacterEncodingFilter 39 | org.springframework.web.filter.CharacterEncodingFilter 40 | 41 | encoding 42 | UTF-8 43 | 44 | 45 | forceRequestEncoding 46 | true 47 | 48 | 49 | forceResponseEncoding 50 | true 51 | 52 | 53 | 54 | CharacterEncodingFilter 55 | /* 56 | 57 | 58 | 59 | HiddenHttpMethodFilter 60 | org.springframework.web.filter.HiddenHttpMethodFilter 61 | 62 | 63 | HiddenHttpMethodFilter 64 | /* 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/webapp/index-1.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Index 8 | <% pageContext.setAttribute("APP_PATH",request.getContextPath()); %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | Index 9 | <% 10 | pageContext.setAttribute("APP_PATH", request.getContextPath()); 11 | %> 12 | 14 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 |
27 |
SSM-CRUD
28 |
29 | 30 |
31 |
32 |
33 | 36 | 39 |
40 |
41 | 42 |
43 | 44 |
45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
#empNamegenderemaildeptNameoprate
63 |
64 |
65 | 66 |
67 | 68 |
69 | 70 |
71 |
72 |
73 | 74 | 75 | 132 | 133 | 134 | 190 | 191 | -------------------------------------------------------------------------------- /src/main/webapp/js/index-1.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $("#btn1").click(function(){ 3 | $(location).attr("href","./emps") 4 | }); 5 | }); -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/src/main/webapp/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/static/bootstrap-3.3.7-dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/test/java/com/wantao/test/DaoTest.java: -------------------------------------------------------------------------------- 1 | package com.wantao.test; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.Test; 6 | import org.springframework.context.ApplicationContext; 7 | import org.springframework.context.support.ClassPathXmlApplicationContext; 8 | 9 | import com.wantao.bean.Department; 10 | import com.wantao.bean.Employee; 11 | import com.wantao.dao.DepartmentMapper; 12 | import com.wantao.dao.EmployeeMapper; 13 | 14 | /** 15 | * @author wantao 16 | * @date 2019-01-31 10:47 17 | * @description: 方法一:通过原始方法进行测试 18 | 1.创建spring容器 19 | 2.获取mapper 20 | */ 21 | public class DaoTest { 22 | 23 | @Test 24 | public void testCRUD() { 25 | ApplicationContext ac=new ClassPathXmlApplicationContext("spring.xml"); 26 | // DepartmentMapper departmentMapper=ac.getBean(DepartmentMapper.class); 27 | // Department department=new Department(); 28 | // department.setDeptId(2); 29 | // department.setDeptName("科学部"); 30 | // departmentMapper.insert(department); 31 | EmployeeMapper employeeMapper=ac.getBean(EmployeeMapper.class); 32 | // Employee employee=new Employee(); 33 | // employee.setdId(1); 34 | // employee.setEmpName("selenium"); 35 | // employee.setGender("male"); 36 | // employee.setdId(1); 37 | // employeeMapper.insert(employee); 38 | List employees=employeeMapper.selectByExampleWithDept(null); 39 | for(Employee employee :employees) { 40 | System.out.println(employee); 41 | } 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/test/java/com/wantao/test/DaoTest2.java: -------------------------------------------------------------------------------- 1 | package com.wantao.test; 2 | 3 | import java.util.List; 4 | import java.util.UUID; 5 | import java.util.logging.Logger; 6 | 7 | import org.apache.ibatis.session.SqlSession; 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.test.context.ContextConfiguration; 12 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 13 | 14 | import com.wantao.bean.Employee; 15 | import com.wantao.dao.DepartmentMapper; 16 | import com.wantao.dao.EmployeeMapper; 17 | import com.wantao.service.EmployeeService; 18 | 19 | /** 20 | * @author wantao 21 | * @date 2019-01-31 14:00 22 | * @description: 方法二:通过spring-test进行测试 1.@RunWith(SpringJUnit4ClassRunner.class) 23 | * 2.通过@ContextConfiguration指定spring配置文件 3.直接autowire注入组件 24 | */ 25 | @RunWith(SpringJUnit4ClassRunner.class) 26 | @ContextConfiguration(locations = { "classpath:spring.xml" }) // (实际上也是获取spring上下文) 27 | 28 | public class DaoTest2 { 29 | @Autowired 30 | DepartmentMapper departmentMapper; 31 | @Autowired 32 | SqlSession sqlSession;// 批量处理 33 | Logger logger = Logger.getLogger("DaoTest2.class"); 34 | @Autowired 35 | EmployeeService employeeService; 36 | 37 | // @Test 38 | // public void testDao() { 39 | // EmployeeMapper employeeMapper = sqlSession.getMapper(EmployeeMapper.class); 40 | // for (int i = 0; i < 1000; i++) { 41 | // String uuid = UUID.randomUUID().toString().substring(0, 5) + i; 42 | // employeeMapper.insertSelective(new Employee(null, uuid, "M", uuid + "@qq.com", 1)); 43 | // } 44 | // logger.info("插入完成"); 45 | // } 46 | 47 | @Test 48 | public void testSelectAll() { 49 | EmployeeMapper employeeMapper = sqlSession.getMapper(EmployeeMapper.class); 50 | List employees = employeeMapper.selectByExample(null); 51 | for (Employee employee : employees) { 52 | System.out.println(employee); 53 | } 54 | } 55 | 56 | @Test 57 | public void testCheckSameEmployee() { 58 | boolean result1 = employeeService.checkSameEmployee("万涛"); 59 | logger.info("" + result1); 60 | boolean result2 = employeeService.checkSameEmployee("selenium"); 61 | logger.info("" + result2); 62 | boolean result3 = employeeService.checkSameEmployee("cccc"); 63 | logger.info("" + result3); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/test/java/com/wantao/test/EmployeeControllerTest.java: -------------------------------------------------------------------------------- 1 | package com.wantao.test; 2 | 3 | import java.util.List; 4 | 5 | import org.junit.Before; 6 | import org.junit.BeforeClass; 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.mock.web.MockHttpServletRequest; 11 | import org.springframework.test.context.ContextConfiguration; 12 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 13 | import org.springframework.test.context.web.WebAppConfiguration; 14 | import org.springframework.test.web.servlet.MockMvc; 15 | import org.springframework.test.web.servlet.MockMvcBuilder; 16 | import org.springframework.test.web.servlet.MvcResult; 17 | import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; 18 | import org.springframework.test.web.servlet.setup.MockMvcBuilders; 19 | import org.springframework.web.context.WebApplicationContext; 20 | 21 | import com.github.pagehelper.PageInfo; 22 | import com.wantao.bean.Employee; 23 | 24 | /** 25 | * @author wantao 26 | * @date 2019-01-31 15:04 27 | * @description: mvc test 28 | */ 29 | @RunWith(SpringJUnit4ClassRunner.class) 30 | @WebAppConfiguration 31 | @ContextConfiguration(locations= {"classpath:spring.xml","classpath:springmvc.xml"}) 32 | public class EmployeeControllerTest { 33 | @Autowired 34 | WebApplicationContext context; 35 | MockMvc mockMvc; 36 | @Before 37 | public void init() { 38 | mockMvc=MockMvcBuilders.webAppContextSetup(context).build(); 39 | } 40 | @Test 41 | public void testPage() { 42 | try { 43 | MvcResult result=mockMvc.perform(MockMvcRequestBuilders.get("/emps").param("pn","1")).andReturn(); 44 | //请求成功后请求域中有pageInfo对象 45 | MockHttpServletRequest request=result.getRequest(); 46 | PageInfo pageInfo=(PageInfo) request.getAttribute("pageInfo"); 47 | System.out.println("当前页码"+pageInfo.getPageNum()); 48 | System.out.println("总页码数"+pageInfo.getPages()); 49 | List employees=pageInfo.getList(); 50 | for(Employee employee:employees) { 51 | System.out.println(employee.toString()); 52 | } 53 | 54 | } catch (Exception e) { 55 | // TODO Auto-generated catch block 56 | e.printStackTrace(); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/test/java/com/wantao/test/MGBTest.java: -------------------------------------------------------------------------------- 1 | package com.wantao.test; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.sql.SQLException; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | 9 | import org.junit.Test; 10 | import org.mybatis.generator.api.MyBatisGenerator; 11 | import org.mybatis.generator.config.Configuration; 12 | import org.mybatis.generator.config.xml.ConfigurationParser; 13 | import org.mybatis.generator.exception.InvalidConfigurationException; 14 | import org.mybatis.generator.exception.XMLParserException; 15 | import org.mybatis.generator.internal.DefaultShellCallback; 16 | 17 | public class MGBTest { 18 | @Test 19 | public void gennerator() 20 | throws IOException, XMLParserException, InvalidConfigurationException, SQLException, InterruptedException { 21 | List warnings = new ArrayList(); 22 | boolean overwrite = true; 23 | File configFile = new File("src/main/resources/mgb.xml"); 24 | ConfigurationParser cp = new ConfigurationParser(warnings); 25 | Configuration config = cp.parseConfiguration(configFile); 26 | DefaultShellCallback callback = new DefaultShellCallback(overwrite); 27 | MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings); 28 | myBatisGenerator.generate(null); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /ssm_crud.sql: -------------------------------------------------------------------------------- 1 | /* 2 | Navicat Premium Data Transfer 3 | 4 | Source Server : mysql 5 | Source Server Type : MySQL 6 | Source Server Version : 50726 7 | Source Host : localhost:3306 8 | Source Schema : ssm_crud 9 | 10 | Target Server Type : MySQL 11 | Target Server Version : 50726 12 | File Encoding : 65001 13 | 14 | Date: 30/05/2019 13:29:47 15 | */ 16 | 17 | SET NAMES utf8mb4; 18 | SET FOREIGN_KEY_CHECKS = 0; 19 | 20 | -- ---------------------------- 21 | -- Table structure for tb_dept 22 | -- ---------------------------- 23 | DROP TABLE IF EXISTS `tb_dept`; 24 | CREATE TABLE `tb_dept` ( 25 | `dept_id` int(11) NOT NULL AUTO_INCREMENT, 26 | `dept_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 27 | PRIMARY KEY (`dept_id`) USING BTREE 28 | ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; 29 | 30 | -- ---------------------------- 31 | -- Records of tb_dept 32 | -- ---------------------------- 33 | INSERT INTO `tb_dept` VALUES (1, '行政部'); 34 | 35 | -- ---------------------------- 36 | -- Table structure for tb_emp 37 | -- ---------------------------- 38 | DROP TABLE IF EXISTS `tb_emp`; 39 | CREATE TABLE `tb_emp` ( 40 | `emp_id` int(11) NOT NULL AUTO_INCREMENT, 41 | `emp_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, 42 | `gender` varchar(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 43 | `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, 44 | `d_id` int(11) NULL DEFAULT NULL, 45 | PRIMARY KEY (`emp_id`) USING BTREE, 46 | INDEX `fk_emp_dept`(`d_id`) USING BTREE, 47 | CONSTRAINT `fk_emp_dept` FOREIGN KEY (`d_id`) REFERENCES `tb_dept` (`dept_id`) ON DELETE RESTRICT ON UPDATE RESTRICT 48 | ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; 49 | 50 | -- ---------------------------- 51 | -- Records of tb_emp 52 | -- ---------------------------- 53 | INSERT INTO `tb_emp` VALUES (1, 'selenium', 'M', '895484122@qq.com', 1); 54 | 55 | SET FOREIGN_KEY_CHECKS = 1; 56 | -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/Department.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/Department.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/DepartmentExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/DepartmentExample$Criteria.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/DepartmentExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/DepartmentExample$Criterion.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/DepartmentExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/DepartmentExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/DepartmentExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/DepartmentExample.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/Employee.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/Employee.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/EmployeeExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/EmployeeExample$Criteria.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/EmployeeExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/EmployeeExample$Criterion.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/EmployeeExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/EmployeeExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/EmployeeExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/EmployeeExample.class -------------------------------------------------------------------------------- /target/classes/com/wantao/bean/Message.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/bean/Message.class -------------------------------------------------------------------------------- /target/classes/com/wantao/controller/DepartmentController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/controller/DepartmentController.class -------------------------------------------------------------------------------- /target/classes/com/wantao/controller/EmployeeController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/controller/EmployeeController.class -------------------------------------------------------------------------------- /target/classes/com/wantao/dao/DepartmentMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/dao/DepartmentMapper.class -------------------------------------------------------------------------------- /target/classes/com/wantao/dao/EmployeeMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/dao/EmployeeMapper.class -------------------------------------------------------------------------------- /target/classes/com/wantao/service/DepartmentService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/service/DepartmentService.class -------------------------------------------------------------------------------- /target/classes/com/wantao/service/EmployeeService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/classes/com/wantao/service/EmployeeService.class -------------------------------------------------------------------------------- /target/classes/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driverClass=com.mysql.jdbc.Driver 2 | jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ssm_crud?useSSL=false&characterEncoding=utf-8 3 | jdbc.user=root 4 | jdbc.password=15773272279wt..A 5 | -------------------------------------------------------------------------------- /target/classes/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG,Console 2 | log4j.appender.Console=org.apache.log4j.ConsoleAppender 3 | log4j.appender.Console.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n 5 | log4j.logger.org.apache=INFO 6 | log4j.logger.com.wantao.dao=DEBUG 7 | log4j.logger.com.springframework=DEBUG 8 | log4j.logger.com.ibatis=DEBUG 9 | log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG 10 | log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG 11 | log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG 12 | log4j.logger.java.sql.Connection=DEBUG 13 | log4j.logger.java.sql.Statement=DEBUG 14 | log4j.logger.java.sql.PreparedStatement=DEBUG 15 | log4j.logger.java.sql.ResultSet=DEBUG -------------------------------------------------------------------------------- /target/classes/mapper/DepartmentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | and ${criterion.condition} 17 | 18 | 19 | and ${criterion.condition} #{criterion.value} 20 | 21 | 22 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 23 | 24 | 25 | and ${criterion.condition} 26 | 27 | #{listItem} 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | and ${criterion.condition} 46 | 47 | 48 | and ${criterion.condition} #{criterion.value} 49 | 50 | 51 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 52 | 53 | 54 | and ${criterion.condition} 55 | 56 | #{listItem} 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | dept_id, dept_name 68 | 69 | 83 | 89 | 90 | delete from tb_dept 91 | where dept_id = #{deptId,jdbcType=INTEGER} 92 | 93 | 94 | delete from tb_dept 95 | 96 | 97 | 98 | 99 | 100 | insert into tb_dept (dept_id, dept_name) 101 | values (#{deptId,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR}) 102 | 103 | 104 | insert into tb_dept 105 | 106 | 107 | dept_id, 108 | 109 | 110 | dept_name, 111 | 112 | 113 | 114 | 115 | #{deptId,jdbcType=INTEGER}, 116 | 117 | 118 | #{deptName,jdbcType=VARCHAR}, 119 | 120 | 121 | 122 | 128 | 129 | update tb_dept 130 | 131 | 132 | dept_id = #{record.deptId,jdbcType=INTEGER}, 133 | 134 | 135 | dept_name = #{record.deptName,jdbcType=VARCHAR}, 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | update tb_dept 144 | set dept_id = #{record.deptId,jdbcType=INTEGER}, 145 | dept_name = #{record.deptName,jdbcType=VARCHAR} 146 | 147 | 148 | 149 | 150 | 151 | update tb_dept 152 | 153 | 154 | dept_name = #{deptName,jdbcType=VARCHAR}, 155 | 156 | 157 | where dept_id = #{deptId,jdbcType=INTEGER} 158 | 159 | 160 | update tb_dept 161 | set dept_name = #{deptName,jdbcType=VARCHAR} 162 | where dept_id = #{deptId,jdbcType=INTEGER} 163 | 164 | -------------------------------------------------------------------------------- /target/classes/mapper/EmployeeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | and ${criterion.condition} 32 | 33 | 34 | and ${criterion.condition} #{criterion.value} 35 | 36 | 37 | and ${criterion.condition} #{criterion.value} and 38 | #{criterion.secondValue} 39 | 40 | 41 | and ${criterion.condition} 42 | 43 | #{listItem} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | and ${criterion.condition} 62 | 63 | 64 | and ${criterion.condition} #{criterion.value} 65 | 66 | 67 | and ${criterion.condition} #{criterion.value} and 68 | #{criterion.secondValue} 69 | 70 | 71 | and ${criterion.condition} 72 | 73 | #{listItem} 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | emp_id, emp_name, gender, email, d_id 85 | 86 | 87 | emp_id, emp_name, gender, email, d_id,dept_id,dept_name 88 | 89 | 103 | 109 | 123 | 129 | 130 | delete from tb_emp 131 | where emp_id = #{empId,jdbcType=INTEGER} 132 | 133 | 134 | delete from tb_emp 135 | 136 | 137 | 138 | 139 | 140 | insert into tb_emp (emp_id, emp_name, gender, 141 | email, d_id) 142 | values (#{empId,jdbcType=INTEGER}, #{empName,jdbcType=VARCHAR}, 143 | #{gender,jdbcType=CHAR}, 144 | #{email,jdbcType=VARCHAR}, #{dId,jdbcType=INTEGER}) 145 | 146 | 147 | insert into tb_emp 148 | 149 | 150 | emp_id, 151 | 152 | 153 | emp_name, 154 | 155 | 156 | gender, 157 | 158 | 159 | email, 160 | 161 | 162 | d_id, 163 | 164 | 165 | 166 | 167 | #{empId,jdbcType=INTEGER}, 168 | 169 | 170 | #{empName,jdbcType=VARCHAR}, 171 | 172 | 173 | #{gender,jdbcType=CHAR}, 174 | 175 | 176 | #{email,jdbcType=VARCHAR}, 177 | 178 | 179 | #{dId,jdbcType=INTEGER}, 180 | 181 | 182 | 183 | 189 | 190 | update tb_emp 191 | 192 | 193 | emp_id = #{record.empId,jdbcType=INTEGER}, 194 | 195 | 196 | emp_name = #{record.empName,jdbcType=VARCHAR}, 197 | 198 | 199 | gender = #{record.gender,jdbcType=CHAR}, 200 | 201 | 202 | email = #{record.email,jdbcType=VARCHAR}, 203 | 204 | 205 | d_id = #{record.dId,jdbcType=INTEGER}, 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | update tb_emp 214 | set emp_id = #{record.empId,jdbcType=INTEGER}, 215 | emp_name = #{record.empName,jdbcType=VARCHAR}, 216 | gender = #{record.gender,jdbcType=CHAR}, 217 | email = #{record.email,jdbcType=VARCHAR}, 218 | d_id = #{record.dId,jdbcType=INTEGER} 219 | 220 | 221 | 222 | 223 | 224 | update tb_emp 225 | 226 | 227 | emp_name = #{empName,jdbcType=VARCHAR}, 228 | 229 | 230 | gender = #{gender,jdbcType=CHAR}, 231 | 232 | 233 | email = #{email,jdbcType=VARCHAR}, 234 | 235 | 236 | d_id = #{dId,jdbcType=INTEGER}, 237 | 238 | 239 | where emp_id = #{empId,jdbcType=INTEGER} 240 | 241 | 242 | update tb_emp 243 | set emp_name = #{empName,jdbcType=VARCHAR}, 244 | gender = #{gender,jdbcType=CHAR}, 245 | email = #{email,jdbcType=VARCHAR}, 246 | d_id = #{dId,jdbcType=INTEGER} 247 | where emp_id = #{empId,jdbcType=INTEGER} 248 | 249 | -------------------------------------------------------------------------------- /target/classes/mgb.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 39 |
40 | 42 |
43 |
44 |
-------------------------------------------------------------------------------- /target/classes/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /target/classes/spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /target/classes/springmvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /target/m2e-wtp/web-resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: selenium 3 | Build-Jdk: 1.8.0_202 4 | Created-By: Maven Integration for Eclipse 5 | 6 | -------------------------------------------------------------------------------- /target/m2e-wtp/web-resources/META-INF/maven/com.wantao/ssm-crud/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven Integration for Eclipse 2 | #Thu May 30 13:15:05 CST 2019 3 | version=0.0.1-SNAPSHOT 4 | groupId=com.wantao 5 | m2e.projectName=java-project0 6 | m2e.projectLocation=/home/selenium/selenium/src/eclipse/java-project0 7 | artifactId=ssm-crud 8 | -------------------------------------------------------------------------------- /target/m2e-wtp/web-resources/META-INF/maven/com.wantao/ssm-crud/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | com.wantao 6 | ssm-crud 7 | 0.0.1-SNAPSHOT 8 | war 9 | 10 | 11 | 12 | org.apache.maven.plugins 13 | maven-compiler-plugin 14 | 3.3 15 | 16 | 1.8 17 | 1.8 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | org.springframework 26 | spring-web 27 | 5.1.3.RELEASE 28 | 29 | 30 | org.springframework 31 | spring-webmvc 32 | 5.1.3.RELEASE 33 | 34 | 35 | 36 | 37 | com.fasterxml.jackson.core 38 | jackson-databind 39 | 2.9.7 40 | 41 | 42 | 43 | 44 | org.hibernate 45 | hibernate-validator 46 | 5.3.5.Final 47 | 48 | 49 | 50 | 51 | 52 | org.springframework 53 | spring-beans 54 | 5.1.3.RELEASE 55 | 56 | 57 | org.springframework 58 | spring-context 59 | 5.1.3.RELEASE 60 | 61 | 62 | org.springframework 63 | spring-core 64 | 5.1.3.RELEASE 65 | 66 | 67 | org.springframework 68 | spring-expression 69 | 5.1.3.RELEASE 70 | 71 | 72 | 73 | org.springframework 74 | spring-jdbc 75 | 5.1.3.RELEASE 76 | 77 | 78 | 79 | org.springframework 80 | spring-aspects 81 | 5.1.3.RELEASE 82 | 83 | 84 | 85 | org.springframework 86 | spring-test 87 | 5.1.3.RELEASE 88 | test 89 | 90 | 91 | 92 | 93 | commons-logging 94 | commons-logging 95 | 1.2 96 | 97 | 98 | 99 | 100 | 101 | org.mybatis 102 | mybatis 103 | 3.4.5 104 | 105 | 106 | 107 | org.mybatis 108 | mybatis-spring 109 | 1.3.2 110 | 111 | 112 | 113 | org.mybatis.generator 114 | mybatis-generator-core 115 | 1.3.5 116 | 117 | 118 | 119 | com.github.pagehelper 120 | pagehelper 121 | 5.1.3 122 | 123 | 124 | 125 | org.slf4j 126 | slf4j-api 127 | 1.7.12 128 | 129 | 130 | org.slf4j 131 | slf4j-log4j12 132 | 1.7.12 133 | 134 | 135 | log4j 136 | log4j 137 | 1.2.17 138 | 139 | 140 | 141 | 142 | 143 | c3p0 144 | c3p0 145 | 0.9.1.2 146 | 147 | 148 | mysql 149 | mysql-connector-java 150 | 5.1.38 151 | 152 | 153 | 154 | 155 | jstl 156 | jstl 157 | 1.2 158 | 159 | 160 | 161 | javax.servlet 162 | javax.servlet-api 163 | 3.1.0 164 | provided 165 | 166 | 167 | 168 | junit 169 | junit 170 | 4.12 171 | test 172 | 173 | 174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Tue Feb 05 16:05:12 CST 2019 3 | version=0.0.1-SNAPSHOT 4 | groupId=com.wantao 5 | artifactId=ssm-crud 6 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\service\DepartmentService.java 2 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\bean\DepartmentExample.java 3 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\controller\EmployeeController.java 4 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\bean\EmployeeExample.java 5 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\controller\DepartmentController.java 6 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\dao\DepartmentMapper.java 7 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\bean\Department.java 8 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\bean\Employee.java 9 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\service\EmployeeService.java 10 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\bean\Message.java 11 | D:\src\eclipse\ssm-crud\src\main\java\com\wantao\dao\EmployeeMapper.java 12 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\src\eclipse\ssm-crud\src\test\java\com\wantao\test\EmployeeControllerTest.java 2 | D:\src\eclipse\ssm-crud\src\test\java\com\wantao\test\MGBTest.java 3 | D:\src\eclipse\ssm-crud\src\test\java\com\wantao\test\DaoTest.java 4 | D:\src\eclipse\ssm-crud\src\test\java\com\wantao\test\DaoTest2.java 5 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT.war -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/Department.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/Department.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample$Criteria.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample$Criterion.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/DepartmentExample.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/Employee.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/Employee.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample$Criteria.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample$Criterion.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/EmployeeExample.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/Message.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/bean/Message.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/controller/DepartmentController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/controller/DepartmentController.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/controller/EmployeeController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/controller/EmployeeController.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/dao/DepartmentMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/dao/DepartmentMapper.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/dao/EmployeeMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/dao/EmployeeMapper.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/service/DepartmentService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/service/DepartmentService.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/service/EmployeeService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/com/wantao/service/EmployeeService.class -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driverClass=com.mysql.jdbc.Driver 2 | jdbc.jdbcUrl=jdbc:mysql://localhost:3306/ssm_crud?useSSL=false&characterEncoding=utf-8 3 | jdbc.user=root 4 | jdbc.password=15773272279wt..A -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=DEBUG,Console 2 | log4j.appender.Console=org.apache.log4j.ConsoleAppender 3 | log4j.appender.Console.layout=org.apache.log4j.PatternLayout 4 | log4j.appender.Console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%n 5 | log4j.logger.org.apache=INFO -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/mapper/DepartmentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | and ${criterion.condition} 17 | 18 | 19 | and ${criterion.condition} #{criterion.value} 20 | 21 | 22 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 23 | 24 | 25 | and ${criterion.condition} 26 | 27 | #{listItem} 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | and ${criterion.condition} 46 | 47 | 48 | and ${criterion.condition} #{criterion.value} 49 | 50 | 51 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} 52 | 53 | 54 | and ${criterion.condition} 55 | 56 | #{listItem} 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | dept_id, dept_name 68 | 69 | 83 | 89 | 90 | delete from tb_dept 91 | where dept_id = #{deptId,jdbcType=INTEGER} 92 | 93 | 94 | delete from tb_dept 95 | 96 | 97 | 98 | 99 | 100 | insert into tb_dept (dept_id, dept_name) 101 | values (#{deptId,jdbcType=INTEGER}, #{deptName,jdbcType=VARCHAR}) 102 | 103 | 104 | insert into tb_dept 105 | 106 | 107 | dept_id, 108 | 109 | 110 | dept_name, 111 | 112 | 113 | 114 | 115 | #{deptId,jdbcType=INTEGER}, 116 | 117 | 118 | #{deptName,jdbcType=VARCHAR}, 119 | 120 | 121 | 122 | 128 | 129 | update tb_dept 130 | 131 | 132 | dept_id = #{record.deptId,jdbcType=INTEGER}, 133 | 134 | 135 | dept_name = #{record.deptName,jdbcType=VARCHAR}, 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | update tb_dept 144 | set dept_id = #{record.deptId,jdbcType=INTEGER}, 145 | dept_name = #{record.deptName,jdbcType=VARCHAR} 146 | 147 | 148 | 149 | 150 | 151 | update tb_dept 152 | 153 | 154 | dept_name = #{deptName,jdbcType=VARCHAR}, 155 | 156 | 157 | where dept_id = #{deptId,jdbcType=INTEGER} 158 | 159 | 160 | update tb_dept 161 | set dept_name = #{deptName,jdbcType=VARCHAR} 162 | where dept_id = #{deptId,jdbcType=INTEGER} 163 | 164 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/mapper/EmployeeMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 30 | 31 | 32 | 33 | 34 | 35 | and ${criterion.condition} 36 | 37 | 38 | and ${criterion.condition} #{criterion.value} 39 | 40 | 41 | and ${criterion.condition} #{criterion.value} and 42 | #{criterion.secondValue} 43 | 44 | 45 | and ${criterion.condition} 46 | 48 | #{listItem} 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 62 | 63 | 64 | 65 | 66 | 67 | and ${criterion.condition} 68 | 69 | 70 | and ${criterion.condition} #{criterion.value} 71 | 72 | 73 | and ${criterion.condition} #{criterion.value} and 74 | #{criterion.secondValue} 75 | 76 | 77 | and ${criterion.condition} 78 | 80 | #{listItem} 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | emp_id, emp_name, gender, email, d_id 92 | 93 | 94 | emp_id, emp_name, gender, email, d_id,dept_id,dept_name 95 | 96 | 112 | 119 | 133 | 140 | 142 | delete from tb_emp 143 | where emp_id = #{empId,jdbcType=INTEGER} 144 | 145 | 147 | delete from tb_emp 148 | 149 | 150 | 151 | 152 | 153 | insert into tb_emp (emp_id, emp_name, gender, 154 | email, d_id) 155 | values (#{empId,jdbcType=INTEGER}, #{empName,jdbcType=VARCHAR}, 156 | #{gender,jdbcType=CHAR}, 157 | #{email,jdbcType=VARCHAR}, #{dId,jdbcType=INTEGER}) 158 | 159 | 161 | insert into tb_emp 162 | 163 | 164 | emp_id, 165 | 166 | 167 | emp_name, 168 | 169 | 170 | gender, 171 | 172 | 173 | email, 174 | 175 | 176 | d_id, 177 | 178 | 179 | 180 | 181 | #{empId,jdbcType=INTEGER}, 182 | 183 | 184 | #{empName,jdbcType=VARCHAR}, 185 | 186 | 187 | #{gender,jdbcType=CHAR}, 188 | 189 | 190 | #{email,jdbcType=VARCHAR}, 191 | 192 | 193 | #{dId,jdbcType=INTEGER}, 194 | 195 | 196 | 197 | 205 | 206 | update tb_emp 207 | 208 | 209 | emp_id = #{record.empId,jdbcType=INTEGER}, 210 | 211 | 212 | emp_name = #{record.empName,jdbcType=VARCHAR}, 213 | 214 | 215 | gender = #{record.gender,jdbcType=CHAR}, 216 | 217 | 218 | email = #{record.email,jdbcType=VARCHAR}, 219 | 220 | 221 | d_id = #{record.dId,jdbcType=INTEGER}, 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | update tb_emp 230 | set emp_id = #{record.empId,jdbcType=INTEGER}, 231 | emp_name = #{record.empName,jdbcType=VARCHAR}, 232 | gender = #{record.gender,jdbcType=CHAR}, 233 | email = #{record.email,jdbcType=VARCHAR}, 234 | d_id = #{record.dId,jdbcType=INTEGER} 235 | 236 | 237 | 238 | 239 | 241 | update tb_emp 242 | 243 | 244 | emp_name = #{empName,jdbcType=VARCHAR}, 245 | 246 | 247 | gender = #{gender,jdbcType=CHAR}, 248 | 249 | 250 | email = #{email,jdbcType=VARCHAR}, 251 | 252 | 253 | d_id = #{dId,jdbcType=INTEGER}, 254 | 255 | 256 | where emp_id = #{empId,jdbcType=INTEGER} 257 | 258 | 260 | update tb_emp 261 | set emp_name = #{empName,jdbcType=VARCHAR}, 262 | gender = #{gender,jdbcType=CHAR}, 263 | email = #{email,jdbcType=VARCHAR}, 264 | d_id = #{dId,jdbcType=INTEGER} 265 | where emp_id = #{empId,jdbcType=INTEGER} 266 | 267 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/mgb.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 39 |
40 | 42 |
43 |
44 |
-------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/classes/springmvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 11 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/aspectjweaver-1.9.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/aspectjweaver-1.9.2.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/c3p0-0.9.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/c3p0-0.9.1.2.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/classmate-1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/classmate-1.3.1.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/hibernate-validator-5.3.5.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/hibernate-validator-5.3.5.Final.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jackson-annotations-2.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jackson-annotations-2.9.0.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jackson-core-2.9.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jackson-core-2.9.7.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jackson-databind-2.9.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jackson-databind-2.9.7.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jboss-logging-3.3.0.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jboss-logging-3.3.0.Final.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jsqlparser-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jsqlparser-1.0.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mybatis-3.4.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mybatis-3.4.5.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mybatis-generator-core-1.3.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mybatis-generator-core-1.3.5.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mybatis-spring-1.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mybatis-spring-1.3.2.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mysql-connector-java-5.1.38.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/mysql-connector-java-5.1.38.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/pagehelper-5.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/pagehelper-5.1.3.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/slf4j-api-1.7.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/slf4j-api-1.7.12.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/slf4j-log4j12-1.7.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/slf4j-log4j12-1.7.12.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-aop-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-aop-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-aspects-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-aspects-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-beans-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-beans-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-context-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-context-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-core-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-core-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-expression-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-expression-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-jcl-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-jcl-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-jdbc-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-jdbc-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-tx-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-tx-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-web-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-web-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-webmvc-5.1.3.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/spring-webmvc-5.1.3.RELEASE.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/validation-api-1.1.0.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/lib/validation-api-1.1.0.Final.jar -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/views/show.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | show 9 | <% 10 | pageContext.setAttribute("APP_PATH", request.getContextPath()); 11 | %> 12 | 14 | 16 | 18 | 19 | 20 | 21 |
22 | 23 |
24 |
SSM-CRUD
25 |
26 | 27 |
28 |
29 |
30 | 33 | 36 |
37 |
38 | 39 |
40 | 41 |
42 |
43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 67 | 68 | 69 |
#empNamegenderemaildeptNameoprate
${emp.empId }${emp.empName }${emp.gender }${emp.email}${emp.department.deptName } 60 | 63 | 66 |
70 |
71 |
72 | 73 |
74 | 75 |
76 |

当前第${pageInfo.pageNum}页,共${pageInfo.pages}页,共${pageInfo.total }条记录

77 |
78 | 79 |
80 | 114 |
115 |
116 |
117 | 118 | 119 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | Archetype Created Web Application 7 | 9 | 10 | 11 | contextConfigLocation 12 | classpath:spring.xml 13 | 14 | 15 | 16 | 17 | org.springframework.web.context.ContextLoaderListener 18 | 19 | 21 | 22 | springDispatcherServlet 23 | org.springframework.web.servlet.DispatcherServlet 24 | 25 | contextConfigLocation 26 | classpath:springmvc.xml 27 | 28 | 1 29 | 30 | 31 | 32 | 33 | springDispatcherServlet 34 | / 35 | 36 | 37 | 38 | CharacterEncodingFilter 39 | org.springframework.web.filter.CharacterEncodingFilter 40 | 41 | encoding 42 | UTF-8 43 | 44 | 45 | forceRequestEncoding 46 | true 47 | 48 | 49 | forceResponseEncoding 50 | true 51 | 52 | 53 | 54 | CharacterEncodingFilter 55 | /* 56 | 57 | 58 | 59 | HiddenHttpMethodFilter 60 | org.springframework.web.filter.HiddenHttpMethodFilter 61 | 62 | 63 | HiddenHttpMethodFilter 64 | /* 65 | 66 | 67 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/index-1.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Index 8 | <% pageContext.setAttribute("APP_PATH",request.getContextPath()); %> 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | Index 9 | <% 10 | pageContext.setAttribute("APP_PATH", request.getContextPath()); 11 | %> 12 | 14 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 |
27 |
SSM-CRUD
28 |
29 | 30 |
31 |
32 |
33 | 36 | 39 |
40 |
41 | 42 |
43 | 44 |
45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
#empNamegenderemaildeptNameoprate
63 |
64 |
65 | 66 |
67 | 68 |
69 | 70 |
71 |
72 |
73 | 74 | 75 | 132 | 133 | 134 | 190 | 191 | -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/js/index-1.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | $("#btn1").click(function(){ 3 | $(location).attr("href","./emps") 4 | }); 5 | }); -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /target/ssm-crud-0.0.1-SNAPSHOT/static/bootstrap-3.3.7-dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /target/surefire-reports/TEST-com.wantao.test.DaoTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /target/surefire-reports/TEST-com.wantao.test.EmployeeControllerTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /target/surefire-reports/TEST-com.wantao.test.MGBTest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /target/surefire-reports/com.wantao.test.DaoTest.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: com.wantao.test.DaoTest 3 | ------------------------------------------------------------------------------- 4 | Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.898 sec 5 | -------------------------------------------------------------------------------- /target/surefire-reports/com.wantao.test.EmployeeControllerTest.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: com.wantao.test.EmployeeControllerTest 3 | ------------------------------------------------------------------------------- 4 | Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.03 sec 5 | -------------------------------------------------------------------------------- /target/surefire-reports/com.wantao.test.MGBTest.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------------------- 2 | Test set: com.wantao.test.MGBTest 3 | ------------------------------------------------------------------------------- 4 | Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.25 sec 5 | -------------------------------------------------------------------------------- /target/test-classes/com/wantao/test/DaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/test-classes/com/wantao/test/DaoTest.class -------------------------------------------------------------------------------- /target/test-classes/com/wantao/test/DaoTest2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/test-classes/com/wantao/test/DaoTest2.class -------------------------------------------------------------------------------- /target/test-classes/com/wantao/test/EmployeeControllerTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/test-classes/com/wantao/test/EmployeeControllerTest.class -------------------------------------------------------------------------------- /target/test-classes/com/wantao/test/MGBTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Selenium39/java-project0/3b3af5043f8557aad1340329b18cad91cffca3fb/target/test-classes/com/wantao/test/MGBTest.class -------------------------------------------------------------------------------- /tree.txt: -------------------------------------------------------------------------------- 1 | 卷 新加卷 的文件夹 PATH 列表 2 | 卷序列号为 9266-E901 3 | D:. 4 | │ .classpath 5 | │ .project 6 | │ .springBeans 7 | │ pom.xml 8 | │ README.md 9 | │ tree.txt 10 | │ 11 | ├─.settings 12 | │ .jsdtscope 13 | │ org.eclipse.jdt.core.prefs 14 | │ org.eclipse.jst.j2ee.ejb.annotations.xdoclet.prefs 15 | │ org.eclipse.m2e.core.prefs 16 | │ org.eclipse.wst.common.component 17 | │ org.eclipse.wst.common.project.facet.core.xml 18 | │ org.eclipse.wst.jsdt.ui.superType.container 19 | │ org.eclipse.wst.jsdt.ui.superType.name 20 | │ org.eclipse.wst.validation.prefs 21 | │ 22 | ├─result-image 23 | │ add.png 24 | │ delete.png 25 | │ index.png 26 | │ update.png 27 | │ 28 | ├─src 29 | │ ├─main 30 | │ │ ├─java 31 | │ │ │ └─com 32 | │ │ │ └─wantao 33 | │ │ │ ├─bean 34 | │ │ │ │ Department.java 35 | │ │ │ │ DepartmentExample.java 36 | │ │ │ │ Employee.java 37 | │ │ │ │ EmployeeExample.java 38 | │ │ │ │ Message.java 39 | │ │ │ │ 40 | │ │ │ ├─controller 41 | │ │ │ │ DepartmentController.java 42 | │ │ │ │ EmployeeController.java 43 | │ │ │ │ 44 | │ │ │ ├─dao 45 | │ │ │ │ DepartmentMapper.java 46 | │ │ │ │ EmployeeMapper.java 47 | │ │ │ │ 48 | │ │ │ └─service 49 | │ │ │ DepartmentService.java 50 | │ │ │ EmployeeService.java 51 | │ │ │ 52 | │ │ ├─resources 53 | │ │ │ │ jdbc.properties 54 | │ │ │ │ log4j.properties 55 | │ │ │ │ mgb.xml 56 | │ │ │ │ mybatis-config.xml 57 | │ │ │ │ spring.xml 58 | │ │ │ │ springmvc.xml 59 | │ │ │ │ 60 | │ │ │ └─mapper 61 | │ │ │ DepartmentMapper.xml 62 | │ │ │ EmployeeMapper.xml 63 | │ │ │ 64 | │ │ └─webapp 65 | │ │ │ index-1.jsp 66 | │ │ │ index.jsp 67 | │ │ │ 68 | │ │ ├─js 69 | │ │ │ index-1.js 70 | │ │ │ index.js 71 | │ │ │ 72 | │ │ ├─META-INF 73 | │ │ │ MANIFEST.MF 74 | │ │ │ 75 | │ │ ├─static 76 | │ │ │ │ jquery-3.2.1.min.js 77 | │ │ │ │ 78 | │ │ │ └─bootstrap-3.3.7-dist 79 | │ │ │ ├─css 80 | │ │ │ │ bootstrap-theme.css 81 | │ │ │ │ bootstrap-theme.css.map 82 | │ │ │ │ bootstrap-theme.min.css 83 | │ │ │ │ bootstrap-theme.min.css.map 84 | │ │ │ │ bootstrap.css 85 | │ │ │ │ bootstrap.css.map 86 | │ │ │ │ bootstrap.min.css 87 | │ │ │ │ bootstrap.min.css.map 88 | │ │ │ │ 89 | │ │ │ ├─fonts 90 | │ │ │ │ glyphicons-halflings-regular.eot 91 | │ │ │ │ glyphicons-halflings-regular.svg 92 | │ │ │ │ glyphicons-halflings-regular.ttf 93 | │ │ │ │ glyphicons-halflings-regular.woff 94 | │ │ │ │ glyphicons-halflings-regular.woff2 95 | │ │ │ │ 96 | │ │ │ └─js 97 | │ │ │ bootstrap.js 98 | │ │ │ bootstrap.min.js 99 | │ │ │ npm.js 100 | │ │ │ 101 | │ │ └─WEB-INF 102 | │ │ │ web.xml 103 | │ │ │ 104 | │ │ ├─lib 105 | │ │ └─views 106 | │ │ show.jsp 107 | │ │ 108 | │ └─test 109 | │ ├─java 110 | │ │ └─com 111 | │ │ └─wantao 112 | │ │ └─test 113 | │ │ DaoTest.java 114 | │ │ DaoTest2.java 115 | │ │ EmployeeControllerTest.java 116 | │ │ MGBTest.java 117 | │ │ 118 | │ └─resources 119 | └─target 120 | │ ssm-crud-0.0.1-SNAPSHOT.war 121 | │ 122 | ├─classes 123 | │ │ jdbc.properties 124 | │ │ log4j.properties 125 | │ │ mgb.xml 126 | │ │ mybatis-config.xml 127 | │ │ spring.xml 128 | │ │ springmvc.xml 129 | │ │ 130 | │ ├─com 131 | │ │ └─wantao 132 | │ │ ├─bean 133 | │ │ │ Department.class 134 | │ │ │ DepartmentExample$Criteria.class 135 | │ │ │ DepartmentExample$Criterion.class 136 | │ │ │ DepartmentExample$GeneratedCriteria.class 137 | │ │ │ DepartmentExample.class 138 | │ │ │ Employee.class 139 | │ │ │ EmployeeExample$Criteria.class 140 | │ │ │ EmployeeExample$Criterion.class 141 | │ │ │ EmployeeExample$GeneratedCriteria.class 142 | │ │ │ EmployeeExample.class 143 | │ │ │ Message.class 144 | │ │ │ 145 | │ │ ├─controller 146 | │ │ │ DepartmentController.class 147 | │ │ │ EmployeeController.class 148 | │ │ │ 149 | │ │ ├─dao 150 | │ │ │ DepartmentMapper.class 151 | │ │ │ EmployeeMapper.class 152 | │ │ │ 153 | │ │ └─service 154 | │ │ DepartmentService.class 155 | │ │ EmployeeService.class 156 | │ │ 157 | │ └─mapper 158 | │ DepartmentMapper.xml 159 | │ EmployeeMapper.xml 160 | │ 161 | ├─generated-test-sources 162 | │ └─test-annotations 163 | ├─m2e-wtp 164 | │ └─web-resources 165 | │ └─META-INF 166 | │ │ MANIFEST.MF 167 | │ │ 168 | │ └─maven 169 | │ └─com.wantao 170 | │ └─ssm-crud 171 | │ pom.properties 172 | │ pom.xml 173 | │ 174 | ├─maven-archiver 175 | │ pom.properties 176 | │ 177 | ├─maven-status 178 | │ └─maven-compiler-plugin 179 | │ ├─compile 180 | │ │ └─default-compile 181 | │ │ createdFiles.lst 182 | │ │ inputFiles.lst 183 | │ │ 184 | │ └─testCompile 185 | │ └─default-testCompile 186 | │ createdFiles.lst 187 | │ inputFiles.lst 188 | │ 189 | ├─ssm-crud-0.0.1-SNAPSHOT 190 | │ │ index-1.jsp 191 | │ │ index.jsp 192 | │ │ 193 | │ ├─js 194 | │ │ index-1.js 195 | │ │ index.js 196 | │ │ 197 | │ ├─META-INF 198 | │ │ MANIFEST.MF 199 | │ │ 200 | │ ├─static 201 | │ │ │ jquery-3.2.1.min.js 202 | │ │ │ 203 | │ │ └─bootstrap-3.3.7-dist 204 | │ │ ├─css 205 | │ │ │ bootstrap-theme.css 206 | │ │ │ bootstrap-theme.css.map 207 | │ │ │ bootstrap-theme.min.css 208 | │ │ │ bootstrap-theme.min.css.map 209 | │ │ │ bootstrap.css 210 | │ │ │ bootstrap.css.map 211 | │ │ │ bootstrap.min.css 212 | │ │ │ bootstrap.min.css.map 213 | │ │ │ 214 | │ │ ├─fonts 215 | │ │ │ glyphicons-halflings-regular.eot 216 | │ │ │ glyphicons-halflings-regular.svg 217 | │ │ │ glyphicons-halflings-regular.ttf 218 | │ │ │ glyphicons-halflings-regular.woff 219 | │ │ │ glyphicons-halflings-regular.woff2 220 | │ │ │ 221 | │ │ └─js 222 | │ │ bootstrap.js 223 | │ │ bootstrap.min.js 224 | │ │ npm.js 225 | │ │ 226 | │ └─WEB-INF 227 | │ │ web.xml 228 | │ │ 229 | │ ├─classes 230 | │ │ │ jdbc.properties 231 | │ │ │ log4j.properties 232 | │ │ │ mgb.xml 233 | │ │ │ mybatis-config.xml 234 | │ │ │ spring.xml 235 | │ │ │ springmvc.xml 236 | │ │ │ 237 | │ │ ├─com 238 | │ │ │ └─wantao 239 | │ │ │ ├─bean 240 | │ │ │ │ Department.class 241 | │ │ │ │ DepartmentExample$Criteria.class 242 | │ │ │ │ DepartmentExample$Criterion.class 243 | │ │ │ │ DepartmentExample$GeneratedCriteria.class 244 | │ │ │ │ DepartmentExample.class 245 | │ │ │ │ Employee.class 246 | │ │ │ │ EmployeeExample$Criteria.class 247 | │ │ │ │ EmployeeExample$Criterion.class 248 | │ │ │ │ EmployeeExample$GeneratedCriteria.class 249 | │ │ │ │ EmployeeExample.class 250 | │ │ │ │ Message.class 251 | │ │ │ │ 252 | │ │ │ ├─controller 253 | │ │ │ │ DepartmentController.class 254 | │ │ │ │ EmployeeController.class 255 | │ │ │ │ 256 | │ │ │ ├─dao 257 | │ │ │ │ DepartmentMapper.class 258 | │ │ │ │ EmployeeMapper.class 259 | │ │ │ │ 260 | │ │ │ └─service 261 | │ │ │ DepartmentService.class 262 | │ │ │ EmployeeService.class 263 | │ │ │ 264 | │ │ └─mapper 265 | │ │ DepartmentMapper.xml 266 | │ │ EmployeeMapper.xml 267 | │ │ 268 | │ ├─lib 269 | │ │ aspectjweaver-1.9.2.jar 270 | │ │ c3p0-0.9.1.2.jar 271 | │ │ classmate-1.3.1.jar 272 | │ │ commons-logging-1.2.jar 273 | │ │ hibernate-validator-5.3.5.Final.jar 274 | │ │ jackson-annotations-2.9.0.jar 275 | │ │ jackson-core-2.9.7.jar 276 | │ │ jackson-databind-2.9.7.jar 277 | │ │ jboss-logging-3.3.0.Final.jar 278 | │ │ jsqlparser-1.0.jar 279 | │ │ jstl-1.2.jar 280 | │ │ log4j-1.2.17.jar 281 | │ │ mybatis-3.4.5.jar 282 | │ │ mybatis-generator-core-1.3.5.jar 283 | │ │ mybatis-spring-1.3.2.jar 284 | │ │ mysql-connector-java-5.1.38.jar 285 | │ │ pagehelper-5.1.3.jar 286 | │ │ slf4j-api-1.7.12.jar 287 | │ │ slf4j-log4j12-1.7.12.jar 288 | │ │ spring-aop-5.1.3.RELEASE.jar 289 | │ │ spring-aspects-5.1.3.RELEASE.jar 290 | │ │ spring-beans-5.1.3.RELEASE.jar 291 | │ │ spring-context-5.1.3.RELEASE.jar 292 | │ │ spring-core-5.1.3.RELEASE.jar 293 | │ │ spring-expression-5.1.3.RELEASE.jar 294 | │ │ spring-jcl-5.1.3.RELEASE.jar 295 | │ │ spring-jdbc-5.1.3.RELEASE.jar 296 | │ │ spring-tx-5.1.3.RELEASE.jar 297 | │ │ spring-web-5.1.3.RELEASE.jar 298 | │ │ spring-webmvc-5.1.3.RELEASE.jar 299 | │ │ validation-api-1.1.0.Final.jar 300 | │ │ 301 | │ └─views 302 | │ show.jsp 303 | │ 304 | ├─surefire-reports 305 | │ com.wantao.test.DaoTest.txt 306 | │ com.wantao.test.EmployeeControllerTest.txt 307 | │ com.wantao.test.MGBTest.txt 308 | │ TEST-com.wantao.test.DaoTest.xml 309 | │ TEST-com.wantao.test.EmployeeControllerTest.xml 310 | │ TEST-com.wantao.test.MGBTest.xml 311 | │ 312 | └─test-classes 313 | └─com 314 | └─wantao 315 | └─test 316 | DaoTest.class 317 | DaoTest2.class 318 | EmployeeControllerTest.class 319 | MGBTest.class 320 | 321 | --------------------------------------------------------------------------------