Skip to content

Commit ddad31d

Browse files
committed
Merge remote-tracking branch 'origin/develop' into master
# Conflicts: # README.md
2 parents d4faf3b + effd477 commit ddad31d

File tree

137 files changed

+7829
-7835
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+7829
-7835
lines changed

README.md

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
# ssmbootstrap_table demo
2-
3-
## 技术栈/technology stack
4-
* spring+springmvc+mybatis
5-
* poi3
6-
* 自定义标签开发
7-
* bootstrap3/bootstrap-fileinput/jquery.fileupload
8-
* bootstrap-table1.9
9-
* druid
10-
* fastjson
11-
* weui
12-
* log4jdbc/log4jdbc-remix/log4jdbc-log4j2(show sql)
13-
* hibernate-validator
14-
* [spring-jsonp-support](https://github.com/bhagyas/spring-jsonp-support)
15-
* SUI mobile
16-
* lombok
17-
* ehcache
18-
* metrics
19-
* springfox
20-
* spring-websocket
21-
* zxing
22-
* jwebunit
23-
* mockito
24-
* itextpdf
25-
26-
# 微信扫码使用gitee工具
27-
![gitee工具](https://s1.ax1x.com/2018/08/10/P60MMF.jpg)
28-
29-
> ## github:[https://github.com/netbuffer/ssmbootstrap_table](https://github.com/netbuffer/ssmbootstrap_table)
30-
> ## git@osc:[https://gitee.com/netbuffer/ssmbootstrap_table](https://gitee.com/netbuffer/ssmbootstrap_table)
31-
32-
## How to run
33-
The project constructed by `maven`, please execute under the `src/main/java` `SQL script` to your `MySQL` database operation, and then modify the database configuration information `jdbc.properties` under the path `src/main/resource` configuration file in the project directory, enter, execute `mvn tomcat7:run` to run
34-
35-
## 运行
36-
项目采用`maven`构建,运行前请先执行`src/main/java`下的`sql`脚本到你的`mysql`数据库中,然后修改`src/main/resource`下的`jdbc.properties`配置文件中的数据库配置信息,进入项目目录,执行`mvn tomcat7:run`来运行
37-
38-
git->clone;eclipse->File->Import->Existing Maven projects,导入到eclipse后,等maven依赖下载完,右键项目,run as->maven build->tomcat7:run
39-
40-
# ![demo](src/main/webapp/image/demo.gif)
41-
42-
# ![数据列表页面](src/main/webapp/image/sys2.png)
43-
44-
metrics | @Timed
45-
---|---
46-
![metrics-servlet](src/main/webapp/image/metrics.png) | ![metrics-servlet](src/main/webapp/image/@Timed.png)
47-
48-
49-
# ![springfox](src/main/webapp/image/swagger.png)
50-
---
51-
>
52-
> * develop开发分支
53-
> * cxf test `apache cxf`
54-
> * JdbcTemplate(test spring `jdbctemplate`/test `shiro`)
55-
> * springtask(test spring `task`/`quartz`)
56-
> * velocity(test `velocity` template)
57-
> * swagger (test `swagger` api doc)
58-
59-
# other projects
60-
> `ssmbt(ssmbootstrap_table maven module )` github:[https://github.com/netbuffer/ssmbt](https://github.com/netbuffer/ssmbt)`/`git@osc:[https://gitee.com/netbuffer/ssmbt](https://gitee.com/netbuffer/ssmbt)
61-
62-
> `sssbootstrap_table(spring+springmvc+spring data jpa)` github:[https://github.com/netbuffer/sssbootstrap_table](https://github.com/netbuffer/sssbootstrap_table)`/`git@osc:[https://gitee.com/netbuffer/sssbootstrap_table](https://gitee.com/netbuffer/sssbootstrap_table)
63-
64-
> `sshbootstrap_table(spring+struts2+hibernate)` github:[https://github.com/netbuffer/sshbootstrap-table](https://github.com/netbuffer/sshbootstrap-table)`/`git@osc:[https://gitee.com/netbuffer/sshbootstrap-table](https://gitee.com/netbuffer/sshbootstrap-table)
65-
66-
> `spring-boot-bootstrap_table(springboot)` github:[https://github.com/netbuffer/spring-boot-bootstrap_table](https://github.com/netbuffer/spring-boot-bootstrap_table)`/`git@osc:[https://gitee.com/netbuffer/spring-boot-bootstrap_table](https://gitee.com/netbuffer/spring-boot-bootstrap_table)
67-
68-
> `jfinal-bootstrap-table(jfinal)`github:[https://github.com/netbuffer/jfinal-bootstrap-table](https://github.com/netbuffer/jfinal-bootstrap-table)`/`git@osc:[http://gitee.com/netbuffer/jfinal-bootstrap-table](http://gitee.com/netbuffer/jfinal-bootstrap-table)
69-
1+
# ssmbootstrap_table demo
2+
3+
## 技术栈/technology stack
4+
* spring+springmvc+mybatis
5+
* poi3
6+
* 自定义标签开发
7+
* bootstrap3/bootstrap-fileinput/jquery.fileupload
8+
* bootstrap-table1.9
9+
* druid
10+
* fastjson
11+
* weui
12+
* log4jdbc/log4jdbc-remix/log4jdbc-log4j2(show sql)
13+
* hibernate-validator
14+
* [spring-jsonp-support](https://github.com/bhagyas/spring-jsonp-support)
15+
* SUI mobile
16+
* lombok
17+
* ehcache
18+
* metrics
19+
* springfox
20+
* spring-websocket
21+
* zxing
22+
* jwebunit
23+
* mockito
24+
* itextpdf
25+
26+
> ## github:[https://github.com/netbuffer/ssmbootstrap_table](https://github.com/netbuffer/ssmbootstrap_table)
27+
> ## git@osc:[https://gitee.com/netbuffer/ssmbootstrap_table](https://gitee.com/netbuffer/ssmbootstrap_table)
28+
29+
## Stargazers over time
30+
[![Stargazers over time](https://starchart.cc/netbuffer/ssmbootstrap_table.svg)](https://starchart.cc/netbuffer/ssmbootstrap_table)
31+
32+
## How to run
33+
The project constructed by `maven`, please execute under the `src/main/java` `SQL script` to your `MySQL` database operation, and then modify the database configuration information `jdbc.properties` under the path `src/main/resource` configuration file in the project directory, enter, execute `mvn tomcat7:run` to run
34+
35+
## 运行
36+
项目采用`maven`构建,运行前请先执行`src/main/java`下的`sql`脚本到你的`mysql`数据库中,然后修改`src/main/resource`下的`jdbc.properties`配置文件中的数据库配置信息,进入项目目录,执行`mvn tomcat7:run`来运行
37+
38+
git->clone;eclipse->File->Import->Existing Maven projects,导入到eclipse后,等maven依赖下载完,右键项目,run as->maven build->tomcat7:run
39+
40+
# ![demo](src/main/webapp/image/demo.gif)
41+
42+
# ![数据列表页面](src/main/webapp/image/sys2.png)
43+
44+
metrics | @Timed
45+
---|---
46+
![metrics-servlet](src/main/webapp/image/metrics.png) | ![metrics-servlet](src/main/webapp/image/@Timed.png)
47+
48+
49+
# ![springfox](src/main/webapp/image/swagger.png)
50+
---
51+
>
52+
> * develop开发分支
53+
> * cxf test `apache cxf`
54+
> * JdbcTemplate(test spring `jdbctemplate`/test `shiro`)
55+
> * springtask(test spring `task`/`quartz`)
56+
> * velocity(test `velocity` template)
57+
> * swagger (test `swagger` api doc)
58+
59+
# other projects
60+
> `ssmbt(ssmbootstrap_table maven module )` github:[https://github.com/netbuffer/ssmbt](https://github.com/netbuffer/ssmbt)`/`git@osc:[https://gitee.com/netbuffer/ssmbt](https://gitee.com/netbuffer/ssmbt)
61+
62+
> `sssbootstrap_table(spring+springmvc+spring data jpa)` github:[https://github.com/netbuffer/sssbootstrap_table](https://github.com/netbuffer/sssbootstrap_table)`/`git@osc:[https://gitee.com/netbuffer/sssbootstrap_table](https://gitee.com/netbuffer/sssbootstrap_table)
63+
64+
> `sshbootstrap_table(spring+struts2+hibernate)` github:[https://github.com/netbuffer/sshbootstrap-table](https://github.com/netbuffer/sshbootstrap-table)`/`git@osc:[https://gitee.com/netbuffer/sshbootstrap-table](https://gitee.com/netbuffer/sshbootstrap-table)
65+
66+
> `spring-boot-bootstrap_table(springboot)` github:[https://github.com/netbuffer/spring-boot-bootstrap_table](https://github.com/netbuffer/spring-boot-bootstrap_table)`/`git@osc:[https://gitee.com/netbuffer/spring-boot-bootstrap_table](https://gitee.com/netbuffer/spring-boot-bootstrap_table)
67+
68+
> `jfinal-bootstrap-table(jfinal)`github:[https://github.com/netbuffer/jfinal-bootstrap-table](https://github.com/netbuffer/jfinal-bootstrap-table)`/`git@osc:[http://gitee.com/netbuffer/jfinal-bootstrap-table](http://gitee.com/netbuffer/jfinal-bootstrap-table)
69+
7070
> `medoo_bootstrap_table(php5)`github:[https://github.com/netbuffer/medoo_bootstrap_table](https://github.com/netbuffer/medoo_bootstrap_table)`/`git@osc:[http://gitee.com/netbuffer/medoo_bootstrap_table](http://gitee.com/netbuffer/medoo_bootstrap_table)
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
### 备注
2-
* `FileUploadController`-文件上传测试,包括`jquery.fileupload`的使用
3-
* `JsonpController`-测试jsonp使用,spring-jsonp库的使用,原理就是通过`HttpServletResponseWrapper`修改响应
4-
* `ApiController`-@RestController注解测试,编写http接口使用很方便,开发restful接口好用
5-
* `GlobalExceptionController`-全局异常捕获处理
6-
* `TestController`-一些乱七八糟的测试...
7-
* `MySpringTextWsHandler`spring-websocket测试
8-
* `UserController`测试数据获取、json/pdf/excel视图
9-
---
10-
1+
### 备注
2+
* `FileUploadController`-文件上传测试,包括`jquery.fileupload`的使用
3+
* `JsonpController`-测试jsonp使用,spring-jsonp库的使用,原理就是通过`HttpServletResponseWrapper`修改响应
4+
* `ApiController`-@RestController注解测试,编写http接口使用很方便,开发restful接口好用
5+
* `GlobalExceptionController`-全局异常捕获处理
6+
* `TestController`-一些乱七八糟的测试...
7+
* `MySpringTextWsHandler`spring-websocket测试
8+
* `UserController`测试数据获取、json/pdf/excel视图
9+
---
10+
1111
> 使用idea编译工程需要在maven pom.xml中配置打包xml/properties资源,默认idea不打包,eclipse会打包
Lines changed: 95 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,96 @@
1-
CREATE TABLE `user` (
2-
`id` bigint(11) NOT NULL AUTO_INCREMENT,
3-
`name` varchar(50) NOT NULL COMMENT '姓名',
4-
`sex` varchar(2) NOT NULL COMMENT '性别',
5-
`age` int(3) NOT NULL COMMENT '年龄',
6-
`phone` varchar(11) NOT NULL DEFAULT '0' COMMENT '手机',
7-
`deliveryaddress` varchar(200) DEFAULT NULL COMMENT '收货地址',
8-
`adddate` int(11) NOT NULL COMMENT '添加时间',
9-
PRIMARY KEY (`id`)
10-
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
11-
12-
DROP TABLE IF EXISTS `address`;
13-
CREATE TABLE `address` (
14-
`user_id` bigint(20) DEFAULT NULL,
15-
`province` varchar(255) DEFAULT NULL,
16-
`city` varchar(255) DEFAULT NULL
17-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18-
19-
DROP TABLE IF EXISTS `menu`;
20-
CREATE TABLE `menu` (
21-
`id` bigint(20) NOT NULL DEFAULT '0',
22-
`name` varchar(255) DEFAULT NULL COMMENT '菜单名',
23-
`parent_id` bigint(20) DEFAULT NULL COMMENT '父id',
24-
PRIMARY KEY (`id`)
25-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26-
27-
-- ----------------------------
28-
-- Records of menu
29-
-- ----------------------------
30-
INSERT INTO `menu` VALUES ('1', 'menu', '0');
31-
INSERT INTO `menu` VALUES ('2', 'submenu', '1');
32-
33-
DROP TABLE IF EXISTS `card`;
34-
CREATE TABLE `card` (
35-
`user_id` bigint(20) NOT NULL DEFAULT '0',
36-
`card_no` varchar(255) DEFAULT NULL,
37-
PRIMARY KEY (`user_id`)
38-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
39-
40-
-- ----------------------------
41-
-- Records of card
42-
-- ----------------------------
43-
INSERT INTO `card` VALUES ('1', 'this is cardno');
44-
45-
-- ----------------------------
46-
-- Function structure for `fristPinyin`
47-
-- ----------------------------
48-
DROP FUNCTION IF EXISTS `fristPinyin`;
49-
DELIMITER ;;
50-
CREATE DEFINER=`root`@`%` FUNCTION `fristPinyin`(P_NAME VARCHAR(255)) RETURNS varchar(255) CHARSET utf8
51-
BEGIN
52-
DECLARE V_RETURN VARCHAR(255);
53-
SET V_RETURN = ELT(INTERVAL(CONV(HEX(left(CONVERT(P_NAME USING gbk),1)),16,10),
54-
0xB0A1,0xB0C5,0xB2C1,0xB4EE,0xB6EA,0xB7A2,0xB8C1,0xB9FE,0xBBF7,
55-
0xBFA6,0xC0AC,0xC2E8,0xC4C3,0xC5B6,0xC5BE,0xC6DA,0xC8BB,
56-
0xC8F6,0xCBFA,0xCDDA,0xCEF4,0xD1B9,0xD4D1),
57-
'A','B','C','D','E','F','G','H','J','K','L','M','N','O','P','Q','R','S','T','W','X','Y','Z');
58-
RETURN V_RETURN;
59-
END
60-
;;
61-
DELIMITER ;
62-
63-
CREATE TABLE if not exists `statistics` (
64-
`usertotal` bigint(20)
65-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
66-
67-
--触发器测试
68-
DROP TRIGGER IF EXISTS tri_countUserTotal;
69-
CREATE TRIGGER tri_countUserTotal AFTER
70-
INSERT ON USER
71-
FOR EACH ROW BEGIN DECLARE c int;
72-
SET c =
73-
(SELECT count(*)
74-
FROM USER);
75-
UPDATE STATISTICS
76-
SET usertotal = c; END;
77-
update statistics set usertotal=0;
78-
79-
CREATE DEFINER=`root`@`%` PROCEDURE `insert_touser`(in start int(10),in max_num int(10))
80-
begin
81-
declare i int default 0;
82-
-- set autocommit =0 把autocommit设置成0 不自动提交,循环完统一提交
83-
set autocommit = 0;
84-
repeat
85-
set i = i + 1;
86-
insert into user(name,phone,adddate) values ((start+i),'test',UNIX_TIMESTAMP(NOW()));
87-
until i = max_num
88-
end repeat;
89-
commit;
90-
end
91-
-- 添加1w个用户
92-
call insert_touser(1,10000);
93-
-- 锁表
94-
lock tables user read;
95-
lock tables user write;
1+
CREATE TABLE `user` (
2+
`id` bigint(11) NOT NULL AUTO_INCREMENT,
3+
`name` varchar(50) NOT NULL COMMENT '姓名',
4+
`sex` varchar(2) NOT NULL COMMENT '性别',
5+
`age` int(3) NOT NULL COMMENT '年龄',
6+
`phone` varchar(11) NOT NULL DEFAULT '0' COMMENT '手机',
7+
`deliveryaddress` varchar(200) DEFAULT NULL COMMENT '收货地址',
8+
`adddate` int(11) NOT NULL COMMENT '添加时间',
9+
PRIMARY KEY (`id`)
10+
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
11+
12+
DROP TABLE IF EXISTS `address`;
13+
CREATE TABLE `address` (
14+
`user_id` bigint(20) DEFAULT NULL,
15+
`province` varchar(255) DEFAULT NULL,
16+
`city` varchar(255) DEFAULT NULL
17+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
18+
19+
DROP TABLE IF EXISTS `menu`;
20+
CREATE TABLE `menu` (
21+
`id` bigint(20) NOT NULL DEFAULT '0',
22+
`name` varchar(255) DEFAULT NULL COMMENT '菜单名',
23+
`parent_id` bigint(20) DEFAULT NULL COMMENT '父id',
24+
PRIMARY KEY (`id`)
25+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26+
27+
-- ----------------------------
28+
-- Records of menu
29+
-- ----------------------------
30+
INSERT INTO `menu` VALUES ('1', 'menu', '0');
31+
INSERT INTO `menu` VALUES ('2', 'submenu', '1');
32+
33+
DROP TABLE IF EXISTS `card`;
34+
CREATE TABLE `card` (
35+
`user_id` bigint(20) NOT NULL DEFAULT '0',
36+
`card_no` varchar(255) DEFAULT NULL,
37+
PRIMARY KEY (`user_id`)
38+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
39+
40+
-- ----------------------------
41+
-- Records of card
42+
-- ----------------------------
43+
INSERT INTO `card` VALUES ('1', 'this is cardno');
44+
45+
-- ----------------------------
46+
-- Function structure for `fristPinyin`
47+
-- ----------------------------
48+
DROP FUNCTION IF EXISTS `fristPinyin`;
49+
DELIMITER ;;
50+
CREATE DEFINER=`root`@`%` FUNCTION `fristPinyin`(P_NAME VARCHAR(255)) RETURNS varchar(255) CHARSET utf8
51+
BEGIN
52+
DECLARE V_RETURN VARCHAR(255);
53+
SET V_RETURN = ELT(INTERVAL(CONV(HEX(left(CONVERT(P_NAME USING gbk),1)),16,10),
54+
0xB0A1,0xB0C5,0xB2C1,0xB4EE,0xB6EA,0xB7A2,0xB8C1,0xB9FE,0xBBF7,
55+
0xBFA6,0xC0AC,0xC2E8,0xC4C3,0xC5B6,0xC5BE,0xC6DA,0xC8BB,
56+
0xC8F6,0xCBFA,0xCDDA,0xCEF4,0xD1B9,0xD4D1),
57+
'A','B','C','D','E','F','G','H','J','K','L','M','N','O','P','Q','R','S','T','W','X','Y','Z');
58+
RETURN V_RETURN;
59+
END
60+
;;
61+
DELIMITER ;
62+
63+
CREATE TABLE if not exists `statistics` (
64+
`usertotal` bigint(20)
65+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
66+
67+
--触发器测试
68+
DROP TRIGGER IF EXISTS tri_countUserTotal;
69+
CREATE TRIGGER tri_countUserTotal AFTER
70+
INSERT ON USER
71+
FOR EACH ROW BEGIN DECLARE c int;
72+
SET c =
73+
(SELECT count(*)
74+
FROM USER);
75+
UPDATE STATISTICS
76+
SET usertotal = c; END;
77+
update statistics set usertotal=0;
78+
79+
CREATE DEFINER=`root`@`%` PROCEDURE `insert_touser`(in start int(10),in max_num int(10))
80+
begin
81+
declare i int default 0;
82+
-- set autocommit =0 把autocommit设置成0 不自动提交,循环完统一提交
83+
set autocommit = 0;
84+
repeat
85+
set i = i + 1;
86+
insert into user(name,phone,adddate) values ((start+i),'test',UNIX_TIMESTAMP(NOW()));
87+
until i = max_num
88+
end repeat;
89+
commit;
90+
end
91+
-- 添加1w个用户
92+
call insert_touser(1,10000);
93+
-- 锁表
94+
lock tables user read;
95+
lock tables user write;
9696
unlock tables;

0 commit comments

Comments
 (0)