1 Star 0 Fork 4

MiOuge / springboot整合springsecurity,基于jwt和redis实现动态授权

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
test.sql 3.34 KB
一键复制 编辑 原始数据 按行查看 历史
donghaipeng 提交于 2020-12-07 16:59 . 提供sql
/*
Navicat Premium Data Transfer
Source Server : 卡口2
Source Server Type : MySQL
Source Server Version : 50149
Source Host : localhost:3306
Source Schema : test
Target Server Type : MySQL
Target Server Version : 50149
File Encoding : 65001
Date: 07/12/2020 16:58:26
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for authority
-- ----------------------------
DROP TABLE IF EXISTS `authority`;
CREATE TABLE `authority` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`permission_value` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of authority
-- ----------------------------
INSERT INTO `authority` VALUES (1, 'select');
INSERT INTO `authority` VALUES (2, 'delete');
INSERT INTO `authority` VALUES (3, 'update');
INSERT INTO `authority` VALUES (4, 'save');
-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES (1, '超级管理员');
INSERT INTO `role` VALUES (2, '普通管理员');
-- ----------------------------
-- Table structure for role_authority
-- ----------------------------
DROP TABLE IF EXISTS `role_authority`;
CREATE TABLE `role_authority` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` int(11) NOT NULL,
`authority_id` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of role_authority
-- ----------------------------
INSERT INTO `role_authority` VALUES (1, 1, '1');
INSERT INTO `role_authority` VALUES (2, 1, '2');
INSERT INTO `role_authority` VALUES (3, 1, '3');
INSERT INTO `role_authority` VALUES (4, 1, '4');
INSERT INTO `role_authority` VALUES (5, 2, '2');
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`password` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`role_id` int(11) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (1, 'admin', '$2a$10$N27u2mS/A.ZZw0qmgdesy.D.SdpOXRqicyexHdSC..W7KtnDRuEge', 1);
INSERT INTO `user` VALUES (2, 'dhp', '$2a$10$FwBAwmTa8cQyQg7ARlSIc.EcxQuPhLMnlCpKtCzy2RsysdY8l5OZe', 2);
INSERT INTO `user` VALUES (3, 'test', '$2a$10$OagKrZWQM4UNMozFmbeNyeG8KnMR4xlzk7J6TJ1zL.5ms3WWZev5y', 2);
SET FOREIGN_KEY_CHECKS = 1;
Java
1
https://gitee.com/miouge/security.git
git@gitee.com:miouge/security.git
miouge
security
springboot整合springsecurity,基于jwt和redis实现动态授权
master

搜索帮助