Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump spring-web from 4.3.21.RELEASE to 6.0.0 #36

Open
wants to merge 387 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
387 commits
Select commit Hold shift + click to select a range
d47001b
Merge branch 'develop'
netbuffer Jun 26, 2016
7a856dc
test
netbuffer Jun 27, 2016
4c40830
RedirectAttributes
netbuffer Jun 29, 2016
42d2c89
use mybatis selectKey
Jul 1, 2016
210d3ab
update druid version
netbuffer Jul 1, 2016
82dd892
Merge branch 'develop'
netbuffer Jul 1, 2016
e7765bd
test Array
Jul 2, 2016
f5d0656
test
netbuffer Jul 3, 2016
4da48ce
Merge branch 'develop' of git@github.com:netbuffer/ssmbootstrap_table…
netbuffer Jul 3, 2016
1971337
spring ApplicationEvent
Jul 4, 2016
3e35b36
test
Jul 4, 2016
d265d61
update
netbuffer Jul 4, 2016
622c75e
Merge branch 'develop'
netbuffer Jul 4, 2016
09f72d1
prevent duplicate submission
Jul 5, 2016
58230bc
test
netbuffer Jul 5, 2016
c96955a
update
netbuffer Jul 5, 2016
65ab0db
ehcache
Jul 6, 2016
b780909
update
Jul 6, 2016
c3ba26f
Merge branch 'develop'
Jul 6, 2016
a3fa944
ResponseStatus
Jul 6, 2016
244cd86
token
Jul 6, 2016
5bc103a
ajax request
Jul 6, 2016
c3ea94e
token tip
Jul 6, 2016
b4d45f8
ehcache
Jul 6, 2016
085e81d
ehcache test
netbuffer Jul 6, 2016
c4838e4
Jul 7, 2016
36aabf0
Merge branch 'develop' of https://github.com/netbuffer/ssmbootstrap_t…
Jul 7, 2016
d9f4a97
cache
Jul 7, 2016
9ff163d
cache test
Jul 7, 2016
f326df2
test cache
netbuffer Jul 7, 2016
5536c7f
update
Jul 8, 2016
a3821fc
test
Jul 8, 2016
6eeef63
test transaction
Jul 8, 2016
adb46fc
spring profile
netbuffer Jul 9, 2016
9910344
test @transactional
netbuffer Jul 9, 2016
e64775e
metrics-spring
netbuffer Jul 10, 2016
a76a629
metrics-servlet
Jul 12, 2016
72ec330
update
Jul 12, 2016
706eb55
update
netbuffer Jul 12, 2016
e3de39e
Merge branch 'develop'
netbuffer Jul 12, 2016
d1cae2e
update readme
netbuffer Jul 12, 2016
0694588
Merge branch 'develop'
netbuffer Jul 12, 2016
4800c8e
add jsonpfilter
Jul 13, 2016
9b2fa4a
Merge branch 'develop'
Jul 13, 2016
e73b19f
fix
Jul 13, 2016
c074773
Merge branch 'develop'
Jul 13, 2016
e0666bf
update
Jul 13, 2016
f3fedcd
Merge branch 'develop'
netbuffer Jul 13, 2016
a8bb16a
test
Jul 15, 2016
54bf4c0
cookie httponly
Jul 16, 2016
d5c16fa
test
Jul 16, 2016
4d4803e
del cookie
netbuffer Jul 17, 2016
5e932af
test del jsessionid
netbuffer Jul 17, 2016
9b2e131
Merge branch 'develop'
netbuffer Jul 17, 2016
a51fc53
test springmvc async
Jul 19, 2016
3afa748
Merge branch 'develop' of https://github.com/netbuffer/ssmbootstrap_t…
Jul 19, 2016
4b867c8
async test
netbuffer Jul 19, 2016
eba4eb9
test
netbuffer Jul 19, 2016
2b73d4b
test
Jul 20, 2016
a3aac0f
update
netbuffer Jul 20, 2016
f735aa7
test maven plugin
Jul 21, 2016
adc9061
update
netbuffer Jul 21, 2016
6305be1
update
Jul 22, 2016
f997670
synchronize
Jul 23, 2016
64cca56
ueditor
Jul 25, 2016
8edfc09
Merge branch 'develop'
Jul 25, 2016
6cedc7e
update readme
Jul 26, 2016
5093bd4
Merge branch 'develop'
Jul 26, 2016
135a6f7
remember uri
Jul 26, 2016
68e130e
update
Jul 26, 2016
9790772
test
Jul 27, 2016
9ba7d51
test
Jul 28, 2016
4f00d41
test download
Jul 30, 2016
67fdc39
update
netbuffer Jul 30, 2016
ef6d03c
test
Aug 1, 2016
fc95883
springfox
Aug 2, 2016
25f5568
test
Aug 2, 2016
338e1ca
update readme
netbuffer Aug 2, 2016
d35a470
Merge branch 'develop'
netbuffer Aug 2, 2016
6da61f2
spring-websocket
Aug 3, 2016
ca4f344
test websocket sockjs
Aug 4, 2016
6c57d5c
Merge branch 'develop'
Aug 4, 2016
70a768c
cors-filter
Aug 4, 2016
6602f6b
update
Aug 5, 2016
8213710
Merge branch 'develop'
Aug 5, 2016
3946161
ant-path
Aug 5, 2016
3855210
zxing test
netbuffer Aug 7, 2016
036365f
Merge branch 'develop'
netbuffer Aug 7, 2016
1181bd9
zxing config
netbuffer Aug 8, 2016
16ca1fc
test httpservletrequestwrapper
netbuffer Aug 9, 2016
e405469
remove osc-maven
Aug 11, 2016
469e6a9
field array
netbuffer Aug 11, 2016
76efcbe
Merge branch 'develop'
netbuffer Aug 11, 2016
4694ef7
loginfilter use antpathmatch
netbuffer Aug 11, 2016
85e67bb
Merge branch 'develop'
netbuffer Aug 12, 2016
d679fa6
test beancopy
netbuffer Aug 12, 2016
daab915
testThumbnailator
netbuffer Aug 13, 2016
1f9b4ff
jquery ajax upload
netbuffer Aug 14, 2016
b205fe9
jq ajax upload test
netbuffer Aug 15, 2016
79ab7d6
jquery ajax uploads
netbuffer Aug 17, 2016
b600146
test multiupload
netbuffer Aug 18, 2016
e6519c7
mockito/jwebunit
netbuffer Aug 19, 2016
2c27a83
exclusion servlet dependence
netbuffer Aug 21, 2016
73bfad3
test
netbuffer Aug 21, 2016
087da8c
Merge branch 'develop'
netbuffer Aug 21, 2016
1d000a2
test pdfview
netbuffer Aug 22, 2016
90ed1d3
springmvc pdfview
netbuffer Aug 23, 2016
a31c2a8
test excel view
netbuffer Aug 23, 2016
95d7668
fix pdf cell chinese
netbuffer Aug 23, 2016
946c0d5
excel-view/mybatis sql split
netbuffer Aug 24, 2016
4c58399
fix excel view
netbuffer Aug 25, 2016
a9574e4
test synchronize
netbuffer Aug 25, 2016
186962e
fix excel export
netbuffer Aug 25, 2016
c1bfd58
mysql table lock
netbuffer Aug 25, 2016
c39d5af
Merge branch 'develop'
netbuffer Aug 25, 2016
0b1401a
fix
netbuffer Aug 25, 2016
27a2f21
Merge branch 'develop'
netbuffer Aug 25, 2016
205990c
update
netbuffer Aug 26, 2016
c31d095
Merge branch 'develop'
netbuffer Aug 26, 2016
e3f11de
update
netbuffer Aug 27, 2016
f8ad7d8
jdk ReentrantLock
netbuffer Aug 27, 2016
ff4a82d
add bootbox.js
netbuffer Aug 28, 2016
03576ce
add gitignore
netbuffer Aug 30, 2016
b77a56c
update gitignore
netbuffer Aug 31, 2016
46a20fe
Merge branch 'develop'
netbuffer Sep 4, 2016
bd65568
test ua
netbuffer Sep 5, 2016
cbd02df
test enum
netbuffer Sep 12, 2016
cc16c4d
lock table
netbuffer Sep 14, 2016
bda4260
update spring config
netbuffer Sep 18, 2016
96802be
Merge branch 'develop'
netbuffer Sep 18, 2016
2a506b4
qr color
netbuffer Sep 19, 2016
e1b32bd
watermark
netbuffer Sep 19, 2016
245e352
del
netbuffer Sep 19, 2016
e0b6267
add jsoup
netbuffer Sep 19, 2016
c71860e
update
netbuffer Sep 19, 2016
a2f4af3
fixed login
netbuffer Sep 20, 2016
3612454
test bootstrap-fileinput/@ModelAttribute
netbuffer Oct 11, 2016
886a651
Merge branch 'develop'
netbuffer Oct 11, 2016
52e2902
update
netbuffer Oct 11, 2016
993fab0
update
netbuffer Oct 12, 2016
559c8a4
Merge branch 'develop'
netbuffer Oct 12, 2016
ae01403
fix swagger-ui.html
netbuffer Oct 12, 2016
40fab2e
Merge branch 'develop'
netbuffer Oct 12, 2016
63514de
Merge branch 'master' of git@github.com:netbuffer/ssmbootstrap_table.git
netbuffer Oct 12, 2016
1953223
update
netbuffer Oct 14, 2016
7632d86
Merge branch 'develop'
netbuffer Oct 14, 2016
6d4292d
update readme
netbuffer Oct 18, 2016
10a32bd
Merge branch 'develop'
netbuffer Oct 18, 2016
52f5958
add enum
netbuffer Nov 5, 2016
0c046ce
test
netbuffer Nov 9, 2016
482fcda
add jQuery-Validation-Engine
netbuffer Nov 10, 2016
83e6258
Merge branch 'develop'
netbuffer Nov 10, 2016
9f8725b
Merge branch 'master' of
netbuffer Nov 10, 2016
b7c30b7
update
netbuffer Nov 10, 2016
614bf1b
update
netbuffer Nov 10, 2016
58f4b70
test DelegatingFilterProxy
netbuffer Nov 10, 2016
f186db0
Merge branch 'develop'
netbuffer Nov 10, 2016
e63b4e3
update
netbuffer Nov 14, 2016
1c267a0
test
netbuffer Nov 15, 2016
57e617e
Merge branch 'develop' of git@github.com:netbuffer/ssmbootstrap_table…
netbuffer Nov 15, 2016
c28619c
update readme
netbuffer Dec 1, 2016
65df1b7
update
netbuffer Dec 2, 2016
8421bd5
Merge branch 'develop'
netbuffer Dec 2, 2016
85c6ca0
adapter idea ide
netbuffer Dec 2, 2016
a0f8227
update remark
netbuffer Dec 2, 2016
e35bb19
Merge branch 'develop'
netbuffer Dec 2, 2016
18dc448
update
netbuffer Dec 2, 2016
46ece92
Merge branch 'develop'
netbuffer Dec 2, 2016
29d8745
Merge branch 'develop' of git@github.com:netbuffer/ssmbootstrap_table…
netbuffer Dec 2, 2016
d5bd427
update
netbuffer Dec 2, 2016
4a82ecf
update readme
netbuffer Dec 2, 2016
f298b39
test
netbuffer Dec 2, 2016
6da3494
Merge branch 'develop'
netbuffer Dec 2, 2016
3a24a4f
update
netbuffer Dec 4, 2016
28abc9d
Merge branch 'develop'
netbuffer Dec 4, 2016
3077b16
fix
netbuffer Dec 12, 2016
2fcc1f8
receive json str/json object
netbuffer Dec 12, 2016
977efb1
test controller aspect
netbuffer Dec 12, 2016
690bf5c
Merge branch 'develop' of git@github.com:netbuffer/ssmbootstrap_table…
netbuffer Dec 13, 2016
2040a6d
Merge branch 'develop'
netbuffer Dec 13, 2016
b598c53
fix
netbuffer Dec 14, 2016
3d9fc5f
update
netbuffer Jan 7, 2017
1d408dc
Merge remote-tracking branch 'origin/develop' into develop
netbuffer Jan 7, 2017
59ac2f4
Merge branch 'develop'
netbuffer Jan 7, 2017
4dcce56
test
netbuffer Jan 9, 2017
92ff184
Merge branch 'develop'
netbuffer Jan 9, 2017
cbda794
Merge remote-tracking branch 'origin/master'
netbuffer Jan 9, 2017
f41ecb5
update
netbuffer Jan 10, 2017
6f46244
update
netbuffer Jan 10, 2017
6a160e1
test @Async
netbuffer Jan 11, 2017
ca458ed
update
netbuffer Jan 11, 2017
9125cd7
update
netbuffer Jan 11, 2017
9d079e4
Merge remote-tracking branch 'origin/develop'
netbuffer Feb 15, 2017
bfd387e
update spring.profiles
netbuffer Feb 23, 2017
8b6813b
Merge remote-tracking branch 'remotes/origin/develop'
netbuffer Feb 23, 2017
c4b98b6
update logback config
netbuffer Mar 6, 2017
0d9f302
update
netbuffer Mar 6, 2017
30b6d6e
Merge branch 'develop'
netbuffer Mar 24, 2017
beb20de
update
netbuffer Apr 20, 2017
0cd3e99
update readme
netbuffer May 7, 2017
f2c59a7
Merge remote-tracking branch 'remotes/origin/develop'
netbuffer May 7, 2017
0512e96
ehcache get/put cache
netbuffer May 16, 2017
29b07c3
event
netbuffer May 17, 2017
ae3b830
update readme
netbuffer Jun 4, 2017
1d2decf
Merge remote-tracking branch 'remotes/origin/develop'
netbuffer Jun 4, 2017
77814e0
update readme
netbuffer Aug 26, 2017
da4430d
Merge remote-tracking branch 'remotes/origin/develop'
netbuffer Aug 26, 2017
5c3936b
remove useless code
netbuffer Aug 27, 2017
7089422
Merge remote-tracking branch 'origin/develop'
netbuffer Aug 27, 2017
df1c66c
fix ajaxfileupload
netbuffer Sep 2, 2017
f415fe6
remove cxf && update spring version
netbuffer Sep 2, 2017
7bc4e6c
Merge remote-tracking branch 'remotes/origin/develop'
netbuffer Sep 2, 2017
dd154b8
update readme
netbuffer Sep 3, 2017
04b7c0d
rename package
netbuffer Oct 26, 2017
3fccb2c
update LoginFilter
netbuffer Oct 26, 2017
40ad97b
update get static var
netbuffer Oct 26, 2017
cd910a0
Merge remote-tracking branch 'remotes/origin/develop'
netbuffer Oct 26, 2017
1dbbaa8
remove cxf.version
netbuffer Oct 26, 2017
44d1e33
fix login twice
netbuffer Oct 26, 2017
cbbd2cf
Merge remote-tracking branch 'origin/develop'
netbuffer Oct 26, 2017
474bc99
Merge remote-tracking branch 'origin/master'
netbuffer Oct 26, 2017
5ad643d
add project encoding
netbuffer Nov 22, 2017
09907aa
fastjson write null
netbuffer Nov 27, 2017
4b6ac3e
test DeferredResult
netbuffer Nov 27, 2017
cf4a114
Merge remote-tracking branch 'origin/develop'
netbuffer Nov 27, 2017
068cbcf
Merge remote-tracking branch 'origin/master'
netbuffer Nov 27, 2017
f2c6cc2
update
netbuffer Nov 29, 2017
2ceb447
Merge remote-tracking branch 'origin/develop'
netbuffer Nov 29, 2017
66d0c2f
Merge remote-tracking branch 'origin/master'
netbuffer Nov 29, 2017
4affb6b
jsp tag
netbuffer Dec 7, 2017
8dd4642
Merge remote-tracking branch 'origin/develop'
netbuffer Dec 7, 2017
9e0b6be
fix LoginEvent twice
netbuffer Dec 8, 2017
5890063
remove redundant
netbuffer Dec 8, 2017
0ff5739
Merge remote-tracking branch 'origin/develop'
netbuffer Dec 8, 2017
ef6dd27
color set
netbuffer Feb 10, 2018
5e81dbd
add static files
netbuffer Feb 10, 2018
d0e1d53
Merge remote-tracking branch 'origin/develop'
netbuffer Feb 10, 2018
f8f9f09
test ImageIO
netbuffer Mar 6, 2018
c0bbc5e
update git address
netbuffer Apr 3, 2018
6341fb7
Merge remote-tracking branch 'origin/develop' into develop
netbuffer Apr 3, 2018
57bb24d
Merge remote-tracking branch 'origin/develop'
netbuffer Apr 3, 2018
83e33eb
update
netbuffer Aug 10, 2018
038d156
update dependency version
netbuffer Dec 18, 2018
1284c3d
Merge remote-tracking branch 'origin/develop'
netbuffer Dec 18, 2018
5d9134f
add Stargazers over time
netbuffer Aug 27, 2019
01cc03e
update
netbuffer Aug 18, 2020
d0df8e5
Merge remote-tracking branch 'origin/develop' into master
netbuffer Aug 18, 2020
1531240
update
netbuffer Aug 18, 2020
73fffb5
Merge remote-tracking branch 'origin/develop' into master
netbuffer Aug 18, 2020
e9ad266
Bump spring-web from 4.3.21.RELEASE to 6.0.0
dependabot[bot] Dec 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
!/.gitignore
/target/
/catalina.base_IS_UNDEFINED/
/.classpath
/.project
/.settings/
/reports
/.pmd
/.springBeans
/.idea/
/ssmbootstrap_table.iml
86 changes: 70 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,70 @@
#ssmbootstrap_table demo
## 技术栈
* spring+springmvc+mybatis
* poi3
* 自定义标签开发
* bootstrap3
* bootstrap-table1.9
* druid
* weui
* log4jdbc

