├── README.md ├── SpringMvcMybatis.iml ├── out └── artifacts │ └── SpringMvcMybatis_war_exploded │ ├── WEB-INF │ ├── classes │ │ ├── CustomValidationMessages.properties │ │ ├── config │ │ │ ├── db.properties │ │ │ ├── log4j.properties │ │ │ ├── mybatis │ │ │ │ └── SqlMapConfig.xml │ │ │ └── spring │ │ │ │ ├── applicationContext-dao.xml │ │ │ │ ├── applicationContext-service.xml │ │ │ │ ├── applicationContext-transaction.xml │ │ │ │ └── springmvc.xml │ │ ├── controller │ │ │ ├── ItemsController.class │ │ │ ├── JsonTest.class │ │ │ ├── LoginController.class │ │ │ ├── converter │ │ │ │ ├── CustomDateConverter.class │ │ │ │ └── StringTrimConverter.class │ │ │ ├── interceptor │ │ │ │ ├── HandlerInterceptor1.class │ │ │ │ ├── HandlerInterceptor2.class │ │ │ │ └── LoginInterceptor.class │ │ │ ├── propertyeditor │ │ │ │ └── CustomPropertyEditor.class │ │ │ └── validation │ │ │ │ ├── ValidGroup1.class │ │ │ │ └── ValidGroup2.class │ │ ├── exception │ │ │ ├── CustomException.class │ │ │ └── CustomExceptionResolver.class │ │ ├── mapper │ │ │ ├── ItemsMapper.class │ │ │ ├── ItemsMapper.xml │ │ │ ├── ItemsMapperCustom.class │ │ │ ├── ItemsMapperCustom.xml │ │ │ ├── OrderdetailMapper.class │ │ │ ├── OrderdetailMapper.xml │ │ │ ├── OrdersMapper.class │ │ │ ├── OrdersMapper.xml │ │ │ ├── UserMapper.class │ │ │ └── UserMapper.xml │ │ ├── po │ │ │ ├── Items.class │ │ │ ├── ItemsCustom.class │ │ │ ├── ItemsExample$Criteria.class │ │ │ ├── ItemsExample$Criterion.class │ │ │ ├── ItemsExample$GeneratedCriteria.class │ │ │ ├── ItemsExample.class │ │ │ ├── ItemsQueryVo.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 │ │ └── service │ │ │ ├── ItemsService.class │ │ │ └── impl │ │ │ └── ItemsServiceImpl.class │ ├── jsp │ │ ├── editItem.jsp │ │ ├── editItemsList.jsp │ │ ├── error.jsp │ │ ├── itemsList.jsp │ │ ├── login.jsp │ │ └── success.jsp │ ├── lib │ │ ├── aopalliance-1.0.jar │ │ ├── asm-3.3.1.jar │ │ ├── aspectjweaver-1.6.11.jar │ │ ├── cglib-2.2.2.jar │ │ ├── commons-dbcp-1.2.2.jar │ │ ├── commons-fileupload-1.3.2.jar │ │ ├── commons-io-2.5.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 │ └── jsontest.jsp ├── src ├── CustomValidationMessages.properties ├── config │ ├── db.properties │ ├── log4j.properties │ ├── mybatis │ │ └── SqlMapConfig.xml │ └── spring │ │ ├── applicationContext-dao.xml │ │ ├── applicationContext-service.xml │ │ ├── applicationContext-transaction.xml │ │ └── springmvc.xml ├── controller │ ├── ItemsController.java │ ├── JsonTest.java │ ├── LoginController.java │ ├── converter │ │ ├── CustomDateConverter.java │ │ └── StringTrimConverter.java │ ├── interceptor │ │ ├── HandlerInterceptor1.java │ │ ├── HandlerInterceptor2.java │ │ └── LoginInterceptor.java │ ├── propertyeditor │ │ └── CustomPropertyEditor.java │ └── validation │ │ ├── ValidGroup1.java │ │ └── ValidGroup2.java ├── exception │ ├── CustomException.java │ └── CustomExceptionResolver.java ├── mapper │ ├── ItemsMapper.java │ ├── ItemsMapper.xml │ ├── ItemsMapperCustom.java │ ├── ItemsMapperCustom.xml │ ├── OrderdetailMapper.java │ ├── OrderdetailMapper.xml │ ├── OrdersMapper.java │ ├── OrdersMapper.xml │ ├── UserMapper.java │ └── UserMapper.xml ├── po │ ├── Items.java │ ├── ItemsCustom.java │ ├── ItemsExample.java │ ├── ItemsQueryVo.java │ ├── Orderdetail.java │ ├── OrderdetailExample.java │ ├── Orders.java │ ├── OrdersExample.java │ ├── User.java │ └── UserExample.java ├── service │ ├── ItemsService.java │ └── impl │ │ └── ItemsServiceImpl.java └── sql │ ├── sql_data.sql │ └── sql_table.sql └── web ├── WEB-INF ├── classes │ ├── CustomValidationMessages.properties │ ├── config │ │ ├── db.properties │ │ ├── log4j.properties │ │ ├── mybatis │ │ │ └── SqlMapConfig.xml │ │ └── spring │ │ │ ├── applicationContext-dao.xml │ │ │ ├── applicationContext-service.xml │ │ │ ├── applicationContext-transaction.xml │ │ │ └── springmvc.xml │ ├── controller │ │ ├── ItemsController.class │ │ ├── JsonTest.class │ │ ├── LoginController.class │ │ ├── converter │ │ │ ├── CustomDateConverter.class │ │ │ └── StringTrimConverter.class │ │ ├── interceptor │ │ │ ├── HandlerInterceptor1.class │ │ │ ├── HandlerInterceptor2.class │ │ │ └── LoginInterceptor.class │ │ ├── propertyeditor │ │ │ └── CustomPropertyEditor.class │ │ └── validation │ │ │ ├── ValidGroup1.class │ │ │ └── ValidGroup2.class │ ├── exception │ │ ├── CustomException.class │ │ └── CustomExceptionResolver.class │ ├── mapper │ │ ├── ItemsMapper.class │ │ ├── ItemsMapper.xml │ │ ├── ItemsMapperCustom.class │ │ ├── ItemsMapperCustom.xml │ │ ├── OrderdetailMapper.class │ │ ├── OrderdetailMapper.xml │ │ ├── OrdersMapper.class │ │ ├── OrdersMapper.xml │ │ ├── UserMapper.class │ │ └── UserMapper.xml │ ├── po │ │ ├── Items.class │ │ ├── ItemsCustom.class │ │ ├── ItemsExample$Criteria.class │ │ ├── ItemsExample$Criterion.class │ │ ├── ItemsExample$GeneratedCriteria.class │ │ ├── ItemsExample.class │ │ ├── ItemsQueryVo.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 │ └── service │ │ ├── ItemsService.class │ │ └── impl │ │ └── ItemsServiceImpl.class ├── jsp │ ├── editItem.jsp │ ├── editItemsList.jsp │ ├── error.jsp │ ├── itemsList.jsp │ ├── login.jsp │ └── success.jsp ├── lib │ ├── aopalliance-1.0.jar │ ├── asm-3.3.1.jar │ ├── aspectjweaver-1.6.11.jar │ ├── cglib-2.2.2.jar │ ├── commons-dbcp-1.2.2.jar │ ├── commons-fileupload-1.3.2.jar │ ├── commons-io-2.5.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 └── jsontest.jsp /SpringMvcMybatis.iml: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/CustomValidationMessages.properties: -------------------------------------------------------------------------------- 1 | #校验提示信息:items.name.length.error要写在java代码中 2 | items.name.length.error=商品名称的长度请限制在1到30个字符 3 | items.createtime.is.notnull=请输入商品的生产日期 -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/config/db.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/mybatis 3 | jdbc.username=root 4 | jdbc.password=xiaxunwu1996. 5 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/config/log4j.properties: -------------------------------------------------------------------------------- 1 | # Global logging configuration\uff0c\u5efa\u8bae\u5f00\u53d1\u73af\u5883\u4e2d\u8981\u7528debug 2 | log4j.rootLogger=DEBUG, stdout 3 | # Console output... 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n 7 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/config/mybatis/SqlMapConfig.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/config/spring/applicationContext-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 44 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/config/spring/applicationContext-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/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 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/config/spring/springmvc.xml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 118 | 120 | 121 | 122 | 5242880 123 | 124 | 125 | 126 | 127 | 128 | 129 | 131 | 132 | 133 | 134 | 135 | 136 | 138 | 139 | 140 | CustomValidationMessages 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/ItemsController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/ItemsController.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/JsonTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/JsonTest.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/LoginController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/LoginController.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/converter/CustomDateConverter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/converter/CustomDateConverter.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/converter/StringTrimConverter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/converter/StringTrimConverter.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/interceptor/HandlerInterceptor1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/interceptor/HandlerInterceptor1.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/interceptor/HandlerInterceptor2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/interceptor/HandlerInterceptor2.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/interceptor/LoginInterceptor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/interceptor/LoginInterceptor.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/propertyeditor/CustomPropertyEditor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/propertyeditor/CustomPropertyEditor.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/validation/ValidGroup1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/validation/ValidGroup1.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/validation/ValidGroup2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/controller/validation/ValidGroup2.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/exception/CustomException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/exception/CustomException.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/exception/CustomExceptionResolver.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/exception/CustomExceptionResolver.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/ItemsMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/ItemsMapper.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/ItemsMapperCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/ItemsMapperCustom.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/ItemsMapperCustom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | and name like '%${itemsCustom.name}%' 15 | 16 | 17 | and id = #{itemsCustom.id} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/OrderdetailMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/OrderdetailMapper.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/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 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/OrdersMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/OrdersMapper.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/UserMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/mapper/UserMapper.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/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 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/Items.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/Items.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsCustom.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample$Criteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample$Criterion.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsExample.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsQueryVo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/ItemsQueryVo.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/Orderdetail.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/Orderdetail.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample$Criteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample$Criterion.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrderdetailExample.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/Orders.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/Orders.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample$Criteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample$Criterion.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/OrdersExample.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/User.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample$Criteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample$Criterion.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/po/UserExample.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/service/ItemsService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/service/ItemsService.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/service/impl/ItemsServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/classes/service/impl/ItemsServiceImpl.class -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/jsp/editItem.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 | 15 |
${error.defaultMessage}
16 |
17 |
18 | 19 | 修改商品信息: 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | 52 | 53 |
商品名称
商品价格
商品生产日期"/>
商品图片 36 | 37 | 38 |
39 |
40 | 41 |
商品简介 46 | 47 |
51 |
54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/jsp/editItemsList.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 | 20 | 21 | 22 |
23 | 查询条件: 24 | 25 | 26 | 36 | 39 | 40 |
27 | 35 | 37 | 38 |
41 | 商品列表: 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
商品名称商品价格生产日期商品描述操作
${item.detail }修改
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/jsp/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 错误信息 8 | 9 | 10 | ${message} 11 | 12 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/jsp/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 | 20 | 21 | 22 | 当前用户:${usercode} 23 | 24 | 退出 25 | 26 | 27 |
28 | 查询条件: 29 | 30 | 31 | 41 | 44 | 45 |
32 | 40 | 42 | 43 |
46 | 商品列表: 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
商品名称商品价格生产日期商品描述操作restful链接
${item.name }${item.price }${item.detail }修改商品查看
72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/jsp/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 用户登陆 8 | 9 | 10 |
11 | 用户账号:
12 | 用户密码 :
13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/jsp/success.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: codingBoy 4 | Date: 16/11/18 5 | Time: 下午1:53 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Title 12 | 13 | 14 | 批量修改成功 15 | 16 | 17 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/aopalliance-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/aopalliance-1.0.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/asm-3.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/asm-3.3.1.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/aspectjweaver-1.6.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/aspectjweaver-1.6.11.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/cglib-2.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/cglib-2.2.2.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-dbcp-1.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-dbcp-1.2.2.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-fileupload-1.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-fileupload-1.3.2.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-io-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-io-2.5.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-pool-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/commons-pool-1.3.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/hibernate-validator-4.3.0.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/hibernate-validator-4.3.0.Final.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jackson-core-asl-1.9.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jackson-core-asl-1.9.11.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jackson-mapper-asl-1.9.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jackson-mapper-asl-1.9.11.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/javassist-3.17.1-GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/javassist-3.17.1-GA.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/junit-4.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/junit-4.9.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/log4j-api-2.0-rc1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/log4j-api-2.0-rc1.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/log4j-core-2.0-rc1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/log4j-core-2.0-rc1.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/mybatis-3.2.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/mybatis-3.2.7.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/mybatis-spring-1.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/mybatis-spring-1.2.2.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/slf4j-api-1.7.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/slf4j-api-1.7.5.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/slf4j-log4j12-1.7.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/slf4j-log4j12-1.7.5.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/validation-api-1.0.0.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/lib/validation-api-1.0.0.GA.jar -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | springmvc 8 | org.springframework.web.servlet.DispatcherServlet 9 | 10 | 11 | contextConfigLocation 12 | 14 | classpath:config/spring/springmvc.xml 15 | 16 | 17 | 18 | springmvc 19 | 22 | 23 | *.action 24 | 25 | 26 | 27 | 28 | 29 | contextConfigLocation 30 | /WEB-INF/classes/config/spring/applicationContext-*.xml 31 | 32 | 33 | org.springframework.web.context.ContextLoaderListener 34 | 35 | 36 | 37 | 38 | springmvc_rest 39 | org.springframework.web.servlet.DispatcherServlet 40 | 41 | 42 | contextConfigLocation 43 | 45 | classpath:config/spring/springmvc.xml 46 | 47 | 48 | 49 | springmvc_rest 50 | 53 | 54 | 55 | / 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: codingBoy 4 | Date: 16/11/15 5 | Time: 下午2:42 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | $Title$ 12 | 13 | 14 | $END$ 15 | 16 | 17 | -------------------------------------------------------------------------------- /out/artifacts/SpringMvcMybatis_war_exploded/jsontest.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | json测试 8 | 9 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/CustomValidationMessages.properties: -------------------------------------------------------------------------------- 1 | #校验提示信息:items.name.length.error要写在java代码中 2 | items.name.length.error=商品名称的长度请限制在1到30个字符 3 | items.createtime.is.notnull=请输入商品的生产日期 -------------------------------------------------------------------------------- /src/config/db.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/mybatis 3 | jdbc.username=root 4 | jdbc.password=xiaxunwu1996. 5 | -------------------------------------------------------------------------------- /src/config/log4j.properties: -------------------------------------------------------------------------------- 1 | # Global logging configuration\uff0c\u5efa\u8bae\u5f00\u53d1\u73af\u5883\u4e2d\u8981\u7528debug 2 | log4j.rootLogger=DEBUG, stdout 3 | # Console output... 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n 7 | -------------------------------------------------------------------------------- /src/config/mybatis/SqlMapConfig.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/config/spring/applicationContext-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 44 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/config/spring/applicationContext-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/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 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/config/spring/springmvc.xml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 118 | 120 | 121 | 122 | 5242880 123 | 124 | 125 | 126 | 127 | 128 | 129 | 131 | 132 | 133 | 134 | 135 | 136 | 138 | 139 | 140 | CustomValidationMessages 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /src/controller/ItemsController.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import com.sun.org.apache.xpath.internal.operations.Mod; 4 | import controller.validation.ValidGroup1; 5 | import exception.CustomException; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.beans.propertyeditors.CustomDateEditor; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.ui.Model; 10 | import org.springframework.validation.BindingResult; 11 | import org.springframework.validation.ObjectError; 12 | import org.springframework.validation.annotation.Validated; 13 | import org.springframework.web.bind.WebDataBinder; 14 | import org.springframework.web.bind.annotation.*; 15 | import org.springframework.web.multipart.MultipartFile; 16 | import org.springframework.web.servlet.ModelAndView; 17 | import po.Items; 18 | import po.ItemsCustom; 19 | import po.ItemsQueryVo; 20 | import service.ItemsService; 21 | 22 | import javax.annotation.Resource; 23 | import javax.jws.WebParam; 24 | import javax.servlet.http.HttpServletRequest; 25 | import javax.servlet.http.HttpServletResponse; 26 | import java.io.File; 27 | import java.text.SimpleDateFormat; 28 | import java.util.*; 29 | 30 | /** 31 | * Created by codingBoy on 16/11/15. 32 | */ 33 | @Controller 34 | //定义url的根路径,访问时根路径+方法名的url 35 | @RequestMapping("/items") 36 | public class ItemsController { 37 | 38 | //注入service 39 | @Autowired 40 | private ItemsService itemsService; 41 | 42 | //单独将商品类型的方法提取出来,将方法返回值填充到request域,在页面提示 43 | @ModelAttribute("itemsType") 44 | public Map getItemsType() throws Exception{ 45 | 46 | HashMap itemsType=new HashMap<>(); 47 | itemsType.put("001","data type"); 48 | itemsType.put("002","clothes"); 49 | return itemsType; 50 | } 51 | 52 | @RequestMapping("/queryItems") 53 | public ModelAndView queryItems() throws Exception { 54 | //调用servie来查询商品列表 55 | List itemsList=itemsService.findItemsList(null); 56 | 57 | ModelAndView modelAndView=new ModelAndView(); 58 | modelAndView.addObject("itemsList",itemsList); 59 | //指定逻辑视图名itemsList.jsp 60 | modelAndView.setViewName("itemsList"); 61 | 62 | return modelAndView; 63 | } 64 | 65 | //批量修改商品查询 66 | @RequestMapping("/editItemsList") 67 | public ModelAndView editItemsList() throws Exception { 68 | //调用servie来查询商品列表 69 | List itemsList=itemsService.findItemsList(null); 70 | 71 | ModelAndView modelAndView=new ModelAndView(); 72 | modelAndView.addObject("itemsList",itemsList); 73 | //指定逻辑视图名itemsList.jsp 74 | modelAndView.setViewName("editItemsList"); 75 | 76 | return modelAndView; 77 | } 78 | 79 | //批量修改商品的提交 80 | 81 | @RequestMapping("/editItemsListSubmit") 82 | public String editItemsListSubmit(ItemsQueryVo itemsQueryVo) throws Exception{ 83 | return "success"; 84 | } 85 | 86 | 87 | //商品修改页面提示 88 | //使用method = RequestMethod.GET来限制使用get方法 89 | // @RequestMapping(value = "/editItems",method = RequestMethod.GET) 90 | // public ModelAndView editItems() throws Exception 91 | // { 92 | // ModelAndView modelAndView=new ModelAndView(); 93 | // 94 | // //调用service查询商品的信息 95 | // ItemsCustom itemsCustom=itemsService.findItemsById(1); 96 | // //将模型数据传到jsp 97 | // modelAndView.addObject("item",itemsCustom); 98 | // //指定逻辑视图名 99 | // modelAndView.setViewName("editItem"); 100 | // 101 | // return modelAndView; 102 | // } 103 | 104 | //方法返回字符串,字符串就是逻辑视图名,Model作用时将数据填充到request域,在页面显示 105 | @RequestMapping(value = "/editItems",method = RequestMethod.GET) 106 | public String editItems(Model model, Integer id) throws Exception 107 | { 108 | 109 | //将id传到页面 110 | model.addAttribute("id",id); 111 | 112 | //调用service查询商品的信息 113 | ItemsCustom itemsCustom=itemsService.findItemsById(id); 114 | 115 | 116 | 117 | model.addAttribute("itemsCustom",itemsCustom); 118 | 119 | return "editItem"; 120 | } 121 | 122 | //更具商品id查看商品信息rest接口 123 | //@requestMapping中指定restful方式的url中的参数,参数需要用{}包起来 124 | //@PathVariable将url中的参数和形参进行绑定 125 | @RequestMapping("/viewItems/{id}") 126 | public @ResponseBody ItemsCustom viewItems(@PathVariable("id") Integer id) throws Exception 127 | { 128 | //调用service查询商品的信息 129 | ItemsCustom itemsCustom=itemsService.findItemsById(id); 130 | 131 | 132 | return itemsCustom; 133 | } 134 | 135 | 136 | // @RequestMapping(value = "/editItems",method = RequestMethod.GET) 137 | // public void editItems(HttpServletRequest request, HttpServletResponse response, 138 | //// @RequestParam(value = "item_id",required = false,defaultValue = "1") 139 | // Integer id) throws Exception 140 | // { 141 | // 142 | // //调用service查询商品的信息 143 | // ItemsCustom itemsCustom=itemsService.findItemsById(id); 144 | // 145 | // request.setAttribute("item",itemsCustom); 146 | // 147 | // //zhuyi如果使用request转向页面,这里需要指定页面的完整路径 148 | // request.getRequestDispatcher("/WEB-INF/jsp/editItem.jsp").forward(request,response); 149 | // } 150 | 151 | //商品提交页面 152 | //itemsQueryVo是包装类型的pojo 153 | //在@Validated中定义使用ValidGroup1组下边的校验 154 | @RequestMapping("/editItemSubmit") 155 | public String editItemSubmit(Model model,Integer id, 156 | @Validated(value = {ValidGroup1.class}) @ModelAttribute(value = "itemsCustom") ItemsCustom itemsCustom, 157 | BindingResult bindingResult, 158 | //上传图片 159 | MultipartFile pictureFile 160 | ) throws Exception 161 | { 162 | //输出校验错误信息 163 | //如果参数绑定时出错 164 | if (bindingResult.hasErrors()) 165 | { 166 | //获取错误 167 | List errors=bindingResult.getAllErrors(); 168 | 169 | model.addAttribute("errors",errors); 170 | 171 | for (ObjectError error:errors) 172 | { 173 | //输出错误信息 174 | System.out.println(error.getDefaultMessage()); 175 | } 176 | 177 | //如果校验错误,仍然回到商品修改页面 178 | return "editItem"; 179 | 180 | } 181 | 182 | 183 | //进行数据回显 184 | model.addAttribute("id",id); 185 | // model.addAttribute("item",itemsCustom); 186 | 187 | //进行图片的上传 188 | if (pictureFile!=null&&pictureFile.getOriginalFilename()!=null&&pictureFile.getOriginalFilename().length()>0) 189 | { 190 | //图片上传成功后,将图片的地址写到数据库 191 | String filePath="/Users/codingBoy/Pictures/"; 192 | String originalFilename=pictureFile.getOriginalFilename(); 193 | 194 | String newFileName= UUID.randomUUID()+originalFilename.substring(originalFilename.lastIndexOf(".")); 195 | 196 | //新文件 197 | File file=new File(filePath+newFileName); 198 | 199 | //将内存中的文件写入磁盘 200 | pictureFile.transferTo(file); 201 | 202 | //图片上传成功 203 | itemsCustom.setPic(newFileName); 204 | } 205 | 206 | 207 | itemsService.updateItems(id,itemsCustom); 208 | //请求转发 209 | // return "forward:queryItems.action"; 210 | 211 | 212 | // return "editItem"; 213 | //重定向 214 | return "redirect:queryItems.action"; 215 | } 216 | // 217 | // //自定义属性编辑器 218 | // @InitBinder 219 | // public void initBinder(WebDataBinder binder) throws Exception{ 220 | // 221 | // //Date.class必须是与controller方法形参pojo属性一致的date类型,这里是java.util.Date 222 | // binder.registerCustomEditor(Date.class,new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"),true)); 223 | // 224 | // } 225 | 226 | //删除商品 227 | @RequestMapping("/deleteItems") 228 | public String deleteItems(Integer[] delete_id) throws Exception 229 | { 230 | //调用serive方法删除商品 231 | 232 | return "success"; 233 | } 234 | } 235 | -------------------------------------------------------------------------------- /src/controller/JsonTest.java: -------------------------------------------------------------------------------- 1 | package 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 | import po.ItemsCustom; 8 | 9 | /** 10 | * Created by codingBoy on 16/11/18. 11 | */ 12 | @Controller 13 | public class JsonTest 14 | { 15 | 16 | //请求的json响应json,请求商品信息,商品信息用json格式输出商品信息 17 | @RequestMapping("/requestJson") 18 | public @ResponseBody ItemsCustom requestJson(@RequestBody ItemsCustom itemsCustom) throws Exception{ 19 | 20 | 21 | 22 | return itemsCustom; 23 | } 24 | 25 | //请求key/value响应json 26 | @RequestMapping("/responseJson") 27 | public @ResponseBody ItemsCustom responseJson(ItemsCustom itemsCustom) throws Exception{ 28 | 29 | return itemsCustom; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/controller/LoginController.java: -------------------------------------------------------------------------------- 1 | package controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | import javax.servlet.http.HttpSession; 7 | 8 | /** 9 | * Created by codingBoy on 16/11/18. 10 | * 完成登陆和退出 11 | */ 12 | @Controller 13 | public class LoginController 14 | { 15 | 16 | //用户登陆提交方法 17 | @RequestMapping("/login") 18 | public String login(HttpSession session,String usercode, String password) throws Exception 19 | { 20 | //调用service校验用户帐号和密码的正确性 21 | //这个东西我们讲shiro的时候再写 22 | 23 | 24 | 25 | //如果service校验通过,将用户身份记录到session 26 | session.setAttribute("usercode",usercode); 27 | 28 | //重定向到商品查询页面 29 | return "redirect:/items/queryItems.action"; 30 | } 31 | 32 | //用户退出 33 | @RequestMapping("/logout") 34 | public String logout(HttpSession session) throws Exception 35 | { 36 | //session失效 37 | session.invalidate(); 38 | 39 | //重定向到商品查询页面 40 | return "redirect:/items/queryItems.action"; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/controller/converter/CustomDateConverter.java: -------------------------------------------------------------------------------- 1 | package controller.converter; 2 | 3 | 4 | 5 | import org.springframework.core.convert.converter.Converter; 6 | 7 | import java.text.SimpleDateFormat; 8 | import java.util.Date; 9 | 10 | /** 11 | * Created by codingBoy on 16/11/16. 12 | */ 13 | public class CustomDateConverter implements Converter { 14 | 15 | @Override 16 | public Date convert(String source) { 17 | 18 | try{ 19 | return new SimpleDateFormat("yyyy-MM-dd HH-mm-ss").parse(source); 20 | }catch (Exception e) 21 | { 22 | e.printStackTrace(); 23 | } 24 | 25 | return null; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/controller/converter/StringTrimConverter.java: -------------------------------------------------------------------------------- 1 | package controller.converter; 2 | 3 | 4 | 5 | import org.springframework.core.convert.converter.Converter; 6 | 7 | import java.text.SimpleDateFormat; 8 | import java.util.Date; 9 | 10 | /** 11 | * Created by codingBoy on 16/11/16. 12 | */ 13 | public class StringTrimConverter implements Converter { 14 | 15 | @Override 16 | public String convert(String source) { 17 | 18 | try{ 19 | //去掉字符串两边的空格,如果去除后为空则返回null 20 | if (source!=null) 21 | { 22 | source=source.trim(); 23 | if (source.equals("")) 24 | return null; 25 | } 26 | }catch (Exception e) 27 | { 28 | e.printStackTrace(); 29 | } 30 | 31 | return source; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/controller/interceptor/HandlerInterceptor1.java: -------------------------------------------------------------------------------- 1 | package controller.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | /** 10 | * Created by codingBoy on 16/11/18. 11 | */ 12 | public class HandlerInterceptor1 implements HandlerInterceptor 13 | { 14 | //在执行handler之前来执行的 15 | //用于用户认证校验、用户权限校验 16 | @Override 17 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 18 | 19 | System.out.println("HandlerInterceptor1...preHander"); 20 | //返回false表示进行拦截,不继续执行handler。返回true表示不进行拦截,继续执行handler 21 | return false; 22 | } 23 | 24 | 25 | //在执行handerl但是返回modelandview之前来执行 26 | //如果需要向页面提供一些公用的数据或配置一些视图信息,使用此方法实现从modelAndView入手 27 | @Override 28 | public void postHandle(HttpServletRequest request, 29 | HttpServletResponse response, Object handler, 30 | ModelAndView modelAndView) throws Exception { 31 | 32 | System.out.println("HandlerInterceptor1....postHandle"); 33 | } 34 | 35 | 36 | //执行handler之后执行此方法 37 | //做系统统一异常处理,进行方法执行性能监控,在prehandler中设置一个时间点,在afterCompletion设置一个时间点,两个时间点的差就是执行时长 38 | //实现系统统一日志记录 39 | @Override 40 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, 41 | Exception ex) throws Exception { 42 | 43 | System.out.println("HandlerInterceptor1....afterCompletion"); 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/controller/interceptor/HandlerInterceptor2.java: -------------------------------------------------------------------------------- 1 | package controller.interceptor; 2 | 3 | import org.springframework.web.servlet.HandlerInterceptor; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | /** 10 | * Created by codingBoy on 16/11/18. 11 | */ 12 | public class HandlerInterceptor2 implements HandlerInterceptor 13 | { 14 | //在执行handler之前来执行的 15 | //用于用户认证校验、用户权限校验 16 | @Override 17 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 18 | 19 | 20 | System.out.println("HandlerInterceptor2....postHandle"); 21 | 22 | //返回false表示拦截不继续执行handler,返回true表示放行 23 | return false; 24 | } 25 | 26 | 27 | //在执行handerl但是返回modelandview之前来执行 28 | //如果需要向页面提供一些公用的数据或配置一些视图信息,使用此方法实现从modelAndView入手 29 | @Override 30 | public void postHandle(HttpServletRequest request, 31 | HttpServletResponse response, Object handler, 32 | ModelAndView modelAndView) throws Exception { 33 | 34 | System.out.println("HandlerInterceptor2....postHandler"); 35 | 36 | } 37 | 38 | 39 | //执行handler之后执行此方法 40 | //做系统统一异常处理,进行方法执行性能监控,在prehandler中设置一个时间点,在afterCompletion设置一个时间点,两个时间点的差就是执行时长 41 | //实现系统统一日志记录 42 | @Override 43 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, 44 | Exception ex) throws Exception { 45 | 46 | System.out.println("HandlerInterceptor2....afterCompletion"); 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/controller/interceptor/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package controller.interceptor; 2 | 3 | import org.springframework.beans.support.PagedListHolder; 4 | import org.springframework.web.servlet.HandlerInterceptor; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | import javax.servlet.http.HttpSession; 10 | 11 | /** 12 | * Created by codingBoy on 16/11/18. 13 | */ 14 | public class LoginInterceptor implements HandlerInterceptor 15 | { 16 | //在执行handler之前来执行的 17 | //用于用户认证校验、用户权限校验 18 | @Override 19 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { 20 | 21 | String url=request.getRequestURI(); 22 | 23 | //判断是否是公开地址 24 | //世纪开发中需要将公开地址配置在配置文件中 25 | 26 | if (url.indexOf("login.action")>=0) 27 | { 28 | //如果是公开地址则放行 29 | return true; 30 | } 31 | 32 | //判断用户身份在session中是否存在 33 | HttpSession session=request.getSession(); 34 | String usercode= (String) session.getAttribute("usercode"); 35 | 36 | //如果用户身份在session中存在则放行 37 | if (usercode!=null) 38 | { 39 | return true; 40 | } 41 | 42 | //执行到这里就拦截,跳转到登陆页面,用户进行登陆 43 | request.getRequestDispatcher("/WEB-INF/jsp/login.jsp").forward(request,response); 44 | 45 | return false; 46 | } 47 | 48 | 49 | //在执行handerl但是返回modelandview之前来执行 50 | //如果需要向页面提供一些公用的数据或配置一些视图信息,使用此方法实现从modelAndView入手 51 | @Override 52 | public void postHandle(HttpServletRequest request, 53 | HttpServletResponse response, Object handler, 54 | ModelAndView modelAndView) throws Exception { 55 | 56 | System.out.println("HandlerInterceptor1....postHandle"); 57 | } 58 | 59 | 60 | //执行handler之后执行此方法 61 | //做系统统一异常处理,进行方法执行性能监控,在prehandler中设置一个时间点,在afterCompletion设置一个时间点,两个时间点的差就是执行时长 62 | //实现系统统一日志记录 63 | @Override 64 | public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, 65 | Exception ex) throws Exception { 66 | 67 | System.out.println("HandlerInterceptor1....afterCompletion"); 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/controller/propertyeditor/CustomPropertyEditor.java: -------------------------------------------------------------------------------- 1 | package controller.propertyeditor; 2 | 3 | import org.springframework.beans.PropertyEditorRegistrar; 4 | import org.springframework.beans.PropertyEditorRegistry; 5 | import org.springframework.beans.propertyeditors.CustomDateEditor; 6 | 7 | import java.text.SimpleDateFormat; 8 | import java.util.Date; 9 | 10 | /** 11 | * Created by codingBoy on 16/11/16. 12 | */ 13 | public class CustomPropertyEditor implements PropertyEditorRegistrar 14 | { 15 | 16 | @Override 17 | public void registerCustomEditors(PropertyEditorRegistry binder) { 18 | binder.registerCustomEditor(Date.class,new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd HH-mm-ss"),true)); 19 | 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/controller/validation/ValidGroup1.java: -------------------------------------------------------------------------------- 1 | package controller.validation; 2 | 3 | /** 4 | * 校验分组,用于商品修改的校验 5 | * Created by codingBoy on 16/11/18. 6 | */ 7 | public interface ValidGroup1 8 | { 9 | //接口不定义方法,相当于接口就是个类型,只标识哪些校验规则属于该ValidGroup1分组 10 | } 11 | -------------------------------------------------------------------------------- /src/controller/validation/ValidGroup2.java: -------------------------------------------------------------------------------- 1 | package controller.validation; 2 | 3 | /** 4 | * 其他校验 5 | * Created by codingBoy on 16/11/18. 6 | */ 7 | public interface ValidGroup2 { 8 | } 9 | -------------------------------------------------------------------------------- /src/exception/CustomException.java: -------------------------------------------------------------------------------- 1 | package exception; 2 | 3 | /** 4 | * Created by codingBoy on 16/11/18. 5 | */ 6 | public class CustomException extends Exception 7 | { 8 | 9 | //异常信息 10 | private String message; 11 | 12 | public CustomException(String message) 13 | { 14 | super(message); 15 | this.message=message; 16 | 17 | } 18 | 19 | @Override 20 | public String getMessage() { 21 | return message; 22 | } 23 | 24 | public void setMessage(String message) { 25 | this.message = message; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/exception/CustomExceptionResolver.java: -------------------------------------------------------------------------------- 1 | package exception; 2 | 3 | import org.springframework.web.servlet.HandlerExceptionResolver; 4 | import org.springframework.web.servlet.ModelAndView; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | import java.io.IOException; 10 | 11 | /** 12 | * Created by codingBoy on 16/11/18. 13 | * 自定义异常处理器 14 | */ 15 | public class CustomExceptionResolver implements HandlerExceptionResolver 16 | { 17 | //前端控制器DispatcherServlet在进行HandlerMapping、 18 | // 调用HandlerAdapter执行Handler过程中,如果遇到异常就会执行此方法 19 | //参数中的handler是最终要执行的Handler,它的真实身份是HandlerMethod 20 | //ex就是接受到的异常信息 21 | @Override 22 | public ModelAndView resolveException(HttpServletRequest request, 23 | HttpServletResponse response, 24 | Object handler, Exception ex) { 25 | //输出异常 26 | ex.printStackTrace(); 27 | 28 | 29 | //统一异常处理代码 30 | //针对系统自定义的CustomException异常,就可以直接从一场中获取一场信息,将异常处理在错误页面展示 31 | //异常信息 32 | String message=null; 33 | CustomException customException=null; 34 | //如果ex是系统自定义的异常,我们就直接取出异常信息 35 | if (ex instanceof CustomException) 36 | { 37 | customException= (CustomException) ex; 38 | }else { 39 | customException=new CustomException("未知错误"); 40 | } 41 | 42 | //错误信息 43 | message=customException.getMessage(); 44 | 45 | request.setAttribute("message",message); 46 | 47 | 48 | try { 49 | //转向到错误页面 50 | request.getRequestDispatcher("/WEB-INF/jsp/error.jsp").forward(request,response); 51 | } catch (ServletException e) { 52 | e.printStackTrace(); 53 | } catch (IOException e) { 54 | e.printStackTrace(); 55 | } 56 | 57 | return new ModelAndView(); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/mapper/ItemsMapper.java: -------------------------------------------------------------------------------- 1 | package mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import po.Items; 6 | import po.ItemsExample; 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 | } -------------------------------------------------------------------------------- /src/mapper/ItemsMapperCustom.java: -------------------------------------------------------------------------------- 1 | package mapper; 2 | 3 | import po.ItemsCustom; 4 | import po.ItemsQueryVo; 5 | 6 | import java.util.List; 7 | 8 | 9 | /** 10 | * 11 | *

