Skip to content

Commit fb873f1

Browse files
committed
添加sql
1 parent ec75bcb commit fb873f1

File tree

4 files changed

+53
-65
lines changed

4 files changed

+53
-65
lines changed

assets/lg_user.sql

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
Navicat MySQL Data Transfer
3+
4+
Source Server : 台式机
5+
Source Server Version : 50630
6+
Source Host : 10.2.82.206:3306
7+
Source Database : letsgodb
8+
9+
Target Server Type : MYSQL
10+
Target Server Version : 50630
11+
File Encoding : 65001
12+
13+
Date: 2017-06-06 14:44:18
14+
*/
15+
16+
SET FOREIGN_KEY_CHECKS=0;
17+
18+
-- ----------------------------
19+
-- Table structure for lg_user
20+
-- ----------------------------
21+
DROP TABLE IF EXISTS `lg_user`;
22+
CREATE TABLE `lg_user` (
23+
`user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
24+
`account` varchar(20) NOT NULL DEFAULT '' COMMENT '账号',
25+
`password` varchar(32) NOT NULL DEFAULT '' COMMENT '密码',
26+
`salt` varchar(10) NOT NULL DEFAULT '' COMMENT '加密随机字符串',
27+
`nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '昵称',
28+
`email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱',
29+
`mobile` varchar(50) NOT NULL DEFAULT '' COMMENT '手机号',
30+
`last_login_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '上次登录时间',
31+
`last_login_ip` varchar(15) NOT NULL DEFAULT '' COMMENT '上次登录IP',
32+
`status` tinyint(11) NOT NULL DEFAULT '0' COMMENT '状态',
33+
`create_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
34+
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
35+
PRIMARY KEY (`user_id`),
36+
UNIQUE KEY `user_name` (`account`)
37+
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

jdbc/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
11
# spring+jdbc+freemarker 练习
2+
3+
## 1、导入练习的sql
4+
5+
导入github.com/shixinke/spring-practise/assets/lg_user.sql;
6+
7+
## 2、修改mysql连接配置文件
8+
9+
修改https://github.com/shixinke/spring-practise/tree/master/jdbc/src/main/resources/springworld-servlet.xml中的数据库配置部分
10+
11+
## 3、安装相关的框架
12+
13+
mvn install
14+
15+
## 4、启动项目
16+
17+
mvn tomcat7:run

jdbc/src/main/resources/mybatis-generator.xml

Lines changed: 0 additions & 43 deletions
This file was deleted.

jdbc/src/main/resources/mybatis.xml

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)