##How to run
项目采用maven构建,运行前请先执行src/main/java下的sql脚本到你的mysql数据库中,然后修改src/main/resource下的jdbc.properties配置文件中的数据库配置信息,进入项目目录,执行mvn tomcat7:run来运行

#![](src/main/webapp/image/sys1.png)
#![](src/main/webapp/image/sys2.png)
# ssmbootstrap_table demo

## 技术栈/technology stack
* spring+springmvc+mybatis
* poi3
* 自定义标签开发
* bootstrap3/bootstrap-fileinput/jquery.fileupload
* bootstrap-table1.9
* druid
* fastjson
* weui
* log4jdbc/log4jdbc-remix/log4jdbc-log4j2(show sql)
* hibernate-validator
* [spring-jsonp-support](https://github.com/bhagyas/spring-jsonp-support)
* SUI mobile
* lombok
* ehcache
* metrics
* springfox
* spring-websocket
* zxing
* jwebunit
* mockito
* itextpdf

> ## github:[https://github.com/netbuffer/ssmbootstrap_table](https://github.com/netbuffer/ssmbootstrap_table)
> ## git@osc:[https://gitee.com/netbuffer/ssmbootstrap_table](https://gitee.com/netbuffer/ssmbootstrap_table)

## Stargazers over time
[![Stargazers over time](https://starchart.cc/netbuffer/ssmbootstrap_table.svg)](https://starchart.cc/netbuffer/ssmbootstrap_table)

## How to run
The project constructed by `maven`, please execute under the `help directory` `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

## 运行
项目采用`maven`构建,运行前请先执行`help目录`下的`sql`脚本到你的`mysql`数据库中,然后修改`src/main/resource`下的`jdbc.properties`配置文件中的数据库配置信息,进入项目目录,执行`mvn tomcat7:run`来运行

git->clone;eclipse->File->Import->Existing Maven projects,导入到eclipse后,等maven依赖下载完,右键项目,run as->maven build->tomcat7:run

# ![demo](src/main/webapp/image/demo.gif)

# ![数据列表页面](src/main/webapp/image/sys2.png)

metrics | @Timed
---|---
![metrics-servlet](src/main/webapp/image/metrics.png) | ![metrics-servlet](src/main/webapp/image/@Timed.png)


# ![springfox](src/main/webapp/image/swagger.png)
---
>
> * develop开发分支
> * cxf test `apache cxf`
> * JdbcTemplate(test spring `jdbctemplate`/test `shiro`)
> * springtask(test spring `task`/`quartz`)
> * velocity(test `velocity` template)
> * swagger (test `swagger` api doc)

# other projects
> `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)

> `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)

> `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)

> `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)

> `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)

