├── README.md
├── SSM
├── .classpath
├── .mymetadata
├── .project
├── .settings
│ ├── .jsdtscope
│ ├── org.eclipse.jdt.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
├── WebRoot
│ ├── META-INF
│ │ └── MANIFEST.MF
│ ├── WEB-INF
│ │ ├── classes
│ │ │ ├── com
│ │ │ │ └── ssm
│ │ │ │ │ ├── controller
│ │ │ │ │ └── UserController.class
│ │ │ │ │ ├── domain
│ │ │ │ │ └── User.class
│ │ │ │ │ ├── mapper
│ │ │ │ │ ├── UserMapper.class
│ │ │ │ │ └── UserMapper.xml
│ │ │ │ │ └── service
│ │ │ │ │ ├── UserService.class
│ │ │ │ │ └── impl
│ │ │ │ │ └── UserServiceImpl.class
│ │ │ ├── jdbc.properties
│ │ │ ├── log4j.properties
│ │ │ ├── mybatis
│ │ │ │ └── mybatisConfig.xml
│ │ │ └── spring
│ │ │ │ ├── applicationContext-dao.xml
│ │ │ │ ├── applicationContext-service.xml
│ │ │ │ └── springmvc.xml
│ │ ├── jsp
│ │ │ └── user.jsp
│ │ ├── lib
│ │ │ ├── aopalliance-1.0.jar
│ │ │ ├── asm-3.3.1.jar
│ │ │ ├── aspectjweaver-1.6.11.jar
│ │ │ ├── c3p0-0.9.1.jar
│ │ │ ├── cglib-2.2.2.jar
│ │ │ ├── commons-dbcp-1.2.2.jar
│ │ │ ├── commons-logging-1.1.1.jar
│ │ │ ├── commons-pool-1.3.jar
│ │ │ ├── javassist-3.17.1-GA.jar
│ │ │ ├── jstl-1.2.jar
│ │ │ ├── junit-4.9.jar
│ │ │ ├── log4j-1.2.17.jar
│ │ │ ├── log4j-api-2.0-rc1.jar
│ │ │ ├── log4j-core-2.0-rc1.jar
│ │ │ ├── mybatis-3.2.7.jar
│ │ │ ├── mybatis-spring-1.2.2.jar
│ │ │ ├── mysql-connector-java-5.1.7-bin.jar
│ │ │ ├── slf4j-api-1.7.5.jar
│ │ │ ├── slf4j-log4j12-1.7.5.jar
│ │ │ ├── spring-aop-3.2.0.RELEASE.jar
│ │ │ ├── spring-aspects-3.2.0.RELEASE.jar
│ │ │ ├── spring-beans-3.2.0.RELEASE.jar
│ │ │ ├── spring-context-3.2.0.RELEASE.jar
│ │ │ ├── spring-context-support-3.2.0.RELEASE.jar
│ │ │ ├── spring-core-3.2.0.RELEASE.jar
│ │ │ ├── spring-expression-3.2.0.RELEASE.jar
│ │ │ ├── spring-jdbc-3.2.0.RELEASE.jar
│ │ │ ├── spring-orm-3.2.0.RELEASE.jar
│ │ │ ├── spring-test-3.2.0.RELEASE.jar
│ │ │ ├── spring-tx-3.2.0.RELEASE.jar
│ │ │ ├── spring-web-3.2.0.RELEASE.jar
│ │ │ └── spring-webmvc-3.2.0.RELEASE.jar
│ │ └── web.xml
│ └── index.jsp
├── config
│ ├── jdbc.properties
│ ├── log4j.properties
│ ├── mybatis
│ │ └── mybatisConfig.xml
│ ├── spring
│ │ ├── applicationContext-dao.xml
│ │ ├── applicationContext-service.xml
│ │ └── springmvc.xml
│ └── ssmbase.sql
└── src
│ └── com
│ └── ssm
│ ├── controller
│ └── UserController.java
│ ├── domain
│ └── User.java
│ ├── mapper
│ ├── UserMapper.java
│ └── UserMapper.xml
│ └── service
│ ├── UserService.java
│ └── impl
│ └── UserServiceImpl.java
├── SSM框架.pptx
└── SpringMybatis
├── .classpath
├── .mymetadata
├── .project
├── .settings
├── .jsdtscope
├── org.eclipse.jdt.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
├── WebRoot
├── META-INF
│ └── MANIFEST.MF
├── WEB-INF
│ ├── classes
│ │ ├── CustomValidationMessages.properties
│ │ ├── com
│ │ │ └── ssm
│ │ │ │ ├── controller
│ │ │ │ ├── Items4Json.class
│ │ │ │ ├── ItemsController.class
│ │ │ │ ├── ItemsRestFul.class
│ │ │ │ └── conversion
│ │ │ │ │ └── ConversionService.class
│ │ │ │ ├── domain
│ │ │ │ ├── Items.class
│ │ │ │ ├── ItemsCustom.class
│ │ │ │ ├── ItemsCustomVo.class
│ │ │ │ ├── ItemsExample$Criteria.class
│ │ │ │ ├── ItemsExample$Criterion.class
│ │ │ │ ├── ItemsExample$GeneratedCriteria.class
│ │ │ │ ├── ItemsExample.class
│ │ │ │ ├── Orderdetail.class
│ │ │ │ ├── OrderdetailExample$Criteria.class
│ │ │ │ ├── OrderdetailExample$Criterion.class
│ │ │ │ ├── OrderdetailExample$GeneratedCriteria.class
│ │ │ │ ├── OrderdetailExample.class
│ │ │ │ ├── Orders.class
│ │ │ │ ├── OrdersExample$Criteria.class
│ │ │ │ ├── OrdersExample$Criterion.class
│ │ │ │ ├── OrdersExample$GeneratedCriteria.class
│ │ │ │ ├── OrdersExample.class
│ │ │ │ ├── User.class
│ │ │ │ ├── UserExample$Criteria.class
│ │ │ │ ├── UserExample$Criterion.class
│ │ │ │ ├── UserExample$GeneratedCriteria.class
│ │ │ │ ├── UserExample.class
│ │ │ │ └── group4valitation
│ │ │ │ │ └── ValitationGroup.class
│ │ │ │ ├── exception
│ │ │ │ ├── CustomException.class
│ │ │ │ └── CustomExceptionResolver.class
│ │ │ │ ├── interceptor
│ │ │ │ ├── HandlerInterceptor1.class
│ │ │ │ └── HandlerInterceptor2.class
│ │ │ │ ├── mapper
│ │ │ │ ├── ItemsMapper.class
│ │ │ │ ├── ItemsMapper.xml
│ │ │ │ ├── ItemsMapperCustom.class
│ │ │ │ ├── ItemsMapperCustom.xml
│ │ │ │ ├── OrderdetailMapper.class
│ │ │ │ ├── OrderdetailMapper.xml
│ │ │ │ ├── OrdersMapper.class
│ │ │ │ ├── OrdersMapper.xml
│ │ │ │ ├── UserMapper.class
│ │ │ │ └── UserMapper.xml
│ │ │ │ ├── service
│ │ │ │ ├── ItemsService.class
│ │ │ │ └── impl
│ │ │ │ │ └── ItemsServiceImpl.class
│ │ │ │ └── test
│ │ │ │ └── ItemsTest.class
│ │ ├── jdbc.properties
│ │ ├── log4j.properties
│ │ ├── mybatis
│ │ │ └── mybatisConfig.xml
│ │ └── spring
│ │ │ ├── applicationContext-dao.xml
│ │ │ ├── applicationContext-service.xml
│ │ │ ├── applicationContext-transaction.xml
│ │ │ └── springmvc.xml
│ ├── jsp
│ │ ├── error.jsp
│ │ └── items
│ │ │ ├── editUI.jsp
│ │ │ └── itemsList.jsp
│ ├── lib
│ │ ├── aopalliance-1.0.jar
│ │ ├── asm-3.3.1.jar
│ │ ├── aspectjweaver-1.6.11.jar
│ │ ├── c3p0-0.9.1.jar
│ │ ├── cglib-2.2.2.jar
│ │ ├── commons-dbcp-1.2.2.jar
│ │ ├── commons-fileupload-1.2.2.jar
│ │ ├── commons-io-2.4.jar
│ │ ├── commons-logging-1.1.1.jar
│ │ ├── commons-pool-1.3.jar
│ │ ├── hibernate-validator-4.3.0.Final.jar
│ │ ├── jackson-core-asl-1.9.11.jar
│ │ ├── jackson-mapper-asl-1.9.11.jar
│ │ ├── javassist-3.17.1-GA.jar
│ │ ├── jboss-logging-3.1.0.CR2.jar
│ │ ├── jstl-1.2.jar
│ │ ├── junit-4.9.jar
│ │ ├── log4j-1.2.17.jar
│ │ ├── log4j-api-2.0-rc1.jar
│ │ ├── log4j-core-2.0-rc1.jar
│ │ ├── mybatis-3.2.7.jar
│ │ ├── mybatis-spring-1.2.2.jar
│ │ ├── mysql-connector-java-5.1.7-bin.jar
│ │ ├── slf4j-api-1.7.5.jar
│ │ ├── slf4j-log4j12-1.7.5.jar
│ │ ├── spring-aop-3.2.0.RELEASE.jar
│ │ ├── spring-aspects-3.2.0.RELEASE.jar
│ │ ├── spring-beans-3.2.0.RELEASE.jar
│ │ ├── spring-context-3.2.0.RELEASE.jar
│ │ ├── spring-context-support-3.2.0.RELEASE.jar
│ │ ├── spring-core-3.2.0.RELEASE.jar
│ │ ├── spring-expression-3.2.0.RELEASE.jar
│ │ ├── spring-jdbc-3.2.0.RELEASE.jar
│ │ ├── spring-orm-3.2.0.RELEASE.jar
│ │ ├── spring-test-3.2.0.RELEASE.jar
│ │ ├── spring-tx-3.2.0.RELEASE.jar
│ │ ├── spring-web-3.2.0.RELEASE.jar
│ │ ├── spring-webmvc-3.2.0.RELEASE.jar
│ │ └── validation-api-1.0.0.GA.jar
│ └── web.xml
├── index.jsp
└── js
│ └── jquery-1.4.4.min.js
├── config
├── CustomValidationMessages.properties
├── jdbc.properties
├── log4j.properties
├── mybatis
│ └── mybatisConfig.xml
├── mybatisbase.sql
└── spring
│ ├── applicationContext-dao.xml
│ ├── applicationContext-service.xml
│ ├── applicationContext-transaction.xml
│ └── springmvc.xml
└── src
└── com
└── ssm
├── controller
├── Items4Json.java
├── ItemsController.java
├── ItemsRestFul.java
└── conversion
│ └── ConversionService.java
├── domain
├── Items.java
├── ItemsCustom.java
├── ItemsCustomVo.java
├── ItemsExample.java
├── Orderdetail.java
├── OrderdetailExample.java
├── Orders.java
├── OrdersExample.java
├── User.java
├── UserExample.java
└── group4valitation
│ └── ValitationGroup.java
├── exception
├── CustomException.java
└── CustomExceptionResolver.java
├── interceptor
├── HandlerInterceptor1.java
└── HandlerInterceptor2.java
├── mapper
├── ItemsMapper.java
├── ItemsMapper.xml
├── ItemsMapperCustom.java
├── ItemsMapperCustom.xml
├── OrderdetailMapper.java
├── OrderdetailMapper.xml
├── OrdersMapper.java
├── OrdersMapper.xml
├── UserMapper.java
└── UserMapper.xml
├── service
├── ItemsService.java
└── impl
│ └── ItemsServiceImpl.java
└── test
└── ItemsTest.java
/README.md:
--------------------------------------------------------------------------------
1 | # SpringMVC_Spring_Mybatis
2 | SpringMVC、Spring、Mybatis整合开发,包含了PPT进行讲解和实例展示如何进行整合开发,快速上手SSM框架,能进行一般的业务逻辑的开发,希望此项目可以帮助你进行学习
3 |
--------------------------------------------------------------------------------
/SSM/.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 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
--------------------------------------------------------------------------------
/SSM/.mymetadata:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/SSM/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | SSM
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.common.project.facet.core.builder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.jsdt.core.javascriptValidator
15 |
16 |
17 |
18 |
19 | com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder
20 |
21 |
22 |
23 |
24 | org.eclipse.jdt.core.javabuilder
25 |
26 |
27 |
28 |
29 | com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator
30 |
31 |
32 |
33 |
34 | com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator
35 |
36 |
37 |
38 |
39 | org.eclipse.wst.validation.validationbuilder
40 |
41 |
42 |
43 |
44 | com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder
45 |
46 |
47 |
48 |
49 |
50 | com.genuitec.eclipse.ast.deploy.core.deploymentnature
51 | org.eclipse.jem.workbench.JavaEMFNature
52 | com.genuitec.eclipse.j2eedt.core.webnature
53 | org.eclipse.jdt.core.javanature
54 | org.eclipse.wst.jsdt.core.jsNature
55 | org.eclipse.wst.common.project.facet.core.nature
56 | org.eclipse.wst.common.modulecore.ModuleCoreNature
57 |
58 |
59 |
--------------------------------------------------------------------------------
/SSM/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/SSM/.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.targetPlatform=1.6
4 | org.eclipse.jdt.core.compiler.compliance=1.6
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.6
8 |
--------------------------------------------------------------------------------
/SSM/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SSM/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SSM/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/SSM/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/SSM/WebRoot/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/com/ssm/controller/UserController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/classes/com/ssm/controller/UserController.class
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/com/ssm/domain/User.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/classes/com/ssm/domain/User.class
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/com/ssm/mapper/UserMapper.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/classes/com/ssm/mapper/UserMapper.class
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/com/ssm/mapper/UserMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/com/ssm/service/UserService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/classes/com/ssm/service/UserService.class
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/com/ssm/service/impl/UserServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/classes/com/ssm/service/impl/UserServiceImpl.class
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/jdbc.properties:
--------------------------------------------------------------------------------
1 | jdbc.driver=com.mysql.jdbc.Driver
2 | jdbc.url=jdbc\:mysql\:///ssm_test?useUnicode\=true&characterEncoding\=UTF-8
3 | jdbc.username=root
4 | jdbc.password=root
5 |
6 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/log4j.properties:
--------------------------------------------------------------------------------
1 | # Global logging configuration
2 | #\u5728\u5f00\u53d1\u73af\u5883\u4e0b\u65e5\u5fd7\u7ea7\u522b\u8981\u8bbe\u7f6e\u6210DEBUG\uff0c\u751f\u4ea7\u73af\u5883\u8bbe\u7f6e\u6210info\u6216error
3 | log4j.rootLogger=DEBUG , stdout
4 | # Console output...
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
8 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/mybatis/mybatisConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/spring/applicationContext-dao.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/spring/applicationContext-service.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/classes/spring/springmvc.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/jsp/user.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
3 | <%
4 | String path = request.getContextPath();
5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
6 | %>
7 |
8 |
9 |
10 |
11 |
12 |
13 | user.jsp
14 |
15 |
16 |
17 |
18 |
19 |
20 |
23 |
24 |
25 |
26 |
27 | This is my JSP page.
28 |
29 |
30 |
31 | id:${user.userId}
32 |
33 | name:${user.userName}
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/aopalliance-1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/aopalliance-1.0.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/asm-3.3.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/asm-3.3.1.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/aspectjweaver-1.6.11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/aspectjweaver-1.6.11.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/c3p0-0.9.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/c3p0-0.9.1.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/cglib-2.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/cglib-2.2.2.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/commons-dbcp-1.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/commons-dbcp-1.2.2.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/commons-pool-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/commons-pool-1.3.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/javassist-3.17.1-GA.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/javassist-3.17.1-GA.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/jstl-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/jstl-1.2.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/junit-4.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/junit-4.9.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/log4j-1.2.17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/log4j-1.2.17.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/log4j-api-2.0-rc1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/log4j-api-2.0-rc1.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/log4j-core-2.0-rc1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/log4j-core-2.0-rc1.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/mybatis-3.2.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/mybatis-3.2.7.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/mybatis-spring-1.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/mybatis-spring-1.2.2.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/slf4j-api-1.7.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/slf4j-api-1.7.5.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/slf4j-log4j12-1.7.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/slf4j-log4j12-1.7.5.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM/WebRoot/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SSM/WebRoot/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | contextConfigLocation
10 | classpath:spring/application*.xml
11 |
12 |
13 | org.springframework.web.context.ContextLoaderListener
14 |
15 |
16 |
17 | index.jsp
18 |
19 |
20 |
21 | springmvc
22 | org.springframework.web.servlet.DispatcherServlet
23 |
24 | contextConfigLocation
25 | classpath:spring/springmvc.xml
26 |
27 |
28 |
29 | springmvc
30 | *.action
31 |
32 |
33 | index.jsp
34 |
35 |
36 |
--------------------------------------------------------------------------------
/SSM/WebRoot/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
2 | <%
3 | String path = request.getContextPath();
4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
5 | %>
6 |
7 |
8 |
9 |
10 |
11 |
12 | My JSP 'index.jsp' starting page
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 | This is my JSP page.
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SSM/config/jdbc.properties:
--------------------------------------------------------------------------------
1 | jdbc.driver=com.mysql.jdbc.Driver
2 | jdbc.url=jdbc\:mysql\:///ssm_test?useUnicode\=true&characterEncoding\=UTF-8
3 | jdbc.username=root
4 | jdbc.password=root
5 |
6 |
--------------------------------------------------------------------------------
/SSM/config/log4j.properties:
--------------------------------------------------------------------------------
1 | # Global logging configuration
2 | #\u5728\u5f00\u53d1\u73af\u5883\u4e0b\u65e5\u5fd7\u7ea7\u522b\u8981\u8bbe\u7f6e\u6210DEBUG\uff0c\u751f\u4ea7\u73af\u5883\u8bbe\u7f6e\u6210info\u6216error
3 | log4j.rootLogger=DEBUG , stdout
4 | # Console output...
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
8 |
--------------------------------------------------------------------------------
/SSM/config/mybatis/mybatisConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/SSM/config/spring/applicationContext-dao.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/SSM/config/spring/applicationContext-service.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/SSM/config/spring/springmvc.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SSM/config/ssmbase.sql:
--------------------------------------------------------------------------------
1 | /*
2 | SQLyog Ultimate v11.24 (32 bit)
3 | MySQL - 5.6.27-log : Database - ssm_test
4 | *********************************************************************
5 | */
6 |
7 | /*!40101 SET NAMES utf8 */;
8 |
9 | /*!40101 SET SQL_MODE=''*/;
10 |
11 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
12 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
13 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
14 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
15 | CREATE DATABASE /*!32312 IF NOT EXISTS*/`ssm_test` /*!40100 DEFAULT CHARACTER SET utf8 */;
16 |
17 | USE `ssm_test`;
18 |
19 | /*Table structure for table `user` */
20 |
21 | DROP TABLE IF EXISTS `user`;
22 |
23 | CREATE TABLE `user` (
24 | `userId` bigint(20) NOT NULL AUTO_INCREMENT,
25 | `userName` varchar(20) DEFAULT NULL,
26 | PRIMARY KEY (`userId`)
27 | ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
28 |
29 | /*Data for the table `user` */
30 |
31 | insert into `user`(`userId`,`userName`) values (1,'test'),(2,'测试');
32 |
33 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
34 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
35 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
36 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
37 |
--------------------------------------------------------------------------------
/SSM/src/com/ssm/controller/UserController.java:
--------------------------------------------------------------------------------
1 | package com.ssm.controller;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 | import org.springframework.stereotype.Controller;
7 | import org.springframework.web.bind.annotation.RequestMapping;
8 | import org.springframework.web.servlet.ModelAndView;
9 |
10 | import com.ssm.domain.User;
11 | import com.ssm.service.UserService;
12 |
13 | @Controller
14 | public class UserController {
15 |
16 | @Autowired
17 | private UserService userService;
18 |
19 | @RequestMapping("/getUserList")
20 | public ModelAndView getUserList() {
21 | List userList = userService.getUserList();
22 |
23 | ModelAndView model = new ModelAndView();
24 | model.addObject("userList", userList);
25 | model.setViewName("user");
26 | return model;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/SSM/src/com/ssm/domain/User.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain;
2 |
3 | public class User {
4 |
5 | private Long userId;
6 |
7 | private String userName;
8 |
9 | public Long getUserId() {
10 | return userId;
11 | }
12 |
13 | public void setUserId(Long userId) {
14 | this.userId = userId;
15 | }
16 |
17 | public String getUserName() {
18 | return userName;
19 | }
20 |
21 | public void setUserName(String userName) {
22 | this.userName = userName;
23 | }
24 |
25 |
26 | }
27 |
--------------------------------------------------------------------------------
/SSM/src/com/ssm/mapper/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.ssm.mapper;
2 |
3 | import java.util.List;
4 |
5 | import com.ssm.domain.User;
6 |
7 | public interface UserMapper {
8 |
9 | public List getUserList();
10 | }
11 |
--------------------------------------------------------------------------------
/SSM/src/com/ssm/mapper/UserMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
8 |
--------------------------------------------------------------------------------
/SSM/src/com/ssm/service/UserService.java:
--------------------------------------------------------------------------------
1 | package com.ssm.service;
2 |
3 | import java.util.List;
4 |
5 | import com.ssm.domain.User;
6 |
7 | public interface UserService {
8 |
9 | public List getUserList();
10 | }
11 |
--------------------------------------------------------------------------------
/SSM/src/com/ssm/service/impl/UserServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.ssm.service.impl;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.factory.annotation.Autowired;
6 |
7 | import com.ssm.domain.User;
8 | import com.ssm.mapper.UserMapper;
9 | import com.ssm.service.UserService;
10 |
11 | public class UserServiceImpl implements UserService {
12 |
13 | @Autowired
14 | private UserMapper userMapper;
15 |
16 |
17 | @Override
18 | public List getUserList() {
19 |
20 | return userMapper.getUserList();
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/SSM框架.pptx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SSM框架.pptx
--------------------------------------------------------------------------------
/SpringMybatis/.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 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/SpringMybatis/.mymetadata:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/SpringMybatis/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | SpringMybatis
4 |
5 |
6 |
7 |
8 |
9 | org.eclipse.wst.common.project.facet.core.builder
10 |
11 |
12 |
13 |
14 | org.eclipse.wst.jsdt.core.javascriptValidator
15 |
16 |
17 |
18 |
19 | com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder
20 |
21 |
22 |
23 |
24 | org.eclipse.jdt.core.javabuilder
25 |
26 |
27 |
28 |
29 | com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator
30 |
31 |
32 |
33 |
34 | com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator
35 |
36 |
37 |
38 |
39 | org.eclipse.wst.validation.validationbuilder
40 |
41 |
42 |
43 |
44 | com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder
45 |
46 |
47 |
48 |
49 |
50 | com.genuitec.eclipse.ast.deploy.core.deploymentnature
51 | org.eclipse.jem.workbench.JavaEMFNature
52 | com.genuitec.eclipse.j2eedt.core.webnature
53 | org.eclipse.jdt.core.javanature
54 | org.eclipse.wst.jsdt.core.jsNature
55 | org.eclipse.wst.common.project.facet.core.nature
56 | org.eclipse.wst.common.modulecore.ModuleCoreNature
57 |
58 |
59 |
--------------------------------------------------------------------------------
/SpringMybatis/.settings/.jsdtscope:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/SpringMybatis/.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.targetPlatform=1.5
4 | org.eclipse.jdt.core.compiler.compliance=1.5
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 | org.eclipse.jdt.core.compiler.source=1.5
8 |
--------------------------------------------------------------------------------
/SpringMybatis/.settings/org.eclipse.wst.common.component:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SpringMybatis/.settings/org.eclipse.wst.common.project.facet.core.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SpringMybatis/.settings/org.eclipse.wst.jsdt.ui.superType.container:
--------------------------------------------------------------------------------
1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary
--------------------------------------------------------------------------------
/SpringMybatis/.settings/org.eclipse.wst.jsdt.ui.superType.name:
--------------------------------------------------------------------------------
1 | Window
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/META-INF/MANIFEST.MF:
--------------------------------------------------------------------------------
1 | Manifest-Version: 1.0
2 | Class-Path:
3 |
4 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/CustomValidationMessages.properties:
--------------------------------------------------------------------------------
1 | #
2 | items.name.length =\u957F\u5EA6\u57281-20\u4E2A\u5B57\u7B26\u4E4B\u95F4
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/Items4Json.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/Items4Json.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/ItemsController.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/ItemsController.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/ItemsRestFul.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/ItemsRestFul.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/conversion/ConversionService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/controller/conversion/ConversionService.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/Items.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/Items.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsCustom.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsCustom.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsCustomVo.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsCustomVo.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample$Criteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample$Criteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample$Criterion.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample$Criterion.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample$GeneratedCriteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample$GeneratedCriteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/ItemsExample.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/Orderdetail.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/Orderdetail.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample$Criteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample$Criteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample$Criterion.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample$Criterion.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample$GeneratedCriteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample$GeneratedCriteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrderdetailExample.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/Orders.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/Orders.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample$Criteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample$Criteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample$Criterion.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample$Criterion.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample$GeneratedCriteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample$GeneratedCriteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/OrdersExample.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/User.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/User.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample$Criteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample$Criteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample$Criterion.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample$Criterion.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample$GeneratedCriteria.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample$GeneratedCriteria.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/UserExample.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/group4valitation/ValitationGroup.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/domain/group4valitation/ValitationGroup.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/exception/CustomException.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/exception/CustomException.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/exception/CustomExceptionResolver.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/exception/CustomExceptionResolver.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/interceptor/HandlerInterceptor1.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/interceptor/HandlerInterceptor1.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/interceptor/HandlerInterceptor2.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/interceptor/HandlerInterceptor2.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/ItemsMapper.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/ItemsMapper.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/ItemsMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | and ${criterion.condition}
23 |
24 |
25 | and ${criterion.condition} #{criterion.value}
26 |
27 |
28 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29 |
30 |
31 | and ${criterion.condition}
32 |
33 | #{listItem}
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | and ${criterion.condition}
52 |
53 |
54 | and ${criterion.condition} #{criterion.value}
55 |
56 |
57 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
58 |
59 |
60 | and ${criterion.condition}
61 |
62 | #{listItem}
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | id, name, price, pic, createtime
74 |
75 |
76 | detail
77 |
78 |
94 |
108 |
116 |
117 | delete from items
118 | where id = #{id,jdbcType=INTEGER}
119 |
120 |
121 | delete from items
122 |
123 |
124 |
125 |
126 |
127 | insert into items (id, name, price,
128 | pic, createtime, detail
129 | )
130 | values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{price,jdbcType=REAL},
131 | #{pic,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{detail,jdbcType=LONGVARCHAR}
132 | )
133 |
134 |
135 | insert into items
136 |
137 |
138 | id,
139 |
140 |
141 | name,
142 |
143 |
144 | price,
145 |
146 |
147 | pic,
148 |
149 |
150 | createtime,
151 |
152 |
153 | detail,
154 |
155 |
156 |
157 |
158 | #{id,jdbcType=INTEGER},
159 |
160 |
161 | #{name,jdbcType=VARCHAR},
162 |
163 |
164 | #{price,jdbcType=REAL},
165 |
166 |
167 | #{pic,jdbcType=VARCHAR},
168 |
169 |
170 | #{createtime,jdbcType=TIMESTAMP},
171 |
172 |
173 | #{detail,jdbcType=LONGVARCHAR},
174 |
175 |
176 |
177 |
183 |
184 | update items
185 |
186 |
187 | id = #{record.id,jdbcType=INTEGER},
188 |
189 |
190 | name = #{record.name,jdbcType=VARCHAR},
191 |
192 |
193 | price = #{record.price,jdbcType=REAL},
194 |
195 |
196 | pic = #{record.pic,jdbcType=VARCHAR},
197 |
198 |
199 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
200 |
201 |
202 | detail = #{record.detail,jdbcType=LONGVARCHAR},
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 | update items
211 | set id = #{record.id,jdbcType=INTEGER},
212 | name = #{record.name,jdbcType=VARCHAR},
213 | price = #{record.price,jdbcType=REAL},
214 | pic = #{record.pic,jdbcType=VARCHAR},
215 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
216 | detail = #{record.detail,jdbcType=LONGVARCHAR}
217 |
218 |
219 |
220 |
221 |
222 | update items
223 | set id = #{record.id,jdbcType=INTEGER},
224 | name = #{record.name,jdbcType=VARCHAR},
225 | price = #{record.price,jdbcType=REAL},
226 | pic = #{record.pic,jdbcType=VARCHAR},
227 | createtime = #{record.createtime,jdbcType=TIMESTAMP}
228 |
229 |
230 |
231 |
232 |
233 | update items
234 |
235 |
236 | name = #{name,jdbcType=VARCHAR},
237 |
238 |
239 | price = #{price,jdbcType=REAL},
240 |
241 |
242 | pic = #{pic,jdbcType=VARCHAR},
243 |
244 |
245 | createtime = #{createtime,jdbcType=TIMESTAMP},
246 |
247 |
248 | detail = #{detail,jdbcType=LONGVARCHAR},
249 |
250 |
251 | where id = #{id,jdbcType=INTEGER}
252 |
253 |
254 | update items
255 | set name = #{name,jdbcType=VARCHAR},
256 | price = #{price,jdbcType=REAL},
257 | pic = #{pic,jdbcType=VARCHAR},
258 | createtime = #{createtime,jdbcType=TIMESTAMP},
259 | detail = #{detail,jdbcType=LONGVARCHAR}
260 | where id = #{id,jdbcType=INTEGER}
261 |
262 |
263 | update items
264 | set name = #{name,jdbcType=VARCHAR},
265 | price = #{price,jdbcType=REAL},
266 | pic = #{pic,jdbcType=VARCHAR},
267 | createtime = #{createtime,jdbcType=TIMESTAMP}
268 | where id = #{id,jdbcType=INTEGER}
269 |
270 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/ItemsMapperCustom.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/ItemsMapperCustom.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/ItemsMapperCustom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | items.name like '%${itemsCustomVo.name}%'
9 |
10 |
11 |
12 |
13 |
14 |
20 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/OrderdetailMapper.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/OrderdetailMapper.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/OrderdetailMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | and ${criterion.condition}
19 |
20 |
21 | and ${criterion.condition} #{criterion.value}
22 |
23 |
24 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
25 |
26 |
27 | and ${criterion.condition}
28 |
29 | #{listItem}
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | and ${criterion.condition}
48 |
49 |
50 | and ${criterion.condition} #{criterion.value}
51 |
52 |
53 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
54 |
55 |
56 | and ${criterion.condition}
57 |
58 | #{listItem}
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | id, orders_id, items_id, items_num
70 |
71 |
85 |
91 |
92 | delete from orderdetail
93 | where id = #{id,jdbcType=INTEGER}
94 |
95 |
96 | delete from orderdetail
97 |
98 |
99 |
100 |
101 |
102 | insert into orderdetail (id, orders_id, items_id,
103 | items_num)
104 | values (#{id,jdbcType=INTEGER}, #{ordersId,jdbcType=INTEGER}, #{itemsId,jdbcType=INTEGER},
105 | #{itemsNum,jdbcType=INTEGER})
106 |
107 |
108 | insert into orderdetail
109 |
110 |
111 | id,
112 |
113 |
114 | orders_id,
115 |
116 |
117 | items_id,
118 |
119 |
120 | items_num,
121 |
122 |
123 |
124 |
125 | #{id,jdbcType=INTEGER},
126 |
127 |
128 | #{ordersId,jdbcType=INTEGER},
129 |
130 |
131 | #{itemsId,jdbcType=INTEGER},
132 |
133 |
134 | #{itemsNum,jdbcType=INTEGER},
135 |
136 |
137 |
138 |
144 |
145 | update orderdetail
146 |
147 |
148 | id = #{record.id,jdbcType=INTEGER},
149 |
150 |
151 | orders_id = #{record.ordersId,jdbcType=INTEGER},
152 |
153 |
154 | items_id = #{record.itemsId,jdbcType=INTEGER},
155 |
156 |
157 | items_num = #{record.itemsNum,jdbcType=INTEGER},
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | update orderdetail
166 | set id = #{record.id,jdbcType=INTEGER},
167 | orders_id = #{record.ordersId,jdbcType=INTEGER},
168 | items_id = #{record.itemsId,jdbcType=INTEGER},
169 | items_num = #{record.itemsNum,jdbcType=INTEGER}
170 |
171 |
172 |
173 |
174 |
175 | update orderdetail
176 |
177 |
178 | orders_id = #{ordersId,jdbcType=INTEGER},
179 |
180 |
181 | items_id = #{itemsId,jdbcType=INTEGER},
182 |
183 |
184 | items_num = #{itemsNum,jdbcType=INTEGER},
185 |
186 |
187 | where id = #{id,jdbcType=INTEGER}
188 |
189 |
190 | update orderdetail
191 | set orders_id = #{ordersId,jdbcType=INTEGER},
192 | items_id = #{itemsId,jdbcType=INTEGER},
193 | items_num = #{itemsNum,jdbcType=INTEGER}
194 | where id = #{id,jdbcType=INTEGER}
195 |
196 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/OrdersMapper.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/OrdersMapper.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/OrdersMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | and ${criterion.condition}
20 |
21 |
22 | and ${criterion.condition} #{criterion.value}
23 |
24 |
25 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26 |
27 |
28 | and ${criterion.condition}
29 |
30 | #{listItem}
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | and ${criterion.condition}
49 |
50 |
51 | and ${criterion.condition} #{criterion.value}
52 |
53 |
54 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
55 |
56 |
57 | and ${criterion.condition}
58 |
59 | #{listItem}
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | id, user_id, number, createtime, note
71 |
72 |
86 |
92 |
93 | delete from orders
94 | where id = #{id,jdbcType=INTEGER}
95 |
96 |
97 | delete from orders
98 |
99 |
100 |
101 |
102 |
103 | insert into orders (id, user_id, number,
104 | createtime, note)
105 | values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{number,jdbcType=VARCHAR},
106 | #{createtime,jdbcType=TIMESTAMP}, #{note,jdbcType=VARCHAR})
107 |
108 |
109 | insert into orders
110 |
111 |
112 | id,
113 |
114 |
115 | user_id,
116 |
117 |
118 | number,
119 |
120 |
121 | createtime,
122 |
123 |
124 | note,
125 |
126 |
127 |
128 |
129 | #{id,jdbcType=INTEGER},
130 |
131 |
132 | #{userId,jdbcType=INTEGER},
133 |
134 |
135 | #{number,jdbcType=VARCHAR},
136 |
137 |
138 | #{createtime,jdbcType=TIMESTAMP},
139 |
140 |
141 | #{note,jdbcType=VARCHAR},
142 |
143 |
144 |
145 |
151 |
152 | update orders
153 |
154 |
155 | id = #{record.id,jdbcType=INTEGER},
156 |
157 |
158 | user_id = #{record.userId,jdbcType=INTEGER},
159 |
160 |
161 | number = #{record.number,jdbcType=VARCHAR},
162 |
163 |
164 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
165 |
166 |
167 | note = #{record.note,jdbcType=VARCHAR},
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 | update orders
176 | set id = #{record.id,jdbcType=INTEGER},
177 | user_id = #{record.userId,jdbcType=INTEGER},
178 | number = #{record.number,jdbcType=VARCHAR},
179 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
180 | note = #{record.note,jdbcType=VARCHAR}
181 |
182 |
183 |
184 |
185 |
186 | update orders
187 |
188 |
189 | user_id = #{userId,jdbcType=INTEGER},
190 |
191 |
192 | number = #{number,jdbcType=VARCHAR},
193 |
194 |
195 | createtime = #{createtime,jdbcType=TIMESTAMP},
196 |
197 |
198 | note = #{note,jdbcType=VARCHAR},
199 |
200 |
201 | where id = #{id,jdbcType=INTEGER}
202 |
203 |
204 | update orders
205 | set user_id = #{userId,jdbcType=INTEGER},
206 | number = #{number,jdbcType=VARCHAR},
207 | createtime = #{createtime,jdbcType=TIMESTAMP},
208 | note = #{note,jdbcType=VARCHAR}
209 | where id = #{id,jdbcType=INTEGER}
210 |
211 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/UserMapper.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/UserMapper.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/mapper/UserMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | and ${criterion.condition}
20 |
21 |
22 | and ${criterion.condition} #{criterion.value}
23 |
24 |
25 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26 |
27 |
28 | and ${criterion.condition}
29 |
30 | #{listItem}
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | and ${criterion.condition}
49 |
50 |
51 | and ${criterion.condition} #{criterion.value}
52 |
53 |
54 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
55 |
56 |
57 | and ${criterion.condition}
58 |
59 | #{listItem}
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | id, username, birthday, sex, address
71 |
72 |
86 |
92 |
93 | delete from user
94 | where id = #{id,jdbcType=INTEGER}
95 |
96 |
97 | delete from user
98 |
99 |
100 |
101 |
102 |
103 | insert into user (id, username, birthday,
104 | sex, address)
105 | values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE},
106 | #{sex,jdbcType=CHAR}, #{address,jdbcType=VARCHAR})
107 |
108 |
109 | insert into user
110 |
111 |
112 | id,
113 |
114 |
115 | username,
116 |
117 |
118 | birthday,
119 |
120 |
121 | sex,
122 |
123 |
124 | address,
125 |
126 |
127 |
128 |
129 | #{id,jdbcType=INTEGER},
130 |
131 |
132 | #{username,jdbcType=VARCHAR},
133 |
134 |
135 | #{birthday,jdbcType=DATE},
136 |
137 |
138 | #{sex,jdbcType=CHAR},
139 |
140 |
141 | #{address,jdbcType=VARCHAR},
142 |
143 |
144 |
145 |
151 |
152 | update user
153 |
154 |
155 | id = #{record.id,jdbcType=INTEGER},
156 |
157 |
158 | username = #{record.username,jdbcType=VARCHAR},
159 |
160 |
161 | birthday = #{record.birthday,jdbcType=DATE},
162 |
163 |
164 | sex = #{record.sex,jdbcType=CHAR},
165 |
166 |
167 | address = #{record.address,jdbcType=VARCHAR},
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 | update user
176 | set id = #{record.id,jdbcType=INTEGER},
177 | username = #{record.username,jdbcType=VARCHAR},
178 | birthday = #{record.birthday,jdbcType=DATE},
179 | sex = #{record.sex,jdbcType=CHAR},
180 | address = #{record.address,jdbcType=VARCHAR}
181 |
182 |
183 |
184 |
185 |
186 | update user
187 |
188 |
189 | username = #{username,jdbcType=VARCHAR},
190 |
191 |
192 | birthday = #{birthday,jdbcType=DATE},
193 |
194 |
195 | sex = #{sex,jdbcType=CHAR},
196 |
197 |
198 | address = #{address,jdbcType=VARCHAR},
199 |
200 |
201 | where id = #{id,jdbcType=INTEGER}
202 |
203 |
204 | update user
205 | set username = #{username,jdbcType=VARCHAR},
206 | birthday = #{birthday,jdbcType=DATE},
207 | sex = #{sex,jdbcType=CHAR},
208 | address = #{address,jdbcType=VARCHAR}
209 | where id = #{id,jdbcType=INTEGER}
210 |
211 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/service/ItemsService.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/service/ItemsService.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/service/impl/ItemsServiceImpl.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/service/impl/ItemsServiceImpl.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/test/ItemsTest.class:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/classes/com/ssm/test/ItemsTest.class
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/jdbc.properties:
--------------------------------------------------------------------------------
1 | jdbc.driver=com.mysql.jdbc.Driver
2 | jdbc.url=jdbc\:mysql\://localhost\:3306/mybatisbase?useUnicode\=true&characterEncoding\=UTF-8
3 | jdbc.username=root
4 | jdbc.password=root
5 |
6 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/log4j.properties:
--------------------------------------------------------------------------------
1 | # Global logging configuration
2 | #\u5728\u5f00\u53d1\u73af\u5883\u4e0b\u65e5\u5fd7\u7ea7\u522b\u8981\u8bbe\u7f6e\u6210DEBUG\uff0c\u751f\u4ea7\u73af\u5883\u8bbe\u7f6e\u6210info\u6216error
3 | log4j.rootLogger=DEBUG, stdout
4 | # Console output...
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
8 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/mybatis/mybatisConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/spring/applicationContext-dao.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/spring/applicationContext-service.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/spring/applicationContext-transaction.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/classes/spring/springmvc.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 5242880
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
66 |
67 |
68 |
69 | classpath:CustomValidationMessages
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/jsp/error.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
2 | <%
3 | String path = request.getContextPath();
4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
5 | %>
6 |
7 |
8 |
9 |
10 |
11 |
12 | error
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 | error.
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/jsp/items/editUI.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 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
5 |
6 |
7 |
8 |
9 | 修改商品信息
10 |
11 |
12 |
13 |
14 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/jsp/items/itemsList.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 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
5 |
6 |
7 |
8 |
9 | 查询商品列表
10 |
11 |
12 |
46 |
47 |
48 |
49 |
50 |
51 | ${error.defaultMessage}
52 |
53 |
54 |
55 |
56 |
57 |
91 |
92 |
93 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/aopalliance-1.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/aopalliance-1.0.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/asm-3.3.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/asm-3.3.1.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/aspectjweaver-1.6.11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/aspectjweaver-1.6.11.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/c3p0-0.9.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/c3p0-0.9.1.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/cglib-2.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/cglib-2.2.2.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/commons-dbcp-1.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/commons-dbcp-1.2.2.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/commons-fileupload-1.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/commons-fileupload-1.2.2.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/commons-io-2.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/commons-io-2.4.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/commons-pool-1.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/commons-pool-1.3.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/hibernate-validator-4.3.0.Final.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/hibernate-validator-4.3.0.Final.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/jackson-core-asl-1.9.11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/jackson-core-asl-1.9.11.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/jackson-mapper-asl-1.9.11.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/jackson-mapper-asl-1.9.11.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/javassist-3.17.1-GA.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/javassist-3.17.1-GA.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/jstl-1.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/jstl-1.2.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/junit-4.9.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/junit-4.9.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/log4j-1.2.17.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/log4j-1.2.17.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/log4j-api-2.0-rc1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/log4j-api-2.0-rc1.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/log4j-core-2.0-rc1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/log4j-core-2.0-rc1.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/mybatis-3.2.7.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/mybatis-3.2.7.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/mybatis-spring-1.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/mybatis-spring-1.2.2.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/slf4j-api-1.7.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/slf4j-api-1.7.5.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/slf4j-log4j12-1.7.5.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/slf4j-log4j12-1.7.5.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/lib/validation-api-1.0.0.GA.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wangyang135/SpringMVC_Spring_Mybatis/daaa7bafd6a387a153db8ae9dcd996aa737c455d/SpringMybatis/WebRoot/WEB-INF/lib/validation-api-1.0.0.GA.jar
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/WEB-INF/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
6 | ssm
7 |
8 |
9 | springmvc_rest
10 | org.springframework.web.servlet.DispatcherServlet
11 |
12 | contextConfigLocation
13 | classpath:spring/springmvc.xml
14 |
15 |
16 |
17 | springmvc_rest
18 | /
19 |
20 |
21 |
22 | CharacterEncodingFilter
23 | org.springframework.web.filter.CharacterEncodingFilter
24 |
25 | encoding
26 | utf-8
27 |
28 |
29 |
30 | CharacterEncodingFilter
31 | /*
32 |
33 |
34 |
35 |
36 | contextConfigLocation
37 | classpath:spring/application*.xml
38 |
39 |
40 | org.springframework.web.context.ContextLoaderListener
41 |
42 |
43 |
44 | index.jsp
45 |
46 |
47 |
48 | springmvc
49 | org.springframework.web.servlet.DispatcherServlet
50 |
51 | contextConfigLocation
52 | classpath:spring/springmvc.xml
53 |
54 |
55 |
56 | springmvc
57 | *.action
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/SpringMybatis/WebRoot/index.jsp:
--------------------------------------------------------------------------------
1 | <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
2 | <%
3 | String path = request.getContextPath();
4 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
5 | %>
6 |
7 |
8 |
9 |
10 |
11 |
12 | My JSP 'index.jsp' starting page
13 |
14 |
15 |
16 |
17 |
18 |
21 |
22 |
23 |
24 | This is my JSP page.
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SpringMybatis/config/CustomValidationMessages.properties:
--------------------------------------------------------------------------------
1 | #
2 | items.name.length =\u957F\u5EA6\u57281-20\u4E2A\u5B57\u7B26\u4E4B\u95F4
--------------------------------------------------------------------------------
/SpringMybatis/config/jdbc.properties:
--------------------------------------------------------------------------------
1 | jdbc.driver=com.mysql.jdbc.Driver
2 | jdbc.url=jdbc\:mysql\://localhost\:3306/mybatisbase?useUnicode\=true&characterEncoding\=UTF-8
3 | jdbc.username=root
4 | jdbc.password=root
5 |
6 |
--------------------------------------------------------------------------------
/SpringMybatis/config/log4j.properties:
--------------------------------------------------------------------------------
1 | # Global logging configuration
2 | #\u5728\u5f00\u53d1\u73af\u5883\u4e0b\u65e5\u5fd7\u7ea7\u522b\u8981\u8bbe\u7f6e\u6210DEBUG\uff0c\u751f\u4ea7\u73af\u5883\u8bbe\u7f6e\u6210info\u6216error
3 | log4j.rootLogger=DEBUG, stdout
4 | # Console output...
5 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender
6 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
7 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
8 |
--------------------------------------------------------------------------------
/SpringMybatis/config/mybatis/mybatisConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/SpringMybatis/config/mybatisbase.sql:
--------------------------------------------------------------------------------
1 | /*
2 | SQLyog Ultimate v11.24 (32 bit)
3 | MySQL - 5.6.27-log : Database - mybatisbase
4 | *********************************************************************
5 | */
6 |
7 | /*!40101 SET NAMES utf8 */;
8 |
9 | /*!40101 SET SQL_MODE=''*/;
10 |
11 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
12 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
13 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
14 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
15 | CREATE DATABASE /*!32312 IF NOT EXISTS*/`mybatisbase` /*!40100 DEFAULT CHARACTER SET utf8 */;
16 |
17 | USE `mybatisbase`;
18 |
19 | /*Table structure for table `items` */
20 |
21 | DROP TABLE IF EXISTS `items`;
22 |
23 | CREATE TABLE `items` (
24 | `id` int(11) NOT NULL AUTO_INCREMENT,
25 | `name` varchar(32) NOT NULL COMMENT '商品名称',
26 | `price` float(10,1) NOT NULL COMMENT '商品定价',
27 | `detail` text COMMENT '商品描述',
28 | `pic` varchar(64) DEFAULT NULL COMMENT '商品图片',
29 | `createtime` datetime NOT NULL COMMENT '生产日期',
30 | PRIMARY KEY (`id`)
31 | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
32 |
33 | /*Data for the table `items` */
34 |
35 | insert into `items`(`id`,`name`,`price`,`detail`,`pic`,`createtime`) values (1,'被子',3000.0,'被子','c66ed4b5-8601-4251-954b-fbde75215e07.png','2003-12-03 00:00:00'),(2,'笔记本',6000.0,'笔记本性能好,质量好!!!!!',NULL,'2015-02-09 13:22:57'),(3,'背包',200.0,'名牌背包,容量大质量好!!!!',NULL,'2015-02-06 13:23:02');
36 |
37 | /*Table structure for table `orderdetail` */
38 |
39 | DROP TABLE IF EXISTS `orderdetail`;
40 |
41 | CREATE TABLE `orderdetail` (
42 | `id` int(11) NOT NULL AUTO_INCREMENT,
43 | `orders_id` int(11) NOT NULL COMMENT '订单id',
44 | `items_id` int(11) NOT NULL COMMENT '商品id',
45 | `items_num` int(11) DEFAULT NULL COMMENT '商品购买数量',
46 | PRIMARY KEY (`id`),
47 | KEY `FK_orderdetail_1` (`orders_id`),
48 | KEY `FK_orderdetail_2` (`items_id`),
49 | CONSTRAINT `FK_orderdetail_1` FOREIGN KEY (`orders_id`) REFERENCES `orders` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
50 | CONSTRAINT `FK_orderdetail_2` FOREIGN KEY (`items_id`) REFERENCES `items` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
51 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
52 |
53 | /*Data for the table `orderdetail` */
54 |
55 | insert into `orderdetail`(`id`,`orders_id`,`items_id`,`items_num`) values (1,3,1,1),(2,3,2,3),(3,4,3,4),(4,4,2,3);
56 |
57 | /*Table structure for table `orders` */
58 |
59 | DROP TABLE IF EXISTS `orders`;
60 |
61 | CREATE TABLE `orders` (
62 | `id` int(11) NOT NULL AUTO_INCREMENT,
63 | `user_id` int(11) NOT NULL COMMENT '下单用户id',
64 | `number` varchar(32) NOT NULL COMMENT '订单号',
65 | `createtime` datetime NOT NULL COMMENT '创建订单时间',
66 | `note` varchar(100) DEFAULT NULL COMMENT '备注',
67 | PRIMARY KEY (`id`),
68 | KEY `FK_orders_1` (`user_id`),
69 | CONSTRAINT `FK_orders_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
70 | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
71 |
72 | /*Data for the table `orders` */
73 |
74 | insert into `orders`(`id`,`user_id`,`number`,`createtime`,`note`) values (3,1,'1000010','2015-02-04 13:22:35',NULL),(4,1,'1000011','2015-02-03 13:22:41',NULL),(5,10,'1000012','2015-02-12 16:13:23',NULL);
75 |
76 | /*Table structure for table `user` */
77 |
78 | DROP TABLE IF EXISTS `user`;
79 |
80 | CREATE TABLE `user` (
81 | `id` int(11) NOT NULL AUTO_INCREMENT,
82 | `username` varchar(32) NOT NULL COMMENT '用户名称',
83 | `birthday` date DEFAULT NULL COMMENT '生日',
84 | `sex` char(1) DEFAULT NULL COMMENT '性别',
85 | `address` varchar(256) DEFAULT NULL COMMENT '地址',
86 | PRIMARY KEY (`id`)
87 | ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8;
88 |
89 | /*Data for the table `user` */
90 |
91 | insert into `user`(`id`,`username`,`birthday`,`sex`,`address`) values (1,'王五',NULL,'2',NULL),(10,'张三','2014-07-10','1','北京市'),(16,'张小明',NULL,'1','河南郑州'),(22,'陈小明',NULL,'1','河南郑州'),(24,'张三丰',NULL,'1','河南郑州'),(25,'陈小明',NULL,'1','河南郑州'),(26,'王五',NULL,NULL,NULL),(31,'我也','2015-11-30','1','上海'),(33,'我','2015-11-30','2','山东'),(34,'我','2015-11-30','1','上海');
92 |
93 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
94 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
95 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
96 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
97 |
--------------------------------------------------------------------------------
/SpringMybatis/config/spring/applicationContext-dao.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/SpringMybatis/config/spring/applicationContext-service.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/SpringMybatis/config/spring/applicationContext-transaction.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/SpringMybatis/config/spring/springmvc.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 | 5242880
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
66 |
67 |
68 |
69 | classpath:CustomValidationMessages
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/controller/Items4Json.java:
--------------------------------------------------------------------------------
1 | package com.ssm.controller;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.web.bind.annotation.RequestBody;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.ResponseBody;
7 |
8 | import com.ssm.domain.ItemsCustom;
9 |
10 | @Controller
11 | public class Items4Json {
12 | @RequestMapping("/requestJson")
13 | public @ResponseBody ItemsCustom requestJson(@RequestBody ItemsCustom items){
14 |
15 | return items;
16 | }
17 |
18 | @RequestMapping("/responseJson")
19 | public @ResponseBody ItemsCustom responseJson(ItemsCustom items){
20 |
21 | return items;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/controller/ItemsController.java:
--------------------------------------------------------------------------------
1 | package com.ssm.controller;
2 |
3 | import java.io.File;
4 | import java.io.IOException;
5 | import java.util.List;
6 | import java.util.Map;
7 | import java.util.Set;
8 | import java.util.UUID;
9 |
10 | import javax.servlet.http.HttpServletRequest;
11 | import org.springframework.beans.factory.annotation.Autowired;
12 | import org.springframework.stereotype.Controller;
13 | import org.springframework.ui.Model;
14 | import org.springframework.validation.BindingResult;
15 | import org.springframework.validation.ObjectError;
16 | import org.springframework.validation.annotation.Validated;
17 | import org.springframework.web.bind.annotation.RequestMapping;
18 | import org.springframework.web.bind.annotation.RequestMethod;
19 | import org.springframework.web.bind.annotation.RequestParam;
20 | import org.springframework.web.multipart.MultipartFile;
21 | import org.springframework.web.servlet.ModelAndView;
22 |
23 | import com.ssm.domain.ItemsCustom;
24 | import com.ssm.domain.ItemsCustomVo;
25 | import com.ssm.exception.CustomException;
26 | import com.ssm.service.ItemsService;
27 |
28 | @Controller
29 |
30 | // 根路径
31 | // @RequestMapping("/items")
32 | public class ItemsController{
33 |
34 | @Autowired
35 | private ItemsService itemsService;
36 |
37 | @RequestMapping(value = "/queryItems", method = {RequestMethod.POST, RequestMethod.GET})
38 | public ModelAndView queryItems(){
39 |
40 | List itemsList = itemsService.findItemsList(null);
41 | ModelAndView modelAndview = new ModelAndView();
42 | // System.out.println(itemsList);
43 | modelAndview.addObject("itemList", itemsList);
44 |
45 | modelAndview.setViewName("items/itemsList");
46 |
47 | return modelAndview;
48 | }
49 |
50 | @RequestMapping("/editUI")
51 | public ModelAndView editUI(@RequestParam(value = "id", defaultValue = "") Integer id){
52 |
53 | ItemsCustom itemsCustom = itemsService.findItemsById(id);
54 |
55 | ModelAndView modelAndView = new ModelAndView();
56 | modelAndView.addObject("itemsCustom", itemsCustom);
57 |
58 | modelAndView.setViewName("items/editUI");
59 |
60 | return modelAndView;
61 | }
62 | /*
63 | @RequestMapping(value = "/edit", method = {RequestMethod.GET, RequestMethod.POST })
64 | public String edit(HttpServletRequest request, Integer id, String name, ItemsCustom itemsCustom){
65 | String param_id = request.getParameter("id");
66 | System.out.println(param_id);
67 |
68 | System.out.println(id);
69 | System.out.println(name);
70 | System.out.println(itemsCustom);
71 | if(itemsCustom != null)
72 | System.out.println(itemsCustom.getName() + "," + itemsCustom.getDetail());
73 | itemsService.updateItemsCustom(itemsCustom);
74 |
75 | return "redirect:queryItems.action";
76 | // return "forword:queryItems.action";
77 | }
78 | */
79 |
80 | @RequestMapping(value = "/edit", method = {RequestMethod.GET, RequestMethod.POST })
81 | public String edit(HttpServletRequest request, Integer id, String name, ItemsCustomVo itemsCustomVo){
82 |
83 | if(itemsCustomVo != null){
84 | System.out.println(itemsCustomVo.getItemsCustom().getName());
85 | }
86 |
87 | return "redirect:queryItems.action";
88 | // return "forword:queryItems.action";
89 | }
90 |
91 | /**
92 | * 删除,数组id[],spring自动注入值的方式
93 | * @param itemIds
94 | * @return
95 | */
96 | @RequestMapping(value = "/delete", method = {RequestMethod.GET, RequestMethod.POST })
97 | public String edit(Integer[] itemIds){
98 |
99 | for (Integer integer : itemIds) {
100 | System.out.println(integer);
101 | }
102 |
103 | return "redirect:queryItems.action";
104 | // return "forword:queryItems.action";
105 | }
106 |
107 | /**
108 | * list表单自动填充
109 | * @param itemIds
110 | * @return
111 | */
112 | @RequestMapping(value = "/deleteList", method = {RequestMethod.GET, RequestMethod.POST })
113 | public String edit(ItemsCustomVo itemsCustomVo){
114 |
115 | List itemsCustomList = itemsCustomVo.getItemsCustomList();
116 | for (ItemsCustom itemsCustom : itemsCustomList) {
117 | System.out.println(itemsCustom.getId());
118 | }
119 |
120 | return "redirect:queryItems.action";
121 | // return "forword:queryItems.action";
122 | }
123 |
124 | /**
125 | * list表单自动填充
126 | * @param itemIds
127 | * @return
128 | */
129 | @RequestMapping(value = "/deleteMap", method = {RequestMethod.GET, RequestMethod.POST })
130 | public String editMap(ItemsCustomVo itemsCustomVo){
131 |
132 | Map itemsCustomMap = itemsCustomVo.getItemsCustomMap();
133 | Set set = itemsCustomMap.keySet();
134 | for(String str : set){
135 | System.out.println(itemsCustomMap.get(str).getId());
136 | }
137 |
138 | return "redirect:queryItems.action";
139 | // return "forword:queryItems.action";
140 | }
141 |
142 | /**
143 | * list表单自动填充
144 | * @param itemIds
145 | * @return
146 | * @throws CustomException
147 | */
148 | @RequestMapping(value = "/editItemsValitation", method = {RequestMethod.GET, RequestMethod.POST })
149 | public String editValitation(Model model, @Validated ItemsCustom itemsCustom, BindingResult bindingResult) throws CustomException{
150 |
151 | System.out.println(itemsCustom.getName());
152 | System.out.println(itemsCustom.getId());
153 | System.out.println(itemsCustom.getDetail());
154 | if(bindingResult.hasErrors()){
155 | List errorList = bindingResult.getAllErrors();
156 | for(ObjectError objectError : errorList){
157 | System.out.println("错误信息:" + objectError.getDefaultMessage());
158 | }
159 |
160 | if(model != null)
161 | model.addAttribute("errorList", errorList);
162 | else
163 | throw new CustomException("error");
164 | }
165 |
166 | /* if(model == null)
167 | throw new CustomException("error");
168 | */
169 | return "forward:queryItems.action";
170 | // return "forword:queryItems.action";
171 | }
172 |
173 | /**
174 | * list表单自动填充
175 | * @param itemIds
176 | * @return
177 | * @throws CustomException
178 | * @throws IOException
179 | * @throws IllegalStateException
180 | */
181 | @RequestMapping(value = "/editSubmit", method = {RequestMethod.GET, RequestMethod.POST })
182 | public String editSubmit(Model model, @Validated ItemsCustom itemsCustom, BindingResult bindingResult, MultipartFile items_pic) throws Exception{
183 |
184 | System.out.println(itemsCustom.getName());
185 | System.out.println(itemsCustom.getId());
186 | System.out.println(itemsCustom.getDetail());
187 |
188 | String originalFileName = items_pic.getOriginalFilename();
189 | if(items_pic != null && originalFileName != null && originalFileName.length() > 0 ){
190 | String pic_path = "F:\\temp\\";
191 | String newFileName = UUID.randomUUID() + originalFileName.substring(originalFileName.lastIndexOf('.'), originalFileName.length());
192 | File file = new File(pic_path + newFileName);
193 | if(!file.exists())
194 | file.mkdirs();
195 | items_pic.transferTo(file);
196 | itemsCustom.setPic(newFileName);
197 | }
198 |
199 | if(bindingResult.hasErrors()){
200 | List errorList = bindingResult.getAllErrors();
201 | for(ObjectError objectError : errorList){
202 | System.out.println("错误信息:" + objectError.getDefaultMessage());
203 | }
204 |
205 | if(model != null)
206 | model.addAttribute("errorList", errorList);
207 | else
208 | throw new CustomException("error");
209 | }
210 | itemsService.updateItemsCustom(itemsCustom);
211 | return "forward:queryItems.action";
212 | }
213 |
214 |
215 | }
216 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/controller/ItemsRestFul.java:
--------------------------------------------------------------------------------
1 | package com.ssm.controller;
2 |
3 | import org.springframework.beans.factory.annotation.Autowired;
4 | import org.springframework.stereotype.Controller;
5 | import org.springframework.web.bind.annotation.PathVariable;
6 | import org.springframework.web.bind.annotation.RequestMapping;
7 | import org.springframework.web.bind.annotation.ResponseBody;
8 |
9 | import com.ssm.domain.ItemsCustom;
10 | import com.ssm.service.ItemsService;
11 |
12 | @Controller
13 | public class ItemsRestFul {
14 |
15 | @Autowired
16 | private ItemsService itemsService;
17 |
18 | @RequestMapping("/itemsRestFul/{id}")
19 | public @ResponseBody ItemsCustom itemsView(@PathVariable("id") Integer id){
20 | ItemsCustom itemsCustom = itemsService.findItemsById(id);
21 | return itemsCustom;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/controller/conversion/ConversionService.java:
--------------------------------------------------------------------------------
1 | package com.ssm.controller.conversion;
2 |
3 | import java.text.ParseException;
4 | import java.text.SimpleDateFormat;
5 | import java.util.Date;
6 |
7 | import org.springframework.core.convert.converter.Converter;
8 |
9 |
10 | public class ConversionService implements Converter{
11 |
12 | public Date convert(String dateStr) {
13 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:MM:SS");
14 | try {
15 | return dateFormat.parse(dateStr);
16 | } catch (ParseException e) {
17 | // TODO Auto-generated catch block
18 | e.printStackTrace();
19 | }
20 | return null;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/domain/Items.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain;
2 |
3 | import java.util.Date;
4 |
5 | import javax.validation.constraints.Size;
6 |
7 | import com.ssm.domain.group4valitation.ValitationGroup;
8 |
9 | public class Items {
10 | private Integer id;
11 |
12 | @Size(min = 1, max = 20, message = "{items.name.length}", groups = {ValitationGroup.class})
13 | private String name;
14 |
15 | private Float price;
16 |
17 | private String pic;
18 |
19 | private Date createtime;
20 |
21 | private String detail;
22 |
23 | public Integer getId() {
24 | return id;
25 | }
26 |
27 | public void setId(Integer id) {
28 | this.id = id;
29 | }
30 |
31 | public String getName() {
32 | return name;
33 | }
34 |
35 | public void setName(String name) {
36 | this.name = name == null ? null : name.trim();
37 | }
38 |
39 | public Float getPrice() {
40 | return price;
41 | }
42 |
43 | public void setPrice(Float price) {
44 | this.price = price;
45 | }
46 |
47 | public String getPic() {
48 | return pic;
49 | }
50 |
51 | public void setPic(String pic) {
52 | this.pic = pic == null ? null : pic.trim();
53 | }
54 |
55 | public Date getCreatetime() {
56 | return createtime;
57 | }
58 |
59 | public void setCreatetime(Date createtime) {
60 | this.createtime = createtime;
61 | }
62 |
63 | public String getDetail() {
64 | return detail;
65 | }
66 |
67 | public void setDetail(String detail) {
68 | this.detail = detail == null ? null : detail.trim();
69 | }
70 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/domain/ItemsCustom.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain;
2 |
3 | public class ItemsCustom extends Items{
4 |
5 |
6 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/domain/ItemsCustomVo.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain;
2 |
3 | import java.util.HashMap;
4 | import java.util.List;
5 | import java.util.Map;
6 |
7 | public class ItemsCustomVo {
8 |
9 | private ItemsCustom itemsCustom;
10 |
11 | private List itemsCustomList;
12 |
13 | private Map itemsCustomMap = new HashMap();
14 |
15 | public ItemsCustom getItemsCustom() {
16 | return itemsCustom;
17 | }
18 |
19 | public void setItemsCustom(ItemsCustom itemsCustom) {
20 | this.itemsCustom = itemsCustom;
21 | }
22 |
23 | public List getItemsCustomList() {
24 | return itemsCustomList;
25 | }
26 |
27 | public void setItemsCustomList(List itemsCustomList) {
28 | this.itemsCustomList = itemsCustomList;
29 | }
30 |
31 | public Map getItemsCustomMap() {
32 | return itemsCustomMap;
33 | }
34 |
35 | public void setItemsCustomMap(Map itemsCustomMap) {
36 | this.itemsCustomMap = itemsCustomMap;
37 | }
38 |
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/domain/Orderdetail.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain;
2 |
3 | public class Orderdetail {
4 | private Integer id;
5 |
6 | private Integer ordersId;
7 |
8 | private Integer itemsId;
9 |
10 | private Integer itemsNum;
11 |
12 | public Integer getId() {
13 | return id;
14 | }
15 |
16 | public void setId(Integer id) {
17 | this.id = id;
18 | }
19 |
20 | public Integer getOrdersId() {
21 | return ordersId;
22 | }
23 |
24 | public void setOrdersId(Integer ordersId) {
25 | this.ordersId = ordersId;
26 | }
27 |
28 | public Integer getItemsId() {
29 | return itemsId;
30 | }
31 |
32 | public void setItemsId(Integer itemsId) {
33 | this.itemsId = itemsId;
34 | }
35 |
36 | public Integer getItemsNum() {
37 | return itemsNum;
38 | }
39 |
40 | public void setItemsNum(Integer itemsNum) {
41 | this.itemsNum = itemsNum;
42 | }
43 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/domain/Orders.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain;
2 |
3 | import java.util.Date;
4 |
5 | public class Orders {
6 | private Integer id;
7 |
8 | private Integer userId;
9 |
10 | private String number;
11 |
12 | private Date createtime;
13 |
14 | private String note;
15 |
16 | public Integer getId() {
17 | return id;
18 | }
19 |
20 | public void setId(Integer id) {
21 | this.id = id;
22 | }
23 |
24 | public Integer getUserId() {
25 | return userId;
26 | }
27 |
28 | public void setUserId(Integer userId) {
29 | this.userId = userId;
30 | }
31 |
32 | public String getNumber() {
33 | return number;
34 | }
35 |
36 | public void setNumber(String number) {
37 | this.number = number == null ? null : number.trim();
38 | }
39 |
40 | public Date getCreatetime() {
41 | return createtime;
42 | }
43 |
44 | public void setCreatetime(Date createtime) {
45 | this.createtime = createtime;
46 | }
47 |
48 | public String getNote() {
49 | return note;
50 | }
51 |
52 | public void setNote(String note) {
53 | this.note = note == null ? null : note.trim();
54 | }
55 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/domain/User.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain;
2 |
3 | import java.util.Date;
4 |
5 | public class User {
6 | private Integer id;
7 |
8 | private String username;
9 |
10 | private Date birthday;
11 |
12 | private String sex;
13 |
14 | private String address;
15 |
16 | public Integer getId() {
17 | return id;
18 | }
19 |
20 | public void setId(Integer id) {
21 | this.id = id;
22 | }
23 |
24 | public String getUsername() {
25 | return username;
26 | }
27 |
28 | public void setUsername(String username) {
29 | this.username = username == null ? null : username.trim();
30 | }
31 |
32 | public Date getBirthday() {
33 | return birthday;
34 | }
35 |
36 | public void setBirthday(Date birthday) {
37 | this.birthday = birthday;
38 | }
39 |
40 | public String getSex() {
41 | return sex;
42 | }
43 |
44 | public void setSex(String sex) {
45 | this.sex = sex == null ? null : sex.trim();
46 | }
47 |
48 | public String getAddress() {
49 | return address;
50 | }
51 |
52 | public void setAddress(String address) {
53 | this.address = address == null ? null : address.trim();
54 | }
55 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/domain/group4valitation/ValitationGroup.java:
--------------------------------------------------------------------------------
1 | package com.ssm.domain.group4valitation;
2 |
3 | public interface ValitationGroup {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/exception/CustomException.java:
--------------------------------------------------------------------------------
1 | package com.ssm.exception;
2 |
3 | public class CustomException extends Exception {
4 | private static final long serialVersionUID = 1L;
5 |
6 | private String message;
7 |
8 | public CustomException(String message) {
9 | super(message);
10 | this.message = message;
11 | }
12 |
13 | public String getMessage() {
14 | return message;
15 | }
16 |
17 | public void setMessage(String message) {
18 | this.message = message;
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/exception/CustomExceptionResolver.java:
--------------------------------------------------------------------------------
1 | package com.ssm.exception;
2 |
3 | import javax.servlet.http.HttpServletRequest;
4 | import javax.servlet.http.HttpServletResponse;
5 |
6 | import org.springframework.web.servlet.HandlerExceptionResolver;
7 | import org.springframework.web.servlet.ModelAndView;
8 |
9 | public class CustomExceptionResolver implements HandlerExceptionResolver{
10 |
11 | public ModelAndView resolveException(HttpServletRequest request,
12 | HttpServletResponse response, Object handler, Exception exception) {
13 |
14 | CustomException customException = null;
15 | if(exception instanceof CustomException){
16 | customException = (CustomException)exception;
17 | }else{
18 | customException = new CustomException("未知错误!");
19 | }
20 |
21 | String message = customException.getMessage();
22 | ModelAndView modelAndView = new ModelAndView();
23 | modelAndView.addObject("message", message);
24 |
25 | modelAndView.setViewName("error");
26 |
27 | return modelAndView;
28 |
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/interceptor/HandlerInterceptor1.java:
--------------------------------------------------------------------------------
1 | package com.ssm.interceptor;
2 |
3 | import javax.servlet.http.HttpServletRequest;
4 | import javax.servlet.http.HttpServletResponse;
5 |
6 | import org.springframework.web.servlet.HandlerInterceptor;
7 | import org.springframework.web.servlet.ModelAndView;
8 |
9 |
10 | public class HandlerInterceptor1 implements HandlerInterceptor{
11 |
12 | public void afterCompletion(HttpServletRequest arg0,
13 | HttpServletResponse arg1, Object arg2, Exception arg3)
14 | throws Exception {
15 |
16 | System.out.println("afterCompletion1");
17 | }
18 |
19 | public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
20 | Object arg2, ModelAndView arg3) throws Exception {
21 |
22 | System.out.println("postHandle1");
23 | }
24 |
25 | public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1,
26 | Object arg2) throws Exception {
27 |
28 | System.out.println("preHandle1");
29 | return true;
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/interceptor/HandlerInterceptor2.java:
--------------------------------------------------------------------------------
1 | package com.ssm.interceptor;
2 |
3 | import javax.servlet.http.HttpServletRequest;
4 | import javax.servlet.http.HttpServletResponse;
5 |
6 | import org.springframework.web.servlet.HandlerInterceptor;
7 | import org.springframework.web.servlet.ModelAndView;
8 |
9 | public class HandlerInterceptor2 implements HandlerInterceptor{
10 |
11 | public void afterCompletion(HttpServletRequest arg0,
12 | HttpServletResponse arg1, Object arg2, Exception arg3)
13 | throws Exception {
14 |
15 | System.out.println("afterCompletion2");
16 | }
17 |
18 | public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1,
19 | Object arg2, ModelAndView arg3) throws Exception {
20 | System.out.println("postHandle2");
21 | }
22 |
23 | public boolean preHandle(HttpServletRequest arg0, HttpServletResponse arg1,
24 | Object arg2) throws Exception {
25 | System.out.println("preHandle2");
26 | return true;
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/ItemsMapper.java:
--------------------------------------------------------------------------------
1 | package com.ssm.mapper;
2 |
3 | import com.ssm.domain.Items;
4 | import com.ssm.domain.ItemsExample;
5 | import java.util.List;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | public interface ItemsMapper {
9 | int countByExample(ItemsExample example);
10 |
11 | int deleteByExample(ItemsExample example);
12 |
13 | int deleteByPrimaryKey(Integer id);
14 |
15 | int insert(Items record);
16 |
17 | int insertSelective(Items record);
18 |
19 | List selectByExampleWithBLOBs(ItemsExample example);
20 |
21 | List selectByExample(ItemsExample example);
22 |
23 | Items selectByPrimaryKey(Integer id);
24 |
25 | int updateByExampleSelective(@Param("record") Items record, @Param("example") ItemsExample example);
26 |
27 | int updateByExampleWithBLOBs(@Param("record") Items record, @Param("example") ItemsExample example);
28 |
29 | int updateByExample(@Param("record") Items record, @Param("example") ItemsExample example);
30 |
31 | int updateByPrimaryKeySelective(Items record);
32 |
33 | int updateByPrimaryKeyWithBLOBs(Items record);
34 |
35 | int updateByPrimaryKey(Items record);
36 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/ItemsMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | and ${criterion.condition}
23 |
24 |
25 | and ${criterion.condition} #{criterion.value}
26 |
27 |
28 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
29 |
30 |
31 | and ${criterion.condition}
32 |
33 | #{listItem}
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | and ${criterion.condition}
52 |
53 |
54 | and ${criterion.condition} #{criterion.value}
55 |
56 |
57 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
58 |
59 |
60 | and ${criterion.condition}
61 |
62 | #{listItem}
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | id, name, price, pic, createtime
74 |
75 |
76 | detail
77 |
78 |
94 |
108 |
116 |
117 | delete from items
118 | where id = #{id,jdbcType=INTEGER}
119 |
120 |
121 | delete from items
122 |
123 |
124 |
125 |
126 |
127 | insert into items (id, name, price,
128 | pic, createtime, detail
129 | )
130 | values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{price,jdbcType=REAL},
131 | #{pic,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{detail,jdbcType=LONGVARCHAR}
132 | )
133 |
134 |
135 | insert into items
136 |
137 |
138 | id,
139 |
140 |
141 | name,
142 |
143 |
144 | price,
145 |
146 |
147 | pic,
148 |
149 |
150 | createtime,
151 |
152 |
153 | detail,
154 |
155 |
156 |
157 |
158 | #{id,jdbcType=INTEGER},
159 |
160 |
161 | #{name,jdbcType=VARCHAR},
162 |
163 |
164 | #{price,jdbcType=REAL},
165 |
166 |
167 | #{pic,jdbcType=VARCHAR},
168 |
169 |
170 | #{createtime,jdbcType=TIMESTAMP},
171 |
172 |
173 | #{detail,jdbcType=LONGVARCHAR},
174 |
175 |
176 |
177 |
183 |
184 | update items
185 |
186 |
187 | id = #{record.id,jdbcType=INTEGER},
188 |
189 |
190 | name = #{record.name,jdbcType=VARCHAR},
191 |
192 |
193 | price = #{record.price,jdbcType=REAL},
194 |
195 |
196 | pic = #{record.pic,jdbcType=VARCHAR},
197 |
198 |
199 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
200 |
201 |
202 | detail = #{record.detail,jdbcType=LONGVARCHAR},
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 | update items
211 | set id = #{record.id,jdbcType=INTEGER},
212 | name = #{record.name,jdbcType=VARCHAR},
213 | price = #{record.price,jdbcType=REAL},
214 | pic = #{record.pic,jdbcType=VARCHAR},
215 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
216 | detail = #{record.detail,jdbcType=LONGVARCHAR}
217 |
218 |
219 |
220 |
221 |
222 | update items
223 | set id = #{record.id,jdbcType=INTEGER},
224 | name = #{record.name,jdbcType=VARCHAR},
225 | price = #{record.price,jdbcType=REAL},
226 | pic = #{record.pic,jdbcType=VARCHAR},
227 | createtime = #{record.createtime,jdbcType=TIMESTAMP}
228 |
229 |
230 |
231 |
232 |
233 | update items
234 |
235 |
236 | name = #{name,jdbcType=VARCHAR},
237 |
238 |
239 | price = #{price,jdbcType=REAL},
240 |
241 |
242 | pic = #{pic,jdbcType=VARCHAR},
243 |
244 |
245 | createtime = #{createtime,jdbcType=TIMESTAMP},
246 |
247 |
248 | detail = #{detail,jdbcType=LONGVARCHAR},
249 |
250 |
251 | where id = #{id,jdbcType=INTEGER}
252 |
253 |
254 | update items
255 | set name = #{name,jdbcType=VARCHAR},
256 | price = #{price,jdbcType=REAL},
257 | pic = #{pic,jdbcType=VARCHAR},
258 | createtime = #{createtime,jdbcType=TIMESTAMP},
259 | detail = #{detail,jdbcType=LONGVARCHAR}
260 | where id = #{id,jdbcType=INTEGER}
261 |
262 |
263 | update items
264 | set name = #{name,jdbcType=VARCHAR},
265 | price = #{price,jdbcType=REAL},
266 | pic = #{pic,jdbcType=VARCHAR},
267 | createtime = #{createtime,jdbcType=TIMESTAMP}
268 | where id = #{id,jdbcType=INTEGER}
269 |
270 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/ItemsMapperCustom.java:
--------------------------------------------------------------------------------
1 | package com.ssm.mapper;
2 |
3 | import java.util.List;
4 |
5 | import com.ssm.domain.Items;
6 | import com.ssm.domain.ItemsCustom;
7 |
8 |
9 | public interface ItemsMapperCustom {
10 |
11 | public List findItemsList(Items items);
12 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/ItemsMapperCustom.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | items.name like '%${itemsCustomVo.name}%'
9 |
10 |
11 |
12 |
13 |
14 |
20 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/OrderdetailMapper.java:
--------------------------------------------------------------------------------
1 | package com.ssm.mapper;
2 |
3 | import com.ssm.domain.Orderdetail;
4 | import com.ssm.domain.OrderdetailExample;
5 | import java.util.List;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | public interface OrderdetailMapper {
9 | int countByExample(OrderdetailExample example);
10 |
11 | int deleteByExample(OrderdetailExample example);
12 |
13 | int deleteByPrimaryKey(Integer id);
14 |
15 | int insert(Orderdetail record);
16 |
17 | int insertSelective(Orderdetail record);
18 |
19 | List selectByExample(OrderdetailExample example);
20 |
21 | Orderdetail selectByPrimaryKey(Integer id);
22 |
23 | int updateByExampleSelective(@Param("record") Orderdetail record, @Param("example") OrderdetailExample example);
24 |
25 | int updateByExample(@Param("record") Orderdetail record, @Param("example") OrderdetailExample example);
26 |
27 | int updateByPrimaryKeySelective(Orderdetail record);
28 |
29 | int updateByPrimaryKey(Orderdetail record);
30 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/OrderdetailMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | and ${criterion.condition}
19 |
20 |
21 | and ${criterion.condition} #{criterion.value}
22 |
23 |
24 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
25 |
26 |
27 | and ${criterion.condition}
28 |
29 | #{listItem}
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | and ${criterion.condition}
48 |
49 |
50 | and ${criterion.condition} #{criterion.value}
51 |
52 |
53 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
54 |
55 |
56 | and ${criterion.condition}
57 |
58 | #{listItem}
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | id, orders_id, items_id, items_num
70 |
71 |
85 |
91 |
92 | delete from orderdetail
93 | where id = #{id,jdbcType=INTEGER}
94 |
95 |
96 | delete from orderdetail
97 |
98 |
99 |
100 |
101 |
102 | insert into orderdetail (id, orders_id, items_id,
103 | items_num)
104 | values (#{id,jdbcType=INTEGER}, #{ordersId,jdbcType=INTEGER}, #{itemsId,jdbcType=INTEGER},
105 | #{itemsNum,jdbcType=INTEGER})
106 |
107 |
108 | insert into orderdetail
109 |
110 |
111 | id,
112 |
113 |
114 | orders_id,
115 |
116 |
117 | items_id,
118 |
119 |
120 | items_num,
121 |
122 |
123 |
124 |
125 | #{id,jdbcType=INTEGER},
126 |
127 |
128 | #{ordersId,jdbcType=INTEGER},
129 |
130 |
131 | #{itemsId,jdbcType=INTEGER},
132 |
133 |
134 | #{itemsNum,jdbcType=INTEGER},
135 |
136 |
137 |
138 |
144 |
145 | update orderdetail
146 |
147 |
148 | id = #{record.id,jdbcType=INTEGER},
149 |
150 |
151 | orders_id = #{record.ordersId,jdbcType=INTEGER},
152 |
153 |
154 | items_id = #{record.itemsId,jdbcType=INTEGER},
155 |
156 |
157 | items_num = #{record.itemsNum,jdbcType=INTEGER},
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 | update orderdetail
166 | set id = #{record.id,jdbcType=INTEGER},
167 | orders_id = #{record.ordersId,jdbcType=INTEGER},
168 | items_id = #{record.itemsId,jdbcType=INTEGER},
169 | items_num = #{record.itemsNum,jdbcType=INTEGER}
170 |
171 |
172 |
173 |
174 |
175 | update orderdetail
176 |
177 |
178 | orders_id = #{ordersId,jdbcType=INTEGER},
179 |
180 |
181 | items_id = #{itemsId,jdbcType=INTEGER},
182 |
183 |
184 | items_num = #{itemsNum,jdbcType=INTEGER},
185 |
186 |
187 | where id = #{id,jdbcType=INTEGER}
188 |
189 |
190 | update orderdetail
191 | set orders_id = #{ordersId,jdbcType=INTEGER},
192 | items_id = #{itemsId,jdbcType=INTEGER},
193 | items_num = #{itemsNum,jdbcType=INTEGER}
194 | where id = #{id,jdbcType=INTEGER}
195 |
196 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/OrdersMapper.java:
--------------------------------------------------------------------------------
1 | package com.ssm.mapper;
2 |
3 | import com.ssm.domain.Orders;
4 | import com.ssm.domain.OrdersExample;
5 | import java.util.List;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | public interface OrdersMapper {
9 | int countByExample(OrdersExample example);
10 |
11 | int deleteByExample(OrdersExample example);
12 |
13 | int deleteByPrimaryKey(Integer id);
14 |
15 | int insert(Orders record);
16 |
17 | int insertSelective(Orders record);
18 |
19 | List selectByExample(OrdersExample example);
20 |
21 | Orders selectByPrimaryKey(Integer id);
22 |
23 | int updateByExampleSelective(@Param("record") Orders record, @Param("example") OrdersExample example);
24 |
25 | int updateByExample(@Param("record") Orders record, @Param("example") OrdersExample example);
26 |
27 | int updateByPrimaryKeySelective(Orders record);
28 |
29 | int updateByPrimaryKey(Orders record);
30 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/OrdersMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | and ${criterion.condition}
20 |
21 |
22 | and ${criterion.condition} #{criterion.value}
23 |
24 |
25 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26 |
27 |
28 | and ${criterion.condition}
29 |
30 | #{listItem}
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | and ${criterion.condition}
49 |
50 |
51 | and ${criterion.condition} #{criterion.value}
52 |
53 |
54 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
55 |
56 |
57 | and ${criterion.condition}
58 |
59 | #{listItem}
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | id, user_id, number, createtime, note
71 |
72 |
86 |
92 |
93 | delete from orders
94 | where id = #{id,jdbcType=INTEGER}
95 |
96 |
97 | delete from orders
98 |
99 |
100 |
101 |
102 |
103 | insert into orders (id, user_id, number,
104 | createtime, note)
105 | values (#{id,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{number,jdbcType=VARCHAR},
106 | #{createtime,jdbcType=TIMESTAMP}, #{note,jdbcType=VARCHAR})
107 |
108 |
109 | insert into orders
110 |
111 |
112 | id,
113 |
114 |
115 | user_id,
116 |
117 |
118 | number,
119 |
120 |
121 | createtime,
122 |
123 |
124 | note,
125 |
126 |
127 |
128 |
129 | #{id,jdbcType=INTEGER},
130 |
131 |
132 | #{userId,jdbcType=INTEGER},
133 |
134 |
135 | #{number,jdbcType=VARCHAR},
136 |
137 |
138 | #{createtime,jdbcType=TIMESTAMP},
139 |
140 |
141 | #{note,jdbcType=VARCHAR},
142 |
143 |
144 |
145 |
151 |
152 | update orders
153 |
154 |
155 | id = #{record.id,jdbcType=INTEGER},
156 |
157 |
158 | user_id = #{record.userId,jdbcType=INTEGER},
159 |
160 |
161 | number = #{record.number,jdbcType=VARCHAR},
162 |
163 |
164 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
165 |
166 |
167 | note = #{record.note,jdbcType=VARCHAR},
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 | update orders
176 | set id = #{record.id,jdbcType=INTEGER},
177 | user_id = #{record.userId,jdbcType=INTEGER},
178 | number = #{record.number,jdbcType=VARCHAR},
179 | createtime = #{record.createtime,jdbcType=TIMESTAMP},
180 | note = #{record.note,jdbcType=VARCHAR}
181 |
182 |
183 |
184 |
185 |
186 | update orders
187 |
188 |
189 | user_id = #{userId,jdbcType=INTEGER},
190 |
191 |
192 | number = #{number,jdbcType=VARCHAR},
193 |
194 |
195 | createtime = #{createtime,jdbcType=TIMESTAMP},
196 |
197 |
198 | note = #{note,jdbcType=VARCHAR},
199 |
200 |
201 | where id = #{id,jdbcType=INTEGER}
202 |
203 |
204 | update orders
205 | set user_id = #{userId,jdbcType=INTEGER},
206 | number = #{number,jdbcType=VARCHAR},
207 | createtime = #{createtime,jdbcType=TIMESTAMP},
208 | note = #{note,jdbcType=VARCHAR}
209 | where id = #{id,jdbcType=INTEGER}
210 |
211 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/UserMapper.java:
--------------------------------------------------------------------------------
1 | package com.ssm.mapper;
2 |
3 | import com.ssm.domain.User;
4 | import com.ssm.domain.UserExample;
5 | import java.util.List;
6 | import org.apache.ibatis.annotations.Param;
7 |
8 | public interface UserMapper {
9 | int countByExample(UserExample example);
10 |
11 | int deleteByExample(UserExample example);
12 |
13 | int deleteByPrimaryKey(Integer id);
14 |
15 | int insert(User record);
16 |
17 | int insertSelective(User record);
18 |
19 | List selectByExample(UserExample example);
20 |
21 | User selectByPrimaryKey(Integer id);
22 |
23 | int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);
24 |
25 | int updateByExample(@Param("record") User record, @Param("example") UserExample example);
26 |
27 | int updateByPrimaryKeySelective(User record);
28 |
29 | int updateByPrimaryKey(User record);
30 | }
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/mapper/UserMapper.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | and ${criterion.condition}
20 |
21 |
22 | and ${criterion.condition} #{criterion.value}
23 |
24 |
25 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
26 |
27 |
28 | and ${criterion.condition}
29 |
30 | #{listItem}
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | and ${criterion.condition}
49 |
50 |
51 | and ${criterion.condition} #{criterion.value}
52 |
53 |
54 | and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
55 |
56 |
57 | and ${criterion.condition}
58 |
59 | #{listItem}
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 | id, username, birthday, sex, address
71 |
72 |
86 |
92 |
93 | delete from user
94 | where id = #{id,jdbcType=INTEGER}
95 |
96 |
97 | delete from user
98 |
99 |
100 |
101 |
102 |
103 | insert into user (id, username, birthday,
104 | sex, address)
105 | values (#{id,jdbcType=INTEGER}, #{username,jdbcType=VARCHAR}, #{birthday,jdbcType=DATE},
106 | #{sex,jdbcType=CHAR}, #{address,jdbcType=VARCHAR})
107 |
108 |
109 | insert into user
110 |
111 |
112 | id,
113 |
114 |
115 | username,
116 |
117 |
118 | birthday,
119 |
120 |
121 | sex,
122 |
123 |
124 | address,
125 |
126 |
127 |
128 |
129 | #{id,jdbcType=INTEGER},
130 |
131 |
132 | #{username,jdbcType=VARCHAR},
133 |
134 |
135 | #{birthday,jdbcType=DATE},
136 |
137 |
138 | #{sex,jdbcType=CHAR},
139 |
140 |
141 | #{address,jdbcType=VARCHAR},
142 |
143 |
144 |
145 |
151 |
152 | update user
153 |
154 |
155 | id = #{record.id,jdbcType=INTEGER},
156 |
157 |
158 | username = #{record.username,jdbcType=VARCHAR},
159 |
160 |
161 | birthday = #{record.birthday,jdbcType=DATE},
162 |
163 |
164 | sex = #{record.sex,jdbcType=CHAR},
165 |
166 |
167 | address = #{record.address,jdbcType=VARCHAR},
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 | update user
176 | set id = #{record.id,jdbcType=INTEGER},
177 | username = #{record.username,jdbcType=VARCHAR},
178 | birthday = #{record.birthday,jdbcType=DATE},
179 | sex = #{record.sex,jdbcType=CHAR},
180 | address = #{record.address,jdbcType=VARCHAR}
181 |
182 |
183 |
184 |
185 |
186 | update user
187 |
188 |
189 | username = #{username,jdbcType=VARCHAR},
190 |
191 |
192 | birthday = #{birthday,jdbcType=DATE},
193 |
194 |
195 | sex = #{sex,jdbcType=CHAR},
196 |
197 |
198 | address = #{address,jdbcType=VARCHAR},
199 |
200 |
201 | where id = #{id,jdbcType=INTEGER}
202 |
203 |
204 | update user
205 | set username = #{username,jdbcType=VARCHAR},
206 | birthday = #{birthday,jdbcType=DATE},
207 | sex = #{sex,jdbcType=CHAR},
208 | address = #{address,jdbcType=VARCHAR}
209 | where id = #{id,jdbcType=INTEGER}
210 |
211 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/service/ItemsService.java:
--------------------------------------------------------------------------------
1 | package com.ssm.service;
2 |
3 | import java.util.List;
4 |
5 | import com.ssm.domain.Items;
6 | import com.ssm.domain.ItemsCustom;
7 | import com.ssm.domain.ItemsCustomVo;
8 |
9 | public interface ItemsService {
10 |
11 | public List findItemsList(Items items);
12 | /**
13 | * 通过id获得ItemsCustom对象
14 | * @param items
15 | * @return
16 | */
17 | public ItemsCustom findItemsById(Integer id);
18 |
19 | public void updateItemsCustom(ItemsCustom itemsCustom);
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/service/impl/ItemsServiceImpl.java:
--------------------------------------------------------------------------------
1 | package com.ssm.service.impl;
2 |
3 | import java.util.List;
4 |
5 | import org.springframework.beans.BeanUtils;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 |
8 | import com.ssm.domain.Items;
9 | import com.ssm.domain.ItemsCustom;
10 | import com.ssm.domain.ItemsCustomVo;
11 | import com.ssm.mapper.ItemsMapper;
12 | import com.ssm.mapper.ItemsMapperCustom;
13 | import com.ssm.service.ItemsService;
14 |
15 | public class ItemsServiceImpl implements ItemsService{
16 |
17 | @Autowired
18 | private ItemsMapperCustom itemsMapperCustom;
19 |
20 | @Autowired
21 | private ItemsMapper itemsMapper;
22 |
23 | public List findItemsList(Items items) {
24 | return itemsMapperCustom.findItemsList(items);
25 | }
26 |
27 | public ItemsCustom findItemsById(Integer id) {
28 | Items items = itemsMapper.selectByPrimaryKey(id);
29 | ItemsCustom itemsCustom = null;
30 | if(items != null){
31 | itemsCustom = new ItemsCustom();
32 | BeanUtils.copyProperties(items, itemsCustom);
33 | }
34 | return itemsCustom;
35 | }
36 |
37 | public void updateItemsCustom(ItemsCustom itemsCustom) {
38 | itemsMapper.updateByPrimaryKeyWithBLOBs(itemsCustom);
39 | }
40 |
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/SpringMybatis/src/com/ssm/test/ItemsTest.java:
--------------------------------------------------------------------------------
1 | package com.ssm.test;
2 |
3 | import java.io.InputStream;
4 | import java.util.List;
5 |
6 | import org.apache.ibatis.io.Resources;
7 | import org.apache.ibatis.session.SqlSession;
8 | import org.apache.ibatis.session.SqlSessionFactory;
9 | import org.apache.ibatis.session.SqlSessionFactoryBuilder;
10 | import org.junit.Test;
11 |
12 | import com.ssm.domain.ItemsCustom;
13 | import com.ssm.mapper.ItemsMapperCustom;
14 |
15 |
16 |
17 | public class ItemsTest {
18 |
19 | String resource = "spring/applicationContext-dao.xml";
20 | @Test
21 | public void testOrdersMapper() throws Exception {
22 | InputStream inputStream = Resources.getResourceAsStream(resource);
23 | SqlSessionFactory sessionFactory = new SqlSessionFactoryBuilder().build(inputStream);
24 |
25 | SqlSession sqlSession = sessionFactory.openSession();
26 | ItemsMapperCustom itemsCustom = sqlSession.getMapper(ItemsMapperCustom.class);
27 | List customList = itemsCustom.findItemsList(null);
28 | System.out.println(customList);
29 | sqlSession.close();
30 |
31 | }
32 | }
33 |
--------------------------------------------------------------------------------