12 | * Title: ItemsMapperCustom 13 | *

14 | *

15 | * Description:商品自定义mapper 16 | *

17 | *

18 | * Company: www.itcast.com 19 | *

20 | * 21 | * @author 传智.燕青 22 | * @date 2015-3-20下午3:00:53 23 | * @version 1.0 24 | */ 25 | public interface ItemsMapperCustom { 26 | // 商品查询列表 27 | List findItemsList(ItemsQueryVo itemsQueryVo) 28 | throws Exception; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/mapper/ItemsMapperCustom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | and name like '%${itemsCustom.name}%' 15 | 16 | 17 | and id = #{itemsCustom.id} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/mapper/OrderdetailMapper.java: -------------------------------------------------------------------------------- 1 | package mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import po.Orderdetail; 6 | import po.OrderdetailExample; 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 | } -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/mapper/OrdersMapper.java: -------------------------------------------------------------------------------- 1 | package mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import po.Orders; 6 | import po.OrdersExample; 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 | } -------------------------------------------------------------------------------- /src/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package mapper; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import po.User; 6 | import po.UserExample; 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 | } -------------------------------------------------------------------------------- /src/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 | -------------------------------------------------------------------------------- /src/po/Items.java: -------------------------------------------------------------------------------- 1 | package po; 2 | 3 | import controller.validation.ValidGroup1; 4 | 5 | import javax.validation.constraints.NotNull; 6 | import javax.validation.constraints.Size; 7 | import java.util.Date; 8 | 9 | public class Items { 10 | private Integer id; 11 | 12 | @Size(min = 1,max = 30,message = "{items.name.length.error}",groups = {ValidGroup1.class}) 13 | private String name; 14 | 15 | private Float price; 16 | 17 | private String pic; 18 | 19 | //通过groups指定此校验属于哪个分组,当然可以指定多个分组 20 | @NotNull(message="{items.createtime.is.notnull}",groups = {ValidGroup1.class}) 21 | private Date createtime; 22 | 23 | private String detail; 24 | 25 | public Integer getId() { 26 | return id; 27 | } 28 | 29 | public void setId(Integer id) { 30 | this.id = id; 31 | } 32 | 33 | public String getName() { 34 | return name; 35 | } 36 | 37 | public void setName(String name) { 38 | this.name = name == null ? null : name.trim(); 39 | } 40 | 41 | public Float getPrice() { 42 | return price; 43 | } 44 | 45 | public void setPrice(Float price) { 46 | this.price = price; 47 | } 48 | 49 | public String getPic() { 50 | return pic; 51 | } 52 | 53 | public void setPic(String pic) { 54 | this.pic = pic == null ? null : pic.trim(); 55 | } 56 | 57 | public Date getCreatetime() { 58 | return createtime; 59 | } 60 | 61 | public void setCreatetime(Date createtime) { 62 | this.createtime = createtime; 63 | } 64 | 65 | public String getDetail() { 66 | return detail; 67 | } 68 | 69 | public void setDetail(String detail) { 70 | this.detail = detail == null ? null : detail.trim(); 71 | } 72 | } -------------------------------------------------------------------------------- /src/po/ItemsCustom.java: -------------------------------------------------------------------------------- 1 | package po; 2 | 3 | /** 4 | * 5 | *

Title: ItemsCustom

6 | *

Description:商品信息的扩展类

7 | *

Company: www.itcast.com

8 | * @author 传智.燕青 9 | * @date 2015-3-20下午2:54:23 10 | * @version 1.0 11 | */ 12 | public class ItemsCustom extends Items{ 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/po/ItemsQueryVo.java: -------------------------------------------------------------------------------- 1 | package po; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * 7 | *

Title: ItemsQueryVo

8 | *

Description: 商品的包装类

9 | *

Company: www.itcast.com

10 | * @author 传智.燕青 11 | * @date 2015-3-20下午2:52:00 12 | * @version 1.0 13 | */ 14 | public class ItemsQueryVo { 15 | 16 | //商品信息 17 | private ItemsCustom itemsCustom; 18 | 19 | //定义一个list 20 | private List itemsList; 21 | 22 | public List getItemsList() { 23 | return itemsList; 24 | } 25 | 26 | public void setItemsList(List itemsList) { 27 | this.itemsList = itemsList; 28 | } 29 | 30 | public ItemsCustom getItemsCustom() { 31 | return itemsCustom; 32 | } 33 | 34 | public void setItemsCustom(ItemsCustom itemsCustom) { 35 | this.itemsCustom = itemsCustom; 36 | } 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/po/Orderdetail.java: -------------------------------------------------------------------------------- 1 | package po; 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 | } -------------------------------------------------------------------------------- /src/po/Orders.java: -------------------------------------------------------------------------------- 1 | package po; 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 | } -------------------------------------------------------------------------------- /src/po/User.java: -------------------------------------------------------------------------------- 1 | package po; 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 | } -------------------------------------------------------------------------------- /src/service/ItemsService.java: -------------------------------------------------------------------------------- 1 | package service; 2 | 3 | import po.ItemsCustom; 4 | import po.ItemsQueryVo; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * Created by codingBoy on 16/11/15. 10 | * 商品的service接口 11 | */ 12 | 13 | public interface ItemsService { 14 | 15 | //商品的查询列表 16 | public List findItemsList(ItemsQueryVo itemsQueryVo) 17 | throws Exception; 18 | 19 | //根据商品id查询商品信息 20 | public ItemsCustom findItemsById(int id) throws Exception; 21 | 22 | //更新商品信息 23 | /** 24 | * 定义service接口,遵循单一职责,将业务参数细化(不要使用包装类型,比如map) 25 | * @param id 修改商品的id 26 | * @param itemsCustom 修改商品的信息 27 | * @throws Exception 28 | */ 29 | public void updateItems(Integer id,ItemsCustom itemsCustom) throws Exception; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/service/impl/ItemsServiceImpl.java: -------------------------------------------------------------------------------- 1 | package service.impl; 2 | 3 | import exception.CustomException; 4 | import mapper.ItemsMapper; 5 | import mapper.ItemsMapperCustom; 6 | import org.springframework.beans.BeanUtils; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import po.Items; 9 | import po.ItemsCustom; 10 | import po.ItemsQueryVo; 11 | import service.ItemsService; 12 | 13 | import java.util.List; 14 | 15 | /** 16 | * Created by codingBoy on 16/11/15. 17 | */ 18 | public class ItemsServiceImpl implements ItemsService { 19 | 20 | //注入mapper 21 | @Autowired 22 | private ItemsMapperCustom itemsMapperCustom; 23 | 24 | @Autowired 25 | private ItemsMapper itemsMapper; 26 | 27 | //商品的查询列表 28 | @Override 29 | public List findItemsList(ItemsQueryVo itemsQueryVo) throws Exception { 30 | 31 | return itemsMapperCustom.findItemsList(itemsQueryVo); 32 | } 33 | 34 | @Override 35 | public ItemsCustom findItemsById(int id) throws Exception { 36 | 37 | 38 | Items items=itemsMapper.selectByPrimaryKey(id); 39 | 40 | //如果查询的商品信息为空,抛出系统自定义的异常 41 | if (items==null) 42 | { 43 | throw new CustomException("修改商品信息不存在"); 44 | } 45 | 46 | //在这里以后随着需求的变化,需要查询商品的其它相关信息,返回到controller 47 | //所以这个时候用到扩展类更好,如下 48 | ItemsCustom itemsCustom=new ItemsCustom(); 49 | //将items的属性拷贝到itemsCustom 50 | BeanUtils.copyProperties(items,itemsCustom); 51 | 52 | return itemsCustom; 53 | } 54 | 55 | @Override 56 | public void updateItems(Integer id,ItemsCustom itemsCustom) throws Exception { 57 | 58 | //在service中一定要写业务代码 59 | 60 | 61 | 62 | 63 | //对于关键业务数据的非空校验 64 | if (id==null) 65 | { 66 | //抛出异常,提示调用接口的用户,id不能为空 67 | //... 68 | } 69 | 70 | itemsMapper.updateByPrimaryKeyWithBLOBs(itemsCustom); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/sql/sql_data.sql: -------------------------------------------------------------------------------- 1 | /* 2 | SQLyog v10.2 3 | MySQL - 5.1.72-community : Database - mybatis 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 | /*Data for the table `items` */ 16 | 17 | insert into `items`(`id`,`name`,`price`,`detail`,`pic`,`createtime`) values (1,'台式机',3000.0,'该电脑质量非常好!!!!',NULL,'2015-02-03 13:22:53'),(2,'笔记本',6000.0,'笔记本性能好,质量好!!!!!',NULL,'2015-02-09 13:22:57'),(3,'背包',200.0,'名牌背包,容量大质量好!!!!',NULL,'2015-02-06 13:23:02'); 18 | 19 | /*Data for the table `orderdetail` */ 20 | 21 | 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); 22 | 23 | /*Data for the table `orders` */ 24 | 25 | 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); 26 | 27 | /*Data for the table `user` */ 28 | 29 | 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); 30 | 31 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 32 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 33 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 34 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 35 | -------------------------------------------------------------------------------- /src/sql/sql_table.sql: -------------------------------------------------------------------------------- 1 | /* 2 | SQLyog v10.2 3 | MySQL - 5.1.72-community : Database - mybatis 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 | /*Table structure for table `items` */ 16 | 17 | CREATE TABLE `items` ( 18 | `id` int(11) NOT NULL AUTO_INCREMENT, 19 | `name` varchar(32) NOT NULL COMMENT '商品名称', 20 | `price` float(10,1) NOT NULL COMMENT '商品定价', 21 | `detail` text COMMENT '商品描述', 22 | `pic` varchar(64) DEFAULT NULL COMMENT '商品图片', 23 | `createtime` datetime NOT NULL COMMENT '生产日期', 24 | PRIMARY KEY (`id`) 25 | ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; 26 | 27 | /*Table structure for table `orderdetail` */ 28 | 29 | CREATE TABLE `orderdetail` ( 30 | `id` int(11) NOT NULL AUTO_INCREMENT, 31 | `orders_id` int(11) NOT NULL COMMENT '订单id', 32 | `items_id` int(11) NOT NULL COMMENT '商品id', 33 | `items_num` int(11) DEFAULT NULL COMMENT '商品购买数量', 34 | PRIMARY KEY (`id`), 35 | KEY `FK_orderdetail_1` (`orders_id`), 36 | KEY `FK_orderdetail_2` (`items_id`), 37 | CONSTRAINT `FK_orderdetail_1` FOREIGN KEY (`orders_id`) REFERENCES `orders` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, 38 | CONSTRAINT `FK_orderdetail_2` FOREIGN KEY (`items_id`) REFERENCES `items` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION 39 | ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; 40 | 41 | /*Table structure for table `orders` */ 42 | 43 | CREATE TABLE `orders` ( 44 | `id` int(11) NOT NULL AUTO_INCREMENT, 45 | `user_id` int(11) NOT NULL COMMENT '下单用户id', 46 | `number` varchar(32) NOT NULL COMMENT '订单号', 47 | `createtime` datetime NOT NULL COMMENT '创建订单时间', 48 | `note` varchar(100) DEFAULT NULL COMMENT '备注', 49 | PRIMARY KEY (`id`), 50 | KEY `FK_orders_1` (`user_id`), 51 | CONSTRAINT `FK_orders_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION 52 | ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; 53 | 54 | /*Table structure for table `user` */ 55 | 56 | CREATE TABLE `user` ( 57 | `id` int(11) NOT NULL AUTO_INCREMENT, 58 | `username` varchar(32) NOT NULL COMMENT '用户名称', 59 | `birthday` date DEFAULT NULL COMMENT '生日', 60 | `sex` char(1) DEFAULT NULL COMMENT '性别', 61 | `address` varchar(256) DEFAULT NULL COMMENT '地址', 62 | PRIMARY KEY (`id`) 63 | ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8; 64 | 65 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; 66 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; 67 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; 68 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; 69 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/CustomValidationMessages.properties: -------------------------------------------------------------------------------- 1 | #校验提示信息:items.name.length.error要写在java代码中 2 | items.name.length.error=商品名称的长度请限制在1到30个字符 3 | items.createtime.is.notnull=请输入商品的生产日期 -------------------------------------------------------------------------------- /web/WEB-INF/classes/config/db.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/mybatis 3 | jdbc.username=root 4 | jdbc.password=xiaxunwu1996. 5 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/config/log4j.properties: -------------------------------------------------------------------------------- 1 | # Global logging configuration\uff0c\u5efa\u8bae\u5f00\u53d1\u73af\u5883\u4e2d\u8981\u7528debug 2 | log4j.rootLogger=DEBUG, stdout 3 | # Console output... 4 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 5 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 6 | log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n 7 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/config/mybatis/SqlMapConfig.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/config/spring/applicationContext-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 44 | 45 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/config/spring/applicationContext-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/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 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/config/spring/springmvc.xml: -------------------------------------------------------------------------------- 1 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 118 | 120 | 121 | 122 | 5242880 123 | 124 | 125 | 126 | 127 | 128 | 129 | 131 | 132 | 133 | 134 | 135 | 136 | 138 | 139 | 140 | CustomValidationMessages 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/ItemsController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/ItemsController.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/JsonTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/JsonTest.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/LoginController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/LoginController.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/converter/CustomDateConverter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/converter/CustomDateConverter.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/converter/StringTrimConverter.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/converter/StringTrimConverter.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/interceptor/HandlerInterceptor1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/interceptor/HandlerInterceptor1.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/interceptor/HandlerInterceptor2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/interceptor/HandlerInterceptor2.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/interceptor/LoginInterceptor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/interceptor/LoginInterceptor.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/propertyeditor/CustomPropertyEditor.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/propertyeditor/CustomPropertyEditor.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/validation/ValidGroup1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/validation/ValidGroup1.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/controller/validation/ValidGroup2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/controller/validation/ValidGroup2.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/exception/CustomException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/exception/CustomException.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/exception/CustomExceptionResolver.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/exception/CustomExceptionResolver.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/mapper/ItemsMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/mapper/ItemsMapper.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/mapper/ItemsMapperCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/mapper/ItemsMapperCustom.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/mapper/ItemsMapperCustom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | and name like '%${itemsCustom.name}%' 15 | 16 | 17 | and id = #{itemsCustom.id} 18 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/mapper/OrderdetailMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/mapper/OrderdetailMapper.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/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 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/mapper/OrdersMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/mapper/OrdersMapper.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/mapper/UserMapper.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/mapper/UserMapper.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/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 | -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/Items.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/Items.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/ItemsCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/ItemsCustom.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/ItemsExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/ItemsExample$Criteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/ItemsExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/ItemsExample$Criterion.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/ItemsExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/ItemsExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/ItemsExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/ItemsExample.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/ItemsQueryVo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/ItemsQueryVo.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/Orderdetail.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/Orderdetail.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrderdetailExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrderdetailExample$Criteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrderdetailExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrderdetailExample$Criterion.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrderdetailExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrderdetailExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrderdetailExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrderdetailExample.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/Orders.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/Orders.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrdersExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrdersExample$Criteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrdersExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrdersExample$Criterion.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrdersExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrdersExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/OrdersExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/OrdersExample.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/User.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/UserExample$Criteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/UserExample$Criteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/UserExample$Criterion.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/UserExample$Criterion.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/UserExample$GeneratedCriteria.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/UserExample$GeneratedCriteria.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/po/UserExample.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/po/UserExample.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/service/ItemsService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/service/ItemsService.class -------------------------------------------------------------------------------- /web/WEB-INF/classes/service/impl/ItemsServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/classes/service/impl/ItemsServiceImpl.class -------------------------------------------------------------------------------- /web/WEB-INF/jsp/editItem.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 | 15 |
${error.defaultMessage}
16 |
17 |
18 | 19 | 修改商品信息: 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | 52 | 53 |
商品名称
商品价格
商品生产日期"/>
商品图片 36 | 37 | 38 |
39 |
40 | 41 |
商品简介 46 | 47 |
51 |
54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /web/WEB-INF/jsp/editItemsList.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 | 20 | 21 | 22 |
23 | 查询条件: 24 | 25 | 26 | 36 | 39 | 40 |
27 | 35 | 37 | 38 |
41 | 商品列表: 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 |
商品名称商品价格生产日期商品描述操作
${item.detail }修改
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /web/WEB-INF/jsp/error.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 错误信息 8 | 9 | 10 | ${message} 11 | 12 | -------------------------------------------------------------------------------- /web/WEB-INF/jsp/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 | 20 | 21 | 22 | 当前用户:${usercode} 23 | 24 | 退出 25 | 26 | 27 |
28 | 查询条件: 29 | 30 | 31 | 41 | 44 | 45 |
32 | 40 | 42 | 43 |
46 | 商品列表: 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 |
商品名称商品价格生产日期商品描述操作restful链接
${item.name }${item.price }${item.detail }修改商品查看
72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /web/WEB-INF/jsp/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 用户登陆 8 | 9 | 10 |
11 | 用户账号:
12 | 用户密码 :
13 | 14 |
15 | 16 | -------------------------------------------------------------------------------- /web/WEB-INF/jsp/success.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: codingBoy 4 | Date: 16/11/18 5 | Time: 下午1:53 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | Title 12 | 13 | 14 | 批量修改成功 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/WEB-INF/lib/aopalliance-1.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/aopalliance-1.0.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/asm-3.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/asm-3.3.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/aspectjweaver-1.6.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/aspectjweaver-1.6.11.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/cglib-2.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/cglib-2.2.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-dbcp-1.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/commons-dbcp-1.2.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-fileupload-1.3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/commons-fileupload-1.3.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-io-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/commons-io-2.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-logging-1.1.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/commons-logging-1.1.1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/commons-pool-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/commons-pool-1.3.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/hibernate-validator-4.3.0.Final.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/hibernate-validator-4.3.0.Final.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-core-asl-1.9.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/jackson-core-asl-1.9.11.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jackson-mapper-asl-1.9.11.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/jackson-mapper-asl-1.9.11.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/javassist-3.17.1-GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/javassist-3.17.1-GA.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/jboss-logging-3.1.0.CR2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/junit-4.9.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/junit-4.9.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/log4j-1.2.17.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/log4j-1.2.17.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/log4j-api-2.0-rc1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/log4j-api-2.0-rc1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/log4j-core-2.0-rc1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/log4j-core-2.0-rc1.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mybatis-3.2.7.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/mybatis-3.2.7.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mybatis-spring-1.2.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/mybatis-spring-1.2.2.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/mysql-connector-java-5.1.7-bin.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/slf4j-api-1.7.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/slf4j-api-1.7.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/slf4j-log4j12-1.7.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/slf4j-log4j12-1.7.5.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-aop-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-aspects-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-beans-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-context-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-context-support-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-core-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-expression-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-jdbc-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-orm-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-test-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-tx-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-web-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/spring-webmvc-3.2.0.RELEASE.jar -------------------------------------------------------------------------------- /web/WEB-INF/lib/validation-api-1.0.0.GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codingXiaxw/ssm2/0b42390e614da4b173d8d1aadba7278d67e06680/web/WEB-INF/lib/validation-api-1.0.0.GA.jar -------------------------------------------------------------------------------- /web/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | springmvc 8 | org.springframework.web.servlet.DispatcherServlet 9 | 10 | 11 | contextConfigLocation 12 | 14 | classpath:config/spring/springmvc.xml 15 | 16 | 17 | 18 | springmvc 19 | 22 | 23 | *.action 24 | 25 | 26 | 27 | 28 | 29 | contextConfigLocation 30 | /WEB-INF/classes/config/spring/applicationContext-*.xml 31 | 32 | 33 | org.springframework.web.context.ContextLoaderListener 34 | 35 | 36 | 37 | 38 | springmvc_rest 39 | org.springframework.web.servlet.DispatcherServlet 40 | 41 | 42 | contextConfigLocation 43 | 45 | classpath:config/spring/springmvc.xml 46 | 47 | 48 | 49 | springmvc_rest 50 | 53 | 54 | 55 | / 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /web/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | Created by IntelliJ IDEA. 3 | User: codingBoy 4 | Date: 16/11/15 5 | Time: 下午2:42 6 | To change this template use File | Settings | File Templates. 7 | --%> 8 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 9 | 10 | 11 | $Title$ 12 | 13 | 14 | $END$ 15 | 16 | 17 | -------------------------------------------------------------------------------- /web/jsontest.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | json测试 8 | 9 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | --------------------------------------------------------------------------------