> `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)
11 changes: 11 additions & 0 deletions help/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### 备注
* `FileUploadController`-文件上传测试,包括`jquery.fileupload`的使用
* `JsonpController`-测试jsonp使用,spring-jsonp库的使用,原理就是通过`HttpServletResponseWrapper`修改响应
* `ApiController`-@RestController注解测试,编写http接口使用很方便,开发restful接口好用
* `GlobalExceptionController`-全局异常捕获处理
* `TestController`-一些乱七八糟的测试...
* `MySpringTextWsHandler`spring-websocket测试
* `UserController`测试数据获取、json/pdf/excel视图
---

> 使用idea编译工程需要在maven pom.xml中配置打包xml/properties资源,默认idea不打包,eclipse会打包
96 changes: 96 additions & 0 deletions help/db.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
CREATE TABLE `user` (
`id` bigint(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL COMMENT '姓名',
`sex` varchar(2) NOT NULL COMMENT '性别',
`age` int(3) NOT NULL COMMENT '年龄',
`phone` varchar(11) NOT NULL DEFAULT '0' COMMENT '手机',
`deliveryaddress` varchar(200) DEFAULT NULL COMMENT '收货地址',
`adddate` int(11) NOT NULL COMMENT '添加时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
`user_id` bigint(20) DEFAULT NULL,
`province` varchar(255) DEFAULT NULL,
`city` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
`id` bigint(20) NOT NULL DEFAULT '0',
`name` varchar(255) DEFAULT NULL COMMENT '菜单名',
`parent_id` bigint(20) DEFAULT NULL COMMENT '父id',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of menu
-- ----------------------------
INSERT INTO `menu` VALUES ('1', 'menu', '0');
INSERT INTO `menu` VALUES ('2', 'submenu', '1');

DROP TABLE IF EXISTS `card`;
CREATE TABLE `card` (
`user_id` bigint(20) NOT NULL DEFAULT '0',
`card_no` varchar(255) DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of card
-- ----------------------------
INSERT INTO `card` VALUES ('1', 'this is cardno');

-- ----------------------------
-- Function structure for `fristPinyin`
-- ----------------------------
DROP FUNCTION IF EXISTS `fristPinyin`;
DELIMITER ;;
CREATE DEFINER=`root`@`%` FUNCTION `fristPinyin`(P_NAME VARCHAR(255)) RETURNS varchar(255) CHARSET utf8
BEGIN
DECLARE V_RETURN VARCHAR(255);
SET V_RETURN = ELT(INTERVAL(CONV(HEX(left(CONVERT(P_NAME USING gbk),1)),16,10),
0xB0A1,0xB0C5,0xB2C1,0xB4EE,0xB6EA,0xB7A2,0xB8C1,0xB9FE,0xBBF7,
0xBFA6,0xC0AC,0xC2E8,0xC4C3,0xC5B6,0xC5BE,0xC6DA,0xC8BB,
0xC8F6,0xCBFA,0xCDDA,0xCEF4,0xD1B9,0xD4D1),
'A','B','C','D','E','F','G','H','J','K','L','M','N','O','P','Q','R','S','T','W','X','Y','Z');
RETURN V_RETURN;
END
;;
DELIMITER ;

CREATE TABLE if not exists `statistics` (
`usertotal` bigint(20)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--触发器测试
DROP TRIGGER IF EXISTS tri_countUserTotal;
CREATE TRIGGER tri_countUserTotal AFTER
INSERT ON USER
FOR EACH ROW BEGIN DECLARE c int;
SET c =
(SELECT count(*)
FROM USER);
UPDATE STATISTICS
SET usertotal = c; END;
update statistics set usertotal=0;

CREATE DEFINER=`root`@`%` PROCEDURE `insert_touser`(in start int(10),in max_num int(10))
begin
declare i int default 0;
-- set autocommit =0 把autocommit设置成0 不自动提交,循环完统一提交
set autocommit = 0;
repeat
set i = i + 1;
insert into user(name,phone,adddate) values ((start+i),'test',UNIX_TIMESTAMP(NOW()));
until i = max_num
end repeat;
commit;
end
-- 添加1w个用户
call insert_touser(1,10000);
-- 锁表
lock tables user read;
lock tables user write;
unlock tables;
34 changes: 34 additions & 0 deletions help/logback.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
CREATE TABLE logging_event
(
timestmp BIGINT NOT NULL,
formatted_message TEXT NOT NULL,
logger_name VARCHAR(254) NOT NULL,
level_string VARCHAR(254) NOT NULL,
thread_name VARCHAR(254),
reference_flag SMALLINT,
arg0 VARCHAR(254),
arg1 VARCHAR(254),
arg2 VARCHAR(254),
arg3 VARCHAR(254),
caller_filename VARCHAR(254) NOT NULL,
caller_class VARCHAR(254) NOT NULL,
caller_method VARCHAR(254) NOT NULL,
caller_line CHAR(4) NOT NULL,
event_id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY
);
CREATE TABLE logging_event_property
(
event_id BIGINT NOT NULL,
mapped_key VARCHAR(254) NOT NULL,
mapped_value TEXT,
PRIMARY KEY(event_id, mapped_key),
FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
);
CREATE TABLE logging_event_exception
(
event_id BIGINT NOT NULL,
i SMALLINT NOT NULL,
trace_line VARCHAR(254) NOT NULL,
PRIMARY KEY(event_id, i),
FOREIGN KEY (event_id) REFERENCES logging_event(event_id)
);
32 changes: 32 additions & 0 deletions help/mysql-util.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
-- 查询select次数
show GLOBAL status like 'com_select';
-- 查询insert次数
show GLOBAL status like 'com_insert';
-- 查询update次数
show GLOBAL status like 'com_update';
-- 查询delete次数
show GLOBAL status like 'com_delete';
-- 查询活跃连接
show status like 'connections';
-- 查询慢查询次数
show global status like 'slow_queries';
-- 查询慢查询设置
show variables like 'long_query_time';
-- 锁表/解锁使用http://www.111cn.net/database/mysql/55482.htm
-- 锁定数据表,避免在备份过程中,表被更新,这个时候insert update delete等操作会阻塞,直到UNLOCK TABLES;其它线程可以读不可写
LOCK TABLES user READ;
-- 当前线程拥有读写权限,其它线程不能进行读写
LOCK TABLES user WRITE;
-- 解锁表,释放当前线程加的锁
UNLOCK TABLES;

-- mysql行级锁
-- 启两个控制台窗口,执行,update都会成功
SELECT * FROM user WHERE id=2 FOR UPDATE;
update user set sex='男' where id=2;
--for update要放在一个事务中,这时候其它线程写操作会阻塞掉,普通select可以执行,执行select.. WHERE id=2 FOR UPDATE会被阻塞掉
begin
SELECT * FROM user WHERE id=2 FOR UPDATE;
update user set sex='女' where id=2;
commit;
end
Loading