溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

spring-boot-plus快速開始 Quick Start(一)

發(fā)布時(shí)間:2020-06-11 16:00:38 來源:網(wǎng)絡(luò) 閱讀:241 作者:geekidea 欄目:軟件技術(shù)

spring-boot-plus快速開始 Quick Start

1. clone項(xiàng)目到本地

git clone git@github.com:geekidea/spring-boot-plus.git

2. maven構(gòu)建

默認(rèn)使用local環(huán)境,對(duì)應(yīng)配置文件:application-local.yml

mvn clean package

3. 新建數(shù)據(jù)庫(kù)

數(shù)據(jù)庫(kù)MySQL

默認(rèn)數(shù)據(jù)庫(kù)名稱為:spring_boot_plus

導(dǎo)入表結(jié)構(gòu)和數(shù)據(jù):

spring-boot-plus\docs\spring_boot_plus.sql
-- ----------------------------
-- Table structure for ip
-- ----------------------------
DROP TABLE IF EXISTS `ip`;
CREATE TABLE `ip`  (
  `ip_start` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `ip_end` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `area` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `operator` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `ip_start_num` bigint(20) NOT NULL,
  `ip_end_num` bigint(20) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 526718 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log`  (
  `log_id` bigint(18) NOT NULL COMMENT '主鍵',
  `type` tinyint(1) NULL DEFAULT NULL COMMENT '類型',
  `content` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '內(nèi)容',
  `create_id` bigint(18) NULL DEFAULT NULL COMMENT '創(chuàng)建人ID',
  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP COMMENT '創(chuàng)建時(shí)間',
  PRIMARY KEY (`log_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系統(tǒng)日志' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_log
-- ----------------------------
INSERT INTO `sys_log` VALUES (1060438746056376321, 0, 'A', 100000, '2018-11-08 15:41:58');
INSERT INTO `sys_log` VALUES (1060438788502732802, 0, 'B', 100000, '2018-11-08 15:42:08');
INSERT INTO `sys_log` VALUES (1060438799600861185, 0, 'C', 100000, '2018-11-08 15:42:10');
INSERT INTO `sys_log` VALUES (1060438809495224322, 0, 'D', 100000, '2018-11-08 15:42:13');

ip表這里只有表結(jié)構(gòu),第一次使用項(xiàng)目時(shí),可以不用導(dǎo)入ip表數(shù)據(jù)!

https://github.com/geekidea/spring-boot-plus-doc/blob/master/db/ip_data.sql.zip

4. 啟動(dòng)redis

5. 檢查是否安裝lombok插件

如遇到log報(bào)錯(cuò),則需要安裝lombok插件

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI