6. 后台管理系统搭建
脚手架项目下载
在码云上搜索人人开源,我们使用renren-fast,renren-fast-vue项目。
git clone https://gitee.com/renrenio/renren-fast.git
git clone https://gitee.com/renrenio/renren-fast-vue.git
下载后把renren-fast移动到我们的项目文件夹(删掉.git文件),VUE项目需要使用VS Code打开,暂时不管。
项目文件处理
1. IDEA项目的聚合服务pom.xml文件中添加renren-fast模块
gulimall-coupon gulimall-member gulimall-order gulimall-product gulimall-ware renren-fast
2. 打开renren-fast/db/mysql.sql,复制全部,在sqlyog中创建库gulimall_admin并执行脚本(已贴在文章中,可以直接使用)。
1 -- 菜单 2 CREATE TABLE `sys_menu` ( 3 `menu_id` bigint NOT NULL AUTO_INCREMENT, 4 `parent_id` bigint COMMENT '父菜单ID,一级菜单为0', 5 `name` varchar(50) COMMENT '菜单名称', 6 `url` varchar(200) COMMENT '菜单URL', 7 `perms` varchar(500) COMMENT '授权(多个用逗号分隔,如:user:list,user:create)', 8 `type` int COMMENT '类型 0:目录 1:菜单 2:按钮', 9 `icon` varchar(50) COMMENT '菜单图标', 10 `order_num` int COMMENT '排序', 11 PRIMARY KEY (`menu_id`) 12 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='菜单管理'; 13 14 -- 系统用户 15 CREATE TABLE `sys_user` ( 16 `user_id` bigint NOT NULL AUTO_INCREMENT, 17 `username` varchar(50) NOT NULL COMMENT '用户名', 18 `password` varchar(100) COMMENT '密码', 19 `salt` varchar(20) COMMENT '盐', 20 `email` varchar(100) COMMENT '邮箱', 21 `mobile` varchar(100) COMMENT '手机号', 22 `status` tinyint COMMENT '状态 0:禁用 1:正常', 23 `create_user_id` bigint(20) COMMENT '创建者ID', 24 `create_time` datetime COMMENT '创建时间', 25 PRIMARY KEY (`user_id`), 26 UNIQUE INDEX (`username`) 27 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统用户'; 28 29 -- 系统用户Token 30 CREATE TABLE `sys_user_token` ( 31 `user_id` bigint(20) NOT NULL, 32 `token` varchar(100) NOT NULL COMMENT 'token', 33 `expire_time` datetime DEFAULT NULL COMMENT '过期时间', 34 `update_time` datetime DEFAULT NULL COMMENT '更新时间', 35 PRIMARY KEY (`user_id`), 36 UNIQUE KEY `token` (`token`) 37 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统用户Token'; 38 39 -- 系统验证码 40 CREATE TABLE `sys_captcha` ( 41 `uuid` char(36) NOT NULL COMMENT 'uuid', 42 `code` varchar(6) NOT NULL COMMENT '验证码', 43 `expire_time` datetime DEFAULT NULL COMMENT '过期时间', 44 PRIMARY KEY (`uuid`) 45 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统验证码'; 46 47 -- 角色 48 CREATE TABLE `sys_role` ( 49 `role_id` bigint NOT NULL AUTO_INCREMENT, 50 `role_name` varchar(100) COMMENT '角色名称', 51 `remark` varchar(100) COMMENT '备注', 52 `create_user_id` bigint(20) COMMENT '创建者ID', 53 `create_time` datetime COMMENT '创建时间', 54 PRIMARY KEY (`role_id`) 55 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='角色'; 56 57 -- 用户与角色对应关系 58 CREATE TABLE `sys_user_role` ( 59 `id` bigint NOT NULL AUTO_INCREMENT, 60 `user_id` bigint COMMENT '用户ID', 61 `role_id` bigint COMMENT '角色ID', 62 PRIMARY KEY (`id`) 63 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='用户与角色对应关系'; 64 65 -- 角色与菜单对应关系 66 CREATE TABLE `sys_role_menu` ( 67 `id` bigint NOT NULL AUTO_INCREMENT, 68 `role_id` bigint COMMENT '角色ID', 69 `menu_id` bigint COMMENT '菜单ID', 70 PRIMARY KEY (`id`) 71 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='角色与菜单对应关系'; 72 73 -- 系统配置信息 74 CREATE TABLE `sys_config` ( 75 `id` bigint NOT NULL AUTO_INCREMENT, 76 `param_key` varchar(50) COMMENT 'key', 77 `param_value` varchar(2000) COMMENT 'value', 78 `status` tinyint DEFAULT 1 COMMENT '状态 0:隐藏 1:显示', 79 `remark` varchar(500) COMMENT '备注', 80 PRIMARY KEY (`id`), 81 UNIQUE INDEX (`param_key`) 82 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统配置信息表'; 83 84 85 -- 系统日志 86 CREATE TABLE `sys_log` ( 87 `id` bigint(20) NOT NULL AUTO_INCREMENT, 88 `username` varchar(50) COMMENT '用户名', 89 `operation` varchar(50) COMMENT '用户操作', 90 `method` varchar(200) COMMENT '请求方法', 91 `params` varchar(5000) COMMENT '请求参数', 92 `time` bigint NOT NULL COMMENT '执行时长(毫秒)', 93 `ip` varchar(64) COMMENT 'IP地址', 94 `create_date` datetime COMMENT '创建时间', 95 PRIMARY KEY (`id`) 96 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='系统日志'; 97 98 99 -- 文件上传 100 CREATE TABLE `sys_oss` ( 101 `id` bigint(20) NOT NULL AUTO_INCREMENT, 102 `url` varchar(200) COMMENT 'URL地址', 103 `create_date` datetime COMMENT '创建时间', 104 PRIMARY KEY (`id`) 105 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='文件上传'; 106 107 108 -- 定时任务 109 CREATE TABLE `schedule_job` ( 110 `job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务id', 111 `bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称', 112 `params` varchar(2000) DEFAULT NULL COMMENT '参数', 113 `cron_expression` varchar(100) DEFAULT NULL COMMENT 'cron表达式', 114 `status` tinyint(4) DEFAULT NULL COMMENT '任务状态 0:正常 1:暂停', 115 `remark` varchar(255) DEFAULT NULL COMMENT '备注', 116 `create_time` datetime DEFAULT NULL COMMENT '创建时间', 117 PRIMARY KEY (`job_id`) 118 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务'; 119 120 -- 定时任务日志 121 CREATE TABLE `schedule_job_log` ( 122 `log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '任务日志id', 123 `job_id` bigint(20) NOT NULL COMMENT '任务id', 124 `bean_name` varchar(200) DEFAULT NULL COMMENT 'spring bean名称', 125 `params` varchar(2000) DEFAULT NULL COMMENT '参数', 126 `status` tinyint(4) NOT NULL COMMENT '任务状态 0:成功 1:失败', 127 `error` varchar(2000) DEFAULT NULL COMMENT '失败信息', 128 `times` int(11) NOT NULL COMMENT '耗时(单位:毫秒)', 129 `create_time` datetime DEFAULT NULL COMMENT '创建时间', 130 PRIMARY KEY (`log_id`), 131 KEY `job_id` (`job_id`) 132 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='定时任务日志'; 133 134 135 136 -- 用户表 137 CREATE TABLE `tb_user` ( 138 `user_id` bigint NOT NULL AUTO_INCREMENT, 139 `username` varchar(50) NOT NULL COMMENT '用户名', 140 `mobile` varchar(20) NOT NULL COMMENT '手机号', 141 `password` varchar(64) COMMENT '密码', 142 `create_time` datetime COMMENT '创建时间', 143 PRIMARY KEY (`user_id`), 144 UNIQUE INDEX (`username`) 145 ) ENGINE=`InnoDB` DEFAULT CHARACTER SET utf8mb4 COMMENT='用户'; 146 147 148 149 150 151 152 -- 初始数据 153 INSERT INTO `sys_user` (`user_id`, `username`, `password`, `salt`, `email`, `mobile`, `status`, `create_user_id`, `create_time`) VALUES ('1', 'admin', '9ec9750e709431dad22365cabc5c625482e574c74adaebba7dd02f1129e4ce1d', 'YzcmCZNvbXocrsz9dm8e', 'root@renren.io', '13612345678', '1', '1', '2016-11-11 11:11:11'); 154 155 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (1, 0, '系统管理', NULL, NULL, 0, 'system', 0); 156 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (2, 1, '管理员列表', 'sys/user', NULL, 1, 'admin', 1); 157 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (3, 1, '角色管理', 'sys/role', NULL, 1, 'role', 2); 158 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (4, 1, '菜单管理', 'sys/menu', NULL, 1, 'menu', 3); 159 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (5, 1, 'SQL监控', 'http://localhost:8080/renren-fast/druid/sql.html', NULL, 1, 'sql', 4); 160 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (6, 1, '定时任务', 'job/schedule', NULL, 1, 'job', 5); 161 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (7, 6, '查看', NULL, 'sys:schedule:list,sys:schedule:info', 2, NULL, 0); 162 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (8, 6, '新增', NULL, 'sys:schedule:save', 2, NULL, 0); 163 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (9, 6, '修改', NULL, 'sys:schedule:update', 2, NULL, 0); 164 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (10, 6, '删除', NULL, 'sys:schedule:delete', 2, NULL, 0); 165 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (11, 6, '暂停', NULL, 'sys:schedule:pause', 2, NULL, 0); 166 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (12, 6, '恢复', NULL, 'sys:schedule:resume', 2, NULL, 0); 167 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (13, 6, '立即执行', NULL, 'sys:schedule:run', 2, NULL, 0); 168 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (14, 6, '日志列表', NULL, 'sys:schedule:log', 2, NULL, 0); 169 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (15, 2, '查看', NULL, 'sys:user:list,sys:user:info', 2, NULL, 0); 170 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (16, 2, '新增', NULL, 'sys:user:save,sys:role:select', 2, NULL, 0); 171 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (17, 2, '修改', NULL, 'sys:user:update,sys:role:select', 2, NULL, 0); 172 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (18, 2, '删除', NULL, 'sys:user:delete', 2, NULL, 0); 173 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (19, 3, '查看', NULL, 'sys:role:list,sys:role:info', 2, NULL, 0); 174 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (20, 3, '新增', NULL, 'sys:role:save,sys:menu:list', 2, NULL, 0); 175 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (21, 3, '修改', NULL, 'sys:role:update,sys:menu:list', 2, NULL, 0); 176 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (22, 3, '删除', NULL, 'sys:role:delete', 2, NULL, 0); 177 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (23, 4, '查看', NULL, 'sys:menu:list,sys:menu:info', 2, NULL, 0); 178 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (24, 4, '新增', NULL, 'sys:menu:save,sys:menu:select', 2, NULL, 0); 179 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (25, 4, '修改', NULL, 'sys:menu:update,sys:menu:select', 2, NULL, 0); 180 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (26, 4, '删除', NULL, 'sys:menu:delete', 2, NULL, 0); 181 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (27, 1, '参数管理', 'sys/config', 'sys:config:list,sys:config:info,sys:config:save,sys:config:update,sys:config:delete', 1, 'config', 6); 182 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (29, 1, '系统日志', 'sys/log', 'sys:log:list', 1, 'log', 7); 183 INSERT INTO `sys_menu`(`menu_id`, `parent_id`, `name`, `url`, `perms`, `type`, `icon`, `order_num`) VALUES (30, 1, '文件上传', 'oss/oss', 'sys:oss:all', 1, 'oss', 6); 184 185 INSERT INTO `sys_config` (`param_key`, `param_value`, `status`, `remark`) VALUES ('CLOUD_STORAGE_CONFIG_KEY', '{\"aliyunAccessKeyId\":\"\",\"aliyunAccessKeySecret\":\"\",\"aliyunBucketName\":\"\",\"aliyunDomain\":\"\",\"aliyunEndPoint\":\"\",\"aliyunPrefix\":\"\",\"qcloudBucketName\":\"\",\"qcloudDomain\":\"\",\"qcloudPrefix\":\"\",\"qcloudSecretId\":\"\",\"qcloudSecretKey\":\"\",\"qiniuAccessKey\":\"NrgMfABZxWLo5B-YYSjoE8-AZ1EISdi1Z3ubLOeZ\",\"qiniuBucketName\":\"ios-app\",\"qiniuDomain\":\"http://7xqbwh.dl1.z0.glb.clouddn.com\",\"qiniuPrefix\":\"upload\",\"qiniuSecretKey\":\"uIwJHevMRWU0VLxFvgy0tAcOdGqasdtVlJkdy6vV\",\"type\":1}', '0', '云存储配置信息'); 186 INSERT INTO `schedule_job` (`bean_name`, `params`, `cron_expression`, `status`, `remark`, `create_time`) VALUES ('testTask', 'renren', '0 0/30 * * * ?', '0', '参数测试', now()); 187 188 189 -- 账号:13612345678 密码:admin 190 INSERT INTO `tb_user` (`username`, `mobile`, `password`, `create_time`) VALUES ('mark', '13612345678', '8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918', '2017-03-23 22:37:41'); 191 192 193 194 195 196 197 198 199 -- quartz自带表结构 200 CREATE TABLE QRTZ_JOB_DETAILS( 201 SCHED_NAME VARCHAR(120) NOT NULL, 202 JOB_NAME VARCHAR(200) NOT NULL, 203 JOB_GROUP VARCHAR(200) NOT NULL, 204 DESCRIPTION VARCHAR(250) NULL, 205 JOB_CLASS_NAME VARCHAR(250) NOT NULL, 206 IS_DURABLE VARCHAR(1) NOT NULL, 207 IS_NONCONCURRENT VARCHAR(1) NOT NULL, 208 IS_UPDATE_DATA VARCHAR(1) NOT NULL, 209 REQUESTS_RECOVERY VARCHAR(1) NOT NULL, 210 JOB_DATA BLOB NULL, 211 PRIMARY KEY (SCHED_NAME,JOB_NAME,JOB_GROUP)) 212 ENGINE=InnoDB DEFAULT CHARSET=utf8; 213 214 CREATE TABLE QRTZ_TRIGGERS ( 215 SCHED_NAME VARCHAR(120) NOT NULL, 216 TRIGGER_NAME VARCHAR(200) NOT NULL, 217 TRIGGER_GROUP VARCHAR(200) NOT NULL, 218 JOB_NAME VARCHAR(200) NOT NULL, 219 JOB_GROUP VARCHAR(200) NOT NULL, 220 DESCRIPTION VARCHAR(250) NULL, 221 NEXT_FIRE_TIME BIGINT(13) NULL, 222 PREV_FIRE_TIME BIGINT(13) NULL, 223 PRIORITY INTEGER NULL, 224 TRIGGER_STATE VARCHAR(16) NOT NULL, 225 TRIGGER_TYPE VARCHAR(8) NOT NULL, 226 START_TIME BIGINT(13) NOT NULL, 227 END_TIME BIGINT(13) NULL, 228 CALENDAR_NAME VARCHAR(200) NULL, 229 MISFIRE_INSTR SMALLINT(2) NULL, 230 JOB_DATA BLOB NULL, 231 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 232 FOREIGN KEY (SCHED_NAME,JOB_NAME,JOB_GROUP) 233 REFERENCES QRTZ_JOB_DETAILS(SCHED_NAME,JOB_NAME,JOB_GROUP)) 234 ENGINE=InnoDB DEFAULT CHARSET=utf8; 235 236 CREATE TABLE QRTZ_SIMPLE_TRIGGERS ( 237 SCHED_NAME VARCHAR(120) NOT NULL, 238 TRIGGER_NAME VARCHAR(200) NOT NULL, 239 TRIGGER_GROUP VARCHAR(200) NOT NULL, 240 REPEAT_COUNT BIGINT(7) NOT NULL, 241 REPEAT_INTERVAL BIGINT(12) NOT NULL, 242 TIMES_TRIGGERED BIGINT(10) NOT NULL, 243 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 244 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 245 REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) 246 ENGINE=InnoDB DEFAULT CHARSET=utf8; 247 248 CREATE TABLE QRTZ_CRON_TRIGGERS ( 249 SCHED_NAME VARCHAR(120) NOT NULL, 250 TRIGGER_NAME VARCHAR(200) NOT NULL, 251 TRIGGER_GROUP VARCHAR(200) NOT NULL, 252 CRON_EXPRESSION VARCHAR(120) NOT NULL, 253 TIME_ZONE_ID VARCHAR(80), 254 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 255 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 256 REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) 257 ENGINE=InnoDB DEFAULT CHARSET=utf8; 258 259 CREATE TABLE QRTZ_SIMPROP_TRIGGERS 260 ( 261 SCHED_NAME VARCHAR(120) NOT NULL, 262 TRIGGER_NAME VARCHAR(200) NOT NULL, 263 TRIGGER_GROUP VARCHAR(200) NOT NULL, 264 STR_PROP_1 VARCHAR(512) NULL, 265 STR_PROP_2 VARCHAR(512) NULL, 266 STR_PROP_3 VARCHAR(512) NULL, 267 INT_PROP_1 INT NULL, 268 INT_PROP_2 INT NULL, 269 LONG_PROP_1 BIGINT NULL, 270 LONG_PROP_2 BIGINT NULL, 271 DEC_PROP_1 NUMERIC(13,4) NULL, 272 DEC_PROP_2 NUMERIC(13,4) NULL, 273 BOOL_PROP_1 VARCHAR(1) NULL, 274 BOOL_PROP_2 VARCHAR(1) NULL, 275 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 276 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 277 REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) 278 ENGINE=InnoDB DEFAULT CHARSET=utf8; 279 280 CREATE TABLE QRTZ_BLOB_TRIGGERS ( 281 SCHED_NAME VARCHAR(120) NOT NULL, 282 TRIGGER_NAME VARCHAR(200) NOT NULL, 283 TRIGGER_GROUP VARCHAR(200) NOT NULL, 284 BLOB_DATA BLOB NULL, 285 PRIMARY KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP), 286 INDEX (SCHED_NAME,TRIGGER_NAME, TRIGGER_GROUP), 287 FOREIGN KEY (SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP) 288 REFERENCES QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP)) 289 ENGINE=InnoDB DEFAULT CHARSET=utf8; 290 291 CREATE TABLE QRTZ_CALENDARS ( 292 SCHED_NAME VARCHAR(120) NOT NULL, 293 CALENDAR_NAME VARCHAR(200) NOT NULL, 294 CALENDAR BLOB NOT NULL, 295 PRIMARY KEY (SCHED_NAME,CALENDAR_NAME)) 296 ENGINE=InnoDB DEFAULT CHARSET=utf8; 297 298 CREATE TABLE QRTZ_PAUSED_TRIGGER_GRPS ( 299 SCHED_NAME VARCHAR(120) NOT NULL, 300 TRIGGER_GROUP VARCHAR(200) NOT NULL, 301 PRIMARY KEY (SCHED_NAME,TRIGGER_GROUP)) 302 ENGINE=InnoDB DEFAULT CHARSET=utf8; 303 304 CREATE TABLE QRTZ_FIRED_TRIGGERS ( 305 SCHED_NAME VARCHAR(120) NOT NULL, 306 ENTRY_ID VARCHAR(95) NOT NULL, 307 TRIGGER_NAME VARCHAR(200) NOT NULL, 308 TRIGGER_GROUP VARCHAR(200) NOT NULL, 309 INSTANCE_NAME VARCHAR(200) NOT NULL, 310 FIRED_TIME BIGINT(13) NOT NULL, 311 SCHED_TIME BIGINT(13) NOT NULL, 312 PRIORITY INTEGER NOT NULL, 313 STATE VARCHAR(16) NOT NULL, 314 JOB_NAME VARCHAR(200) NULL, 315 JOB_GROUP VARCHAR(200) NULL, 316 IS_NONCONCURRENT VARCHAR(1) NULL, 317 REQUESTS_RECOVERY VARCHAR(1) NULL, 318 PRIMARY KEY (SCHED_NAME,ENTRY_ID)) 319 ENGINE=InnoDB DEFAULT CHARSET=utf8; 320 321 CREATE TABLE QRTZ_SCHEDULER_STATE ( 322 SCHED_NAME VARCHAR(120) NOT NULL, 323 INSTANCE_NAME VARCHAR(200) NOT NULL, 324 LAST_CHECKIN_TIME BIGINT(13) NOT NULL, 325 CHECKIN_INTERVAL BIGINT(13) NOT NULL, 326 PRIMARY KEY (SCHED_NAME,INSTANCE_NAME)) 327 ENGINE=InnoDB DEFAULT CHARSET=utf8; 328 329 CREATE TABLE QRTZ_LOCKS ( 330 SCHED_NAME VARCHAR(120) NOT NULL, 331 LOCK_NAME VARCHAR(40) NOT NULL, 332 PRIMARY KEY (SCHED_NAME,LOCK_NAME)) 333 ENGINE=InnoDB DEFAULT CHARSET=utf8; 334 335 CREATE INDEX IDX_QRTZ_J_REQ_RECOVERY ON QRTZ_JOB_DETAILS(SCHED_NAME,REQUESTS_RECOVERY); 336 CREATE INDEX IDX_QRTZ_J_GRP ON QRTZ_JOB_DETAILS(SCHED_NAME,JOB_GROUP); 337 338 CREATE INDEX IDX_QRTZ_T_J ON QRTZ_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); 339 CREATE INDEX IDX_QRTZ_T_JG ON QRTZ_TRIGGERS(SCHED_NAME,JOB_GROUP); 340 CREATE INDEX IDX_QRTZ_T_C ON QRTZ_TRIGGERS(SCHED_NAME,CALENDAR_NAME); 341 CREATE INDEX IDX_QRTZ_T_G ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP); 342 CREATE INDEX IDX_QRTZ_T_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE); 343 CREATE INDEX IDX_QRTZ_T_N_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_STATE); 344 CREATE INDEX IDX_QRTZ_T_N_G_STATE ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_GROUP,TRIGGER_STATE); 345 CREATE INDEX IDX_QRTZ_T_NEXT_FIRE_TIME ON QRTZ_TRIGGERS(SCHED_NAME,NEXT_FIRE_TIME); 346 CREATE INDEX IDX_QRTZ_T_NFT_ST ON QRTZ_TRIGGERS(SCHED_NAME,TRIGGER_STATE,NEXT_FIRE_TIME); 347 CREATE INDEX IDX_QRTZ_T_NFT_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME); 348 CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_STATE); 349 CREATE INDEX IDX_QRTZ_T_NFT_ST_MISFIRE_GRP ON QRTZ_TRIGGERS(SCHED_NAME,MISFIRE_INSTR,NEXT_FIRE_TIME,TRIGGER_GROUP,TRIGGER_STATE); 350 351 CREATE INDEX IDX_QRTZ_FT_TRIG_INST_NAME ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME); 352 CREATE INDEX IDX_QRTZ_FT_INST_JOB_REQ_RCVRY ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,INSTANCE_NAME,REQUESTS_RECOVERY); 353 CREATE INDEX IDX_QRTZ_FT_J_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_NAME,JOB_GROUP); 354 CREATE INDEX IDX_QRTZ_FT_JG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,JOB_GROUP); 355 CREATE INDEX IDX_QRTZ_FT_T_G ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_NAME,TRIGGER_GROUP); 356 CREATE INDEX IDX_QRTZ_FT_TG ON QRTZ_FIRED_TRIGGERS(SCHED_NAME,TRIGGER_GROUP);
查看renren-fast项目里中的application.yml,发现使用的是dev环境,因此需要修改application-dev.yml中的内容。
url: jdbc:mysql://192.168.31.103:3306/gulimall_admin?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai username: root password: 123456
然后执行java下的RenrenApplication
浏览器输入http://localhost:8080/renren-fast/ 得到{“msg”:“invalid token”,“code”:401}就代表无误