-- MySQL dump 10.14 Distrib 5.5.65-MariaDB, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: fly -- ------------------------------------------------------ -- Server version 5.7.30 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `admin_menu` -- DROP TABLE IF EXISTS `admin_menu`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_menu` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0', `sort` int(11) NOT NULL DEFAULT '0', `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `icon` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `uri` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `component` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `permission` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_menu` -- LOCK TABLES `admin_menu` WRITE; /*!40000 ALTER TABLE `admin_menu` DISABLE KEYS */; INSERT INTO `admin_menu` VALUES (2,0,2,'Admin','fa-tasks','','','','2020-11-26 17:06:23','2020-12-30 13:19:51'),(3,2,3,'Users','fa-users','auth/users','','','2020-12-30 13:19:51','2020-12-30 13:19:51'),(4,2,4,'Roles','fa-user','auth/roles','','','2020-12-30 13:19:51','2020-12-30 13:19:51'),(5,2,5,'Permission','fa-ban','auth/permissions','','','2020-12-30 13:19:51','2020-12-30 13:19:51'),(6,2,6,'Menu','fa-bars','auth/menu','','','2020-12-30 13:19:51','2020-12-30 13:19:51'),(7,2,7,'Operation log','fa-history','auth/logs','','','2020-12-30 13:19:51','2020-12-30 13:19:51'),(8,0,0,'首页','','11','','','2020-12-30 13:19:51','2020-12-30 13:19:51'); /*!40000 ALTER TABLE `admin_menu` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_operation_log` -- DROP TABLE IF EXISTS `admin_operation_log`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_operation_log` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT '0', `path` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `method` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `ip` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `input` text COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, KEY `admin_operation_log_user_id_index` (`user_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_operation_log` -- LOCK TABLES `admin_operation_log` WRITE; /*!40000 ALTER TABLE `admin_operation_log` DISABLE KEYS */; /*!40000 ALTER TABLE `admin_operation_log` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_permissions` -- DROP TABLE IF EXISTS `admin_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_permissions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '上级权限', `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `slug` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `http_method` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `http_path` text COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `admin_permissions_name_unique` (`name`) USING BTREE, UNIQUE KEY `admin_permissions_slug_unique` (`slug`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_permissions` -- LOCK TABLES `admin_permissions` WRITE; /*!40000 ALTER TABLE `admin_permissions` DISABLE KEYS */; INSERT INTO `admin_permissions` VALUES (1,0,'All permission','*','','/**','2020-12-30 13:19:52','2020-12-30 13:19:52'),(2,0,'Dashboard','dashboard','GET','/','2020-12-30 13:19:52','2020-12-30 13:19:52'),(3,0,'Login','auth.login','','/auth/login\r\n/auth/logout','2020-12-30 13:19:52','2020-12-30 13:19:52'),(4,0,'User setting','auth.setting','GET,PUT','/auth/setting','2020-12-30 13:19:52','2020-12-30 13:19:52'),(5,0,'Auth management','auth.management','','/auth/roles\r\n/auth/permissions\r\n/auth/menu\r\n/auth/logs','2020-12-30 13:19:52','2020-12-30 13:19:52'),(6,4,'测试权限','23523235','GET','/users**','2020-12-30 13:19:52','2020-12-30 13:19:52'),(7,4,'是的','sd','GET','sdgdg','2020-12-30 13:19:52','2020-12-30 13:19:52'),(8,2,'sdfgh','asdg','agha','ha','2020-12-30 13:19:52','2020-12-30 13:19:52'); /*!40000 ALTER TABLE `admin_permissions` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_role_menu` -- DROP TABLE IF EXISTS `admin_role_menu`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_role_menu` ( `role_id` int(11) NOT NULL DEFAULT '0', `menu_id` int(11) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, KEY `admin_role_menu_role_id_menu_id_index` (`role_id`,`menu_id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_role_menu` -- LOCK TABLES `admin_role_menu` WRITE; /*!40000 ALTER TABLE `admin_role_menu` DISABLE KEYS */; INSERT INTO `admin_role_menu` VALUES (1,2,'2020-12-30 13:19:52','2020-12-30 13:19:52'); /*!40000 ALTER TABLE `admin_role_menu` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_role_permissions` -- DROP TABLE IF EXISTS `admin_role_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_role_permissions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `role_id` int(11) NOT NULL DEFAULT '0', `permission_id` int(11) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, KEY `admin_role_permissions_role_id_permission_id_index` (`role_id`,`permission_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_role_permissions` -- LOCK TABLES `admin_role_permissions` WRITE; /*!40000 ALTER TABLE `admin_role_permissions` DISABLE KEYS */; INSERT INTO `admin_role_permissions` VALUES (13,1,1,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(14,1,5,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(15,2,1,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(16,2,2,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(17,2,3,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(18,2,4,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(19,2,5,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(20,2,6,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(21,2,7,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(22,2,8,'2020-12-30 13:19:52','2020-12-30 13:19:52'); /*!40000 ALTER TABLE `admin_role_permissions` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_role_users` -- DROP TABLE IF EXISTS `admin_role_users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_role_users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `role_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, KEY `admin_role_users_role_id_user_id_index` (`role_id`,`user_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_role_users` -- LOCK TABLES `admin_role_users` WRITE; /*!40000 ALTER TABLE `admin_role_users` DISABLE KEYS */; INSERT INTO `admin_role_users` VALUES (33,1,1,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(34,2,1,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(44,2,2,'2020-12-30 13:19:52','2020-12-30 13:19:52'); /*!40000 ALTER TABLE `admin_role_users` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_roles` -- DROP TABLE IF EXISTS `admin_roles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_roles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `slug` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `admin_roles_name_unique` (`name`) USING BTREE, UNIQUE KEY `admin_roles_slug_unique` (`slug`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_roles` -- LOCK TABLES `admin_roles` WRITE; /*!40000 ALTER TABLE `admin_roles` DISABLE KEYS */; INSERT INTO `admin_roles` VALUES (1,'Administrator','administrator','2020-12-30 13:19:52','2020-12-30 13:19:52'),(2,'test','test23','2020-12-30 13:19:52','2020-12-30 13:19:52'); /*!40000 ALTER TABLE `admin_roles` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_user_permissions` -- DROP TABLE IF EXISTS `admin_user_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_user_permissions` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT '0', `permission_id` int(11) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, KEY `admin_user_permissions_user_id_permission_id_index` (`user_id`,`permission_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=140 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_user_permissions` -- LOCK TABLES `admin_user_permissions` WRITE; /*!40000 ALTER TABLE `admin_user_permissions` DISABLE KEYS */; INSERT INTO `admin_user_permissions` VALUES (105,1,1,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(106,1,2,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(107,1,8,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(108,1,3,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(137,2,3,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(138,2,6,'2020-12-30 13:19:52','2020-12-30 13:19:52'),(139,2,5,'2020-12-30 13:19:52','2020-12-30 13:19:52'); /*!40000 ALTER TABLE `admin_user_permissions` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `admin_users` -- DROP TABLE IF EXISTS `admin_users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `admin_users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `password` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `avatar` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `admin_users_username_unique` (`username`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `admin_users` -- LOCK TABLES `admin_users` WRITE; /*!40000 ALTER TABLE `admin_users` DISABLE KEYS */; INSERT INTO `admin_users` VALUES (1,'admin','$2a$10$stu3n5ppS2KkPVyjLZrE.eCJ/P4OuoCOZP9ERdQJL633ZtKK2BRi2','dfgd2','','','2020-10-15 09:55:34','2020-10-29 19:46:32'),(2,'test','$2a$10$1Pc9sSC3L70HpWOX/ozL0ellERiPa3GAPJF8smtDfnZkqxgU89LKi','stst','','','2020-12-30 13:19:52','2020-11-02 17:27:01'); /*!40000 ALTER TABLE `admin_users` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `columns` -- DROP TABLE IF EXISTS `columns`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `columns` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `sort` int(11) NOT NULL DEFAULT '0', `status` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `columns` -- LOCK TABLES `columns` WRITE; /*!40000 ALTER TABLE `columns` DISABLE KEYS */; INSERT INTO `columns` VALUES (1,'技术',1,0),(2,'问答',4,0); /*!40000 ALTER TABLE `columns` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `friend_links` -- DROP TABLE IF EXISTS `friend_links`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `friend_links` ( `id` bigint(20) unsigned NOT NULL DEFAULT '0', `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `status` tinyint(255) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `friend_links` -- LOCK TABLES `friend_links` WRITE; /*!40000 ALTER TABLE `friend_links` DISABLE KEYS */; /*!40000 ALTER TABLE `friend_links` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `message_queue` -- DROP TABLE IF EXISTS `message_queue`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `message_queue` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `sender` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '发送人', `receiver` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '接收人', `type` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '类型', `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '标题', `content` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '内容', `attachment` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '附件', `status` tinyint(255) NOT NULL DEFAULT '0' COMMENT '状态', `fail_number` int(11) NOT NULL DEFAULT '0' COMMENT '失败次数', `fail_message` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '失败原因', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `message_queue` -- LOCK TABLES `message_queue` WRITE; /*!40000 ALTER TABLE `message_queue` DISABLE KEYS */; /*!40000 ALTER TABLE `message_queue` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `navigations` -- DROP TABLE IF EXISTS `navigations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `navigations` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(256) NOT NULL DEFAULT '' COMMENT '标题', `url` varchar(256) NOT NULL DEFAULT '' COMMENT 'Url', `sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序', `parent_id` int(11) NOT NULL DEFAULT '0' COMMENT '上级Id', `status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态 1 可用 0 禁用', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `navigations` -- LOCK TABLES `navigations` WRITE; /*!40000 ALTER TABLE `navigations` DISABLE KEYS */; INSERT INTO `navigations` VALUES (1,'首页','/',1,0,1),(2,'技术','/column/1',2,0,1),(3,'提问','/column/2',2,0,1); /*!40000 ALTER TABLE `navigations` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `oauth_account` -- DROP TABLE IF EXISTS `oauth_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `oauth_account` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL DEFAULT '0', `platform` varchar(16) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `openid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='第三方授权账户信息'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `oauth_account` -- LOCK TABLES `oauth_account` WRITE; /*!40000 ALTER TABLE `oauth_account` DISABLE KEYS */; /*!40000 ALTER TABLE `oauth_account` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `post_agree` -- DROP TABLE IF EXISTS `post_agree`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `post_agree` ( `id` bigint(20) NOT NULL DEFAULT '0', `user_id` bigint(20) NOT NULL DEFAULT '0', `post_id` bigint(20) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `post_id` (`post_id`,`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `post_agree` -- LOCK TABLES `post_agree` WRITE; /*!40000 ALTER TABLE `post_agree` DISABLE KEYS */; INSERT INTO `post_agree` VALUES (1345359389030092802,1336960357791449089,1336963516165324704,'2021-01-02 13:20:49'),(1345628173490008066,1336960357791449089,1336963516165324714,'2021-01-03 07:08:52'),(1345659228049690626,1336960357791449089,1336963516165324801,'2021-01-03 09:12:16'),(1345659977823473666,1336960357791449089,1336963516165324715,'2021-01-03 09:15:15'); /*!40000 ALTER TABLE `post_agree` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `post_auto_draft` -- DROP TABLE IF EXISTS `post_auto_draft`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `post_auto_draft` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT '0', `post_id` int(11) NOT NULL DEFAULT '0', `title` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `content` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='自动保存的草稿数据'; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `post_auto_draft` -- LOCK TABLES `post_auto_draft` WRITE; /*!40000 ALTER TABLE `post_auto_draft` DISABLE KEYS */; /*!40000 ALTER TABLE `post_auto_draft` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `post_comment_agree` -- DROP TABLE IF EXISTS `post_comment_agree`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `post_comment_agree` ( `id` bigint(11) NOT NULL AUTO_INCREMENT, `user_id` bigint(11) NOT NULL DEFAULT '0' COMMENT '用户Id', `post_id` bigint(11) NOT NULL DEFAULT '0', `post_comment_id` bigint(11) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, KEY `post_comment_id` (`post_comment_id`,`user_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1345659221309444099 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `post_comment_agree` -- LOCK TABLES `post_comment_agree` WRITE; /*!40000 ALTER TABLE `post_comment_agree` DISABLE KEYS */; INSERT INTO `post_comment_agree` VALUES (1345659167660101633,1336960357791449089,1336963516165324801,1336965538293751809,'2021-01-03 09:12:01'),(1345659221309444098,1336960357791449089,1336963516165324801,1336965984680943618,'2021-01-03 09:12:14'); /*!40000 ALTER TABLE `post_comment_agree` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `post_comments` -- DROP TABLE IF EXISTS `post_comments`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `post_comments` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL DEFAULT '0', `post_id` bigint(20) NOT NULL DEFAULT '0', `parent_id` bigint(20) NOT NULL DEFAULT '0', `agree_count` int(11) NOT NULL DEFAULT '0', `level` int(11) NOT NULL DEFAULT '1', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `content` text COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=1336965984680943619 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `post_comments` -- LOCK TABLES `post_comments` WRITE; /*!40000 ALTER TABLE `post_comments` DISABLE KEYS */; INSERT INTO `post_comments` VALUES (1336965538293751809,1336960357791449089,1336963516165324801,0,1,0,'2020-12-10 17:26:39','

test

'),(1336965897653329922,1336960357791449089,1336963516165324801,0,0,0,'2020-12-10 17:28:04','

test

'),(1336965984680943618,1336960357791449089,1336963516165324801,1336965538293751809,1,0,'2020-12-10 17:28:25','

@admin 测试@

'); /*!40000 ALTER TABLE `post_comments` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `post_tags` -- DROP TABLE IF EXISTS `post_tags`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `post_tags` ( `id` bigint(20) NOT NULL, `post_id` bigint(20) NOT NULL, `tag_id` bigint(20) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `post_tags` -- LOCK TABLES `post_tags` WRITE; /*!40000 ALTER TABLE `post_tags` DISABLE KEYS */; /*!40000 ALTER TABLE `post_tags` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `posts` -- DROP TABLE IF EXISTS `posts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `posts` ( `id` bigint(20) unsigned NOT NULL DEFAULT '0', `column_id` int(11) NOT NULL DEFAULT '0', `author_id` bigint(11) NOT NULL DEFAULT '0' COMMENT 'users 表Id', `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `original_content` text COLLATE utf8mb4_unicode_ci NOT NULL, `content` text COLLATE utf8mb4_unicode_ci NOT NULL, `status` tinyint(1) NOT NULL DEFAULT '0', `reply_count` int(11) NOT NULL DEFAULT '0', `view_count` int(11) NOT NULL DEFAULT '0', `publish_at` datetime DEFAULT CURRENT_TIMESTAMP, `heat` double(12,4) NOT NULL DEFAULT '0.0000' COMMENT '热度', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_at` datetime DEFAULT CURRENT_TIMESTAMP, `essence` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否加精', `top` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否置顶', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `posts` -- LOCK TABLES `posts` WRITE; /*!40000 ALTER TABLE `posts` DISABLE KEYS */; INSERT INTO `posts` VALUES (1336963516165324701,1,1336960357791449089,'freemarker if 判断是否为空','1.判断对象不为空\n```java\n<#if user??>\n\n\n```\n判断对象属性不为空\n```\n<#if (user.name)??>//判断对象属性不为空\n\n\n```\n2、判断List是不为空\n```\n<#if users?? && (users?size > 0) >\n\n\n```\n\n','

1.判断对象不为空

\n
  1. <#if user??>
  2. </#if>
\n

判断对象属性不为空

\n
  1. <#if (user.name)??>//判断对象属性不为空
  2. </#if>

2、判断List是不为空

\n
  1. <#if users?? && (users?size > 0) >
  2. </#if>
',1,0,550,'2020-08-07 03:58:28',0.0018,'2020-07-29 01:48:01','2020-07-29 01:48:01',0,0),(1336963516165324702,1,1336960357791449089,'使用IDEA进行远程调试jar程序','##### 远程使用特定参数执行jar包\n\n java -jar -Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=0.0.0.0:5555 app.jar\n\n\n##### 本地连接远程服务器debug端口\n\nIDEA: Edit Configurations -> Remote\n指定 host port 保存\n\n使用debug模式启动,设置断点,开始调试\n\n\n\n','
远程使用特定参数执行jar包
  1. java -jar -Xdebug -Xrunjdwp:transport=dt_socket,suspend=n,server=y,address=0.0.0.0:5555 app.jar
本地连接远程服务器debug端口

IDEA: Edit Configurations -> Remote
指定 host port 保存

\n

使用debug模式启动,设置断点,开始调试

\n',1,0,493,'2020-08-07 11:58:47',0.0017,'2020-07-31 06:55:13','2020-07-31 06:55:13',0,0),(1336963516165324703,1,1336960357791449089,'maven打包指定模块命令',' mvn package -pl moduleName -am -amd -Dmaven.test.skip=true','
  1. mvn package -pl moduleName -am -amd -Dmaven.test.skip=true
',1,0,228,'2020-08-08 11:58:59',0.0014,'2020-08-02 09:34:04','2020-08-02 09:34:04',0,0),(1336963516165324704,2,1336960357791449089,'提问测试?','测试内容','

测试内容

\n',1,0,428,'2020-08-04 11:59:09',0.0016,'2020-08-01 12:47:01','2020-12-07 12:56:32',0,0),(1336963516165324705,1,1336960357791449089,'Mysql创建新用户并授权','##### 1. 创建新用户\n create user \'username\'@\'%\' identified by \'#password\';\n \nusername表示用户名, % 表示这个用户可以远程登录,#password是这个新用户的密码\n如果要创建一个只允许本地登录的用户,sql如下:\n\n create user \'username\'@\'localhost\' identified by \'#password\';\n \n如果要创建一个只允许本地登录并且密码为空的用户\n\n create user \'username\'@\'localhost\';\n \n##### 2. 为新用户授权(指定库的所有权限)\n grant all privileges on database.* to \'username\'@\'%\';\n \n只读权限:\n\n grant select on database.* to \'username\'@\'%\';\n \n指定表的只读权限\n\n grant select on database.tablename to \'username\'@\'%\';\n \n读写权限\n \n grant select,update on database.* to \'username\'@\'%\';\n\n\n##### 3.刷新用户权限\n flush privileges;\n \n##### 附加内容\n查询赋予用户的权限\n\n show grants for username;\n','
1. 创建新用户
  1. create user \'username\'@\'%\' identified by \'#password\';

username表示用户名, % 表示这个用户可以远程登录,#password是这个新用户的密码
如果要创建一个只允许本地登录的用户,sql如下:

\n
  1. create user \'username\'@\'localhost\' identified by \'#password\';

如果要创建一个只允许本地登录并且密码为空的用户

\n
  1. create user \'username\'@\'localhost\';
2. 为新用户授权(指定库的所有权限)
  1. grant all privileges on database.* to \'username\'@\'%\';

只读权限:

\n
  1. grant select on database.* to \'username\'@\'%\';

指定表的只读权限

\n
  1. grant select on database.tablename to \'username\'@\'%\';

读写权限

\n
  1. grant select,update on database.* to \'username\'@\'%\';
3.刷新用户权限
  1. flush privileges;
附加内容

查询赋予用户的权限

\n
  1. show grants for username;
',1,0,326,'2020-08-08 11:59:15',0.0015,'2020-08-05 13:04:45','2020-08-05 13:04:45',0,0),(1336963516165324706,1,1336960357791449089,'postfix发送邮件','##### 1. 安装\n删除sendmail\n> yum remove sendmail\n\n安装postfix mailx\n> yum install postfix mailx -y\n\n##### 2. 配置\n修改postfix配置文件 /etc/postfix/main.cf\n\n修改以下参数\n```\n#设置系统的主机名\nmyhostname = mail.test.com\n#设置域名(此处设置将成为E-mail地址“@”后面的部分)\nmydomain = test.com\n#将发信地址“@”后面的部分设置为域名(非系统主机名)\nmyorigin = $mydomain\n#接受来自所有网络的请求\ninet_interfaces = all\ninet_protocols = ipv4\n#指定发给本地邮件的域名\nmydestination = $myhostname, localhost.$mydomain, localhost, $mydomain\n#指定用户邮箱目录\nhome_mailbox = Maildir/\n```\n\n设置hostname\n\n echo \"test.com\" > /etc/hostname\n\n##### 3. 启动服务\n\n systemctl start postfix\n\n##### 4. 测试发送邮件\n\n echo \"email content\" | mail -s \"title\" xxxxx@sohu.com\n \n查看待发送的邮件队列\n>sudo mailq\n\n使用 sudo postsuper -d #{QUEUEID} 删除待发送队列中的邮件 \n>sudo postsuper -d 02A1430CA726\n\n参考:\nhttps://blog.csdn.net/witton/article/details/105882959\nhttps://www.cnblogs.com/zdz8207/p/Linux-postfix-sendmail.html','
1. 安装

删除sendmail

\n
\n

yum remove sendmail

\n
\n

安装postfix mailx

\n
\n

yum install postfix mailx -y

\n
\n
2. 配置

修改postfix配置文件 /etc/postfix/main.cf

\n

修改以下参数

\n
  1. #设置系统的主机名
  2. myhostname = mail.test.com
  3. #设置域名(此处设置将成为E-mail地址“@”后面的部分)
  4. mydomain = test.com
  5. #将发信地址“@”后面的部分设置为域名(非系统主机名)
  6. myorigin = $mydomain
  7. #接受来自所有网络的请求
  8. inet_interfaces = all
  9. inet_protocols = ipv4
  10. #指定发给本地邮件的域名
  11. mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
  12. #指定用户邮箱目录
  13. home_mailbox = Maildir/

设置hostname

\n
  1. echo \"test.com\" > /etc/hostname
3. 启动服务
  1. systemctl start postfix
4. 测试发送邮件
  1. echo \"email content\" | mail -s \"title\" xxxxx@sohu.com

查看待发送的邮件队列

\n
\n

sudo mailq

\n
\n

使用 sudo postsuper -d #{QUEUEID} 删除待发送队列中的邮件

\n
\n

sudo postsuper -d 02A1430CA726

\n
\n

参考:
https://blog.csdn.net/witton/article/details/105882959
https://www.cnblogs.com/zdz8207/p/Linux-postfix-sendmail.html

\n',0,1,125,'2020-08-22 11:33:06',0.1960,'2020-08-22 03:33:06','2020-12-26 15:34:59',0,0),(1336963516165324707,1,1336960357791449089,'JS复制指定div中的内容','```js\n// 1 获取需要复制的div的dom对象\nlet div = document.getElementById(\"id\");\n\n//2 选中div中的内容\nlet range;\nif (document.body.createTextRange) { //$.browser.msie\n range = document.body.createTextRange();\n range.moveToElementText(div);\n range.select();\n} else if (document.createRange) { //$.browser.mozilla || $.browser.opera\n let selection = window.getSelection();\n range = document.createRange();\n range.selectNodeContents(div);\n selection.removeAllRanges();\n selection.addRange(range);\n} else if (window.getSelection && window.getSelection().setBaseAndExtent) { //$.browser.safari\n let selection = window.getSelection();\n selection.setBaseAndExtent(div, 0, div, 1);\n}\n\n//3 执行Copy命令复制内容\ndocument.execCommand(\"Copy\");\n\n//4 取消选中(可选)\nwindow.getSelection().empty();\n```','
  1. // 1 获取需要复制的div的dom对象
  2. let div = document.getElementById(\"id\");
  3. //2 选中div中的内容
  4. let range;
  5. if (document.body.createTextRange) { //$.browser.msie
  6. range = document.body.createTextRange();
  7. range.moveToElementText(div);
  8. range.select();
  9. } else if (document.createRange) { //$.browser.mozilla || $.browser.opera
  10. let selection = window.getSelection();
  11. range = document.createRange();
  12. range.selectNodeContents(div);
  13. selection.removeAllRanges();
  14. selection.addRange(range);
  15. } else if (window.getSelection && window.getSelection().setBaseAndExtent) { //$.browser.safari
  16. let selection = window.getSelection();
  17. selection.setBaseAndExtent(div, 0, div, 1);
  18. }
  19. //3 执行Copy命令复制内容
  20. document.execCommand(\"Copy\");
  21. //4 取消选中(可选)
  22. window.getSelection().empty();
\n',1,0,139,'2020-08-08 11:59:26',0.0013,'2020-08-06 03:33:13','2020-08-06 03:33:13',0,0),(1336963516165324708,1,1336960357791449089,'gogs+drone搭建一个CI/CD平台','环境准备\ndocker\nMysql\n\n##### 1. 下载镜像\n docker pull gogs/gogs\n docker pull drone/drone\n \n##### 2. 初始化环境\n\n运行gogs容器\n\n docker run --name=gogs -p 10022:22 -p 3000:3000 -v /tmp/gogs:/data -d gogs/gogs\n\n初始化gogs\n\n启动Drone Server\n```\ndocker run \\\n --volume=/opt/docker/drone:/data \\\n --env=DRONE_AGENTS_ENABLED=true \\\n --env=DRONE_GOGS_SERVER=http://192.168.99.15:3000 \\\n --env=DRONE_RPC_SECRET=drone@secret \\\n --env=DRONE_SERVER_HOST=192.168.99.15:8080 \\\n --env=DRONE_SERVER_PROTO=http \\\n --publish=8080:80 \\\n --publish=4430:443 \\\n --restart=always \\\n --detach=true \\\n --name=drone \\\n drone/drone\n```\n\n启动Drone runner\n```\ndocker run -d \\\n -v /run/docker.sock:/var/run/docker.sock \\\n -e DRONE_RPC_PROTO=http \\\n -e DRONE_RPC_HOST=192.168.99.15:8080 \\\n -e DRONE_RPC_SECRET=drone@secret \\\n -e DRONE_RUNNER_CAPACITY=2 \\\n -e DRONE_RUNNER_NAME=${HOSTNAME} \\\n -e DRONE_ADMIN=gogs \\\n -p 3000:3000 \\\n --restart always \\\n --name runner \\\n drone/drone-runner-docker\n```\n\n\n\n','

环境准备
docker
Mysql

\n
1. 下载镜像
  1. docker pull gogs/gogs
  2. docker pull drone/drone
2. 初始化环境

运行gogs容器

\n
  1. docker run --name=gogs -p 10022:22 -p 3000:3000 -v /tmp/gogs:/data -d gogs/gogs

初始化gogs

\n

启动Drone Server

\n
  1. docker run \\
  2. --volume=/opt/docker/drone:/data \\
  3. --env=DRONE_AGENTS_ENABLED=true \\
  4. --env=DRONE_GOGS_SERVER=http://192.168.99.15:3000 \\
  5. --env=DRONE_RPC_SECRET=drone@secret \\
  6. --env=DRONE_SERVER_HOST=192.168.99.15:8080 \\
  7. --env=DRONE_SERVER_PROTO=http \\
  8. --publish=8080:80 \\
  9. --publish=4430:443 \\
  10. --restart=always \\
  11. --detach=true \\
  12. --name=drone \\
  13. drone/drone

启动Drone runner

\n
  1. docker run -d \\
  2. -v /run/docker.sock:/var/run/docker.sock \\
  3. -e DRONE_RPC_PROTO=http \\
  4. -e DRONE_RPC_HOST=192.168.99.15:8080 \\
  5. -e DRONE_RPC_SECRET=drone@secret \\
  6. -e DRONE_RUNNER_CAPACITY=2 \\
  7. -e DRONE_RUNNER_NAME=${HOSTNAME} \\
  8. -e DRONE_ADMIN=gogs \\
  9. -p 3000:3000 \\
  10. --restart always \\
  11. --name runner \\
  12. drone/drone-runner-docker
',0,0,112,'2020-08-23 13:26:35',0.3637,'2020-08-23 05:26:35','2020-08-23 05:26:35',0,0),(1336963516165324709,1,1336960357791449089,'jvm介绍','#### 程序计数器\n###### 作用\n记住jvm下一个指令的地址(通过寄存器实现)\n\n###### 特点\n线程私有\n没有内存溢出\n\n#### 栈(先进后出)\n1. 每个线程运行时所需要的内存,称为虚拟机栈\n2. 每个栈有过个**栈帧**(每个方法运行时需要的内存)组成,对应着每次方法调用时所占用的内存\n3. 每个线程只能有一个活动栈帧,对应着当前正在执行的那个方法\n','

程序计数器

作用

记住jvm下一个指令的地址(通过寄存器实现)

\n
特点

线程私有
没有内存溢出

\n

栈(先进后出)

    \n
  1. 每个线程运行时所需要的内存,称为虚拟机栈
  2. 每个栈有过个栈帧(每个方法运行时需要的内存)组成,对应着每次方法调用时所占用的内存
  3. 每个线程只能有一个活动栈帧,对应着当前正在执行的那个方法
\n',0,0,5,'2020-12-30 13:27:23',0.0000,'2020-08-30 14:08:35','2020-08-30 14:08:35',0,0),(1336963516165324710,1,1336960357791449089,'java的两种动态代理技术','#### 基于jdk的动态代理\n\n##### 1. 新建一个接口 TargetInterface\n```\ninterface TargetInterface{\n public void save();\n}\n```\n\n##### 2. 新建一个Target类实现TargetInterface\n```\nclass Target implement TargetInterface{\n public void save(){\n System.out.println(\"save running\");\n }\n}\n```\n\n##### 3. 创建一个增强类\n```\nclass Advice{\n public void before()\n {\n System.out.println(\"save before running\");\n }\n \n public void afterReturn(){\n System.out.println(\"save after running\");\n }\n}\n```\n\n##### 4. 测试运行\n```\n Target target = new Target();\n \n TargetInterface o = (TargetInterface) Proxy.newProxyInstance(\n Target.class.getClassLoader(),\n Target.class.getInterfaces(),\n new InvocationHandler() {\n @Override\n public Object invoke(Object proxy, Method method, Object[] args1) throws Throwable {\n System.out.println(\"proxy before\");\n Object invoke = method.invoke(target, args1);\n System.out.println(\"proxy after\");\n return invoke;\n }\n });\n o.method();\n```\n\n\n\n#### 基于cglib的动态代理\n\n##### 1. 新建一个Target类\n```\nclass Target{\n public void save(){\n System.out.println(\"save running\");\n }\n}\n```\n\n##### 2. 创建一个增强类\n```\nclass Advice{\n public void before()\n {\n System.out.println(\"save before running\");\n }\n \n public void afterReturn(){\n System.out.println(\"save after running\");\n }\n}\n```\n\n##### 3. 创建一个测试类\n```\nclass CglibProxyTest{\n public static void main(String[] args){\n //目标对象\n final Target target = new Target();\n \n final Advice advice = new Advice();\n \n //1.基于cglib生成动态代理对象\n Enhancer enhancer = new Enhancer();\n //2.设置目录类为父类\n enhancer.setSuperclass(Target.class);\n //3.设置回调\n enhancer.setCallback(new MethodInterceptor(){\n public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {\n advice.before();\n Object object=proxy.invokeSuper(obj, args);\n advice.afterReturn();\n return object;\n }\n });\n \n //4.创建代理对象\n Target o = (Target)enhancer.create();\n \n o.save();\n }\n}\n```\n\n\n\n\n\n\n\n\n\n\n','

基于jdk的动态代理

1. 新建一个接口 TargetInterface
  1. interface TargetInterface{
  2. public void save();
  3. }
2. 新建一个Target类实现TargetInterface
  1. class Target implement TargetInterface{
  2. public void save(){
  3. System.out.println(\"save running\");
  4. }
  5. }
3. 创建一个增强类
  1. class Advice{
  2. public void before()
  3. {
  4. System.out.println(\"save before running\");
  5. }
  6. public void afterReturn(){
  7. System.out.println(\"save after running\");
  8. }
  9. }
4. 测试运行
  1. Target target = new Target();
  2. TargetInterface o = (TargetInterface) Proxy.newProxyInstance(
  3. Target.class.getClassLoader(),
  4. Target.class.getInterfaces(),
  5. new InvocationHandler() {
  6. @Override
  7. public Object invoke(Object proxy, Method method, Object[] args1) throws Throwable {
  8. System.out.println(\"proxy before\");
  9. Object invoke = method.invoke(target, args1);
  10. System.out.println(\"proxy after\");
  11. return invoke;
  12. }
  13. });
  14. o.method();

基于cglib的动态代理

1. 新建一个Target类
  1. class Target{
  2. public void save(){
  3. System.out.println(\"save running\");
  4. }
  5. }
2. 创建一个增强类
  1. class Advice{
  2. public void before()
  3. {
  4. System.out.println(\"save before running\");
  5. }
  6. public void afterReturn(){
  7. System.out.println(\"save after running\");
  8. }
  9. }
3. 创建一个测试类
  1. class CglibProxyTest{
  2. public static void main(String[] args){
  3. //目标对象
  4. final Target target = new Target();
  5. final Advice advice = new Advice();
  6. //1.基于cglib生成动态代理对象
  7. Enhancer enhancer = new Enhancer();
  8. //2.设置目录类为父类
  9. enhancer.setSuperclass(Target.class);
  10. //3.设置回调
  11. enhancer.setCallback(new MethodInterceptor(){
  12. public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
  13. advice.before();
  14. Object object=proxy.invokeSuper(obj, args);
  15. advice.afterReturn();
  16. return object;
  17. }
  18. });
  19. //4.创建代理对象
  20. Target o = (Target)enhancer.create();
  21. o.save();
  22. }
  23. }
',0,0,22,'2020-12-30 13:27:23',0.0000,'2020-09-02 13:33:31','2020-09-02 13:33:31',0,0),(1336963516165324711,1,1336960357791449089,'Docker Registry','##### 获取registry镜像\n> docker pull registry\n\n##### 启动容器\n docker run -it -d -v /opt/docker/registry/:/var/lib/registry -p 5000:5000 --restart=always --name=registry registry\n\n可以使用 **docker ps**查看运行中的容器\n\n也可已通过http请求查看注册中心中的容器\n\n curl -XGET http://localhost:5000/v2/_catalog\n\n##### 使用 docker push命令推送本地镜像到本地注册中心\n先从远程仓库中获取一个ubuntu镜像\n> docker pull ubuntu\n\n标记这个镜像是可以推送到本地仓库的\n> docker image tag ubuntu localhost:5000/myimages/ubuntu\n\n推送镜像到本地注册中心\n> docker push localhost:5000/myimages/ubuntu\n\n##### 获取本地仓库镜像\n> docker pull localhost:5000/myimages/ubuntu\n\n\n','
获取registry镜像
\n

docker pull registry

\n
\n
启动容器
  1. docker run -it -d -v /opt/docker/registry/:/var/lib/registry -p 5000:5000 --restart=always --name=registry registry

可以使用 docker ps查看运行中的容器

\n

也可已通过http请求查看注册中心中的容器

\n
  1. curl -XGET http://localhost:5000/v2/_catalog
使用 docker push命令推送本地镜像到本地注册中心

先从远程仓库中获取一个ubuntu镜像

\n
\n

docker pull ubuntu

\n
\n

标记这个镜像是可以推送到本地仓库的

\n
\n

docker image tag ubuntu localhost:5000/myimages/ubuntu

\n
\n

推送镜像到本地注册中心

\n
\n

docker push localhost:5000/myimages/ubuntu

\n
\n
获取本地仓库镜像
\n

docker pull localhost:5000/myimages/ubuntu

\n
\n',0,0,15,'2020-12-30 13:27:23',0.0000,'2020-09-04 14:19:00','2020-09-04 14:19:00',0,0),(1336963516165324712,1,1336960357791449089,'Linux 用户管理','#### 用户组操作\n\n##### 1.查看用户组\n查看所有用户组\n> cat /etc/group\n\n显示当前用户所属的所有用户组\n> groups\n\n##### 2. 添加一个用户组\n添加一个组名为testGroup的用户组\n> sudo groupadd testGroup\n\n执行之后通过上面查看用户组的命令应该可以看到新添加的用户组\n\n##### 3. 修改用户组信息\n修改组名,将testGroup改为newGroup\n> sudo groupmod -n newGroup testGroup\n\n通过 **cat /etc/group** 查看修改效果\n\n##### 4. 删除一个用户组\n删除用户组 newGroup\n\n> sudo groupdel newGroup\n\n#### 用户操作\n##### 1. 添加一个新用户\n添加一个新用户\n> useradd testuser\n\n主要参数\n\n| 参数 | 说明 |\n|:---: |:---|\n| -c |加上备注文字,备注文字保存在passwd的备注栏中|\n| -d |指定用户登入时的主目录,替换系统默认值/home/<用户名>|\n| -D |变更预设值|\n| -e |指定账号的失效日期,日期格式为MM/DD/YY,例06/30/12。缺省表示永久有效|\n| -f |指定在密码过期后多少天即关闭该账号。如果为0账号立即被停用;如果为-1则账号一直可用。默认值为-1|\n| -g |指定用户所属的群组。值可以使组名也可以是GID。用户组必须已经存在的,期默认值为100,即users|\n| -G |指定用户所属的附加群组|\n| -m |自动建立用户的登入目录|\n| -M |不要自动建立用户的登入目录|\n| -n |取消建立以用户名称为名的群组|\n| -r | 建立系统账号|\n| -s |指定用户登入后所使用的shell。默认值为/bin/bash。如果要指定的用户不能登录,可以设置值为 /sbin/nologin 或者 /bin/false|\n| -u |指定用户ID号。该值在系统中必须是唯一的。0~499默认是保留给系统用户账号使用的,所以该值必须大于499|\n\n添加一个用户目录为 /home/testuser2 用户组为root,用户名为test2的新用户\n> useradd -d /home/testuser2 -g root test2\n\n\n##### 2. 查看系统用户\n\n> cat /etc/passwd 或 cat /etc/shadow\n\n##### 3. 修改指定用户信息\n###### 修改/设置用户密码\n> sudo passwd testuser\n\n输入两次密码,出现如下提示信息时说明修改成功\n```\nChanging password for user testuser.\nNew password:\nBAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word\nRetype new password:\npasswd: all authentication tokens updated successfully.\n```\n\n###### 修改用户名\n将testuser修改为newuser\n> sudo usermod -l newuser testuser\n\n###### 修改用户组\n将newuser的用户组修改为root\n> sudo usermod -g root newuser\n\n执行成功之后用户newuser就只属于root用户组了\n##### 为用户新增一个用户组\n> usermod -aG wheel newuser\n\n##### 4. 删除指定用户\n删除用户名为newuser的用户\n> sudo userdel newuser\n\n\n\n\n\n','

用户组操作

1.查看用户组

查看所有用户组

\n
\n

cat /etc/group

\n
\n

显示当前用户所属的所有用户组

\n
\n

groups

\n
\n
2. 添加一个用户组

添加一个组名为testGroup的用户组

\n
\n

sudo groupadd testGroup

\n
\n

执行之后通过上面查看用户组的命令应该可以看到新添加的用户组

\n
3. 修改用户组信息

修改组名,将testGroup改为newGroup

\n
\n

sudo groupmod -n newGroup testGroup

\n
\n

通过 cat /etc/group 查看修改效果

\n
4. 删除一个用户组

删除用户组 newGroup

\n
\n

sudo groupdel newGroup

\n
\n

用户操作

1. 添加一个新用户

添加一个新用户

\n
\n

useradd testuser

\n
\n

主要参数

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
参数说明
-c加上备注文字,备注文字保存在passwd的备注栏中
-d指定用户登入时的主目录,替换系统默认值/home/<用户名>
-D变更预设值
-e指定账号的失效日期,日期格式为MM/DD/YY,例06/30/12。缺省表示永久有效
-f指定在密码过期后多少天即关闭该账号。如果为0账号立即被停用;如果为-1则账号一直可用。默认值为-1
-g指定用户所属的群组。值可以使组名也可以是GID。用户组必须已经存在的,期默认值为100,即users
-G指定用户所属的附加群组
-m自动建立用户的登入目录
-M不要自动建立用户的登入目录
-n取消建立以用户名称为名的群组
-r建立系统账号
-s指定用户登入后所使用的shell。默认值为/bin/bash。如果要指定的用户不能登录,可以设置值为 /sbin/nologin 或者 /bin/false
-u指定用户ID号。该值在系统中必须是唯一的。0~499默认是保留给系统用户账号使用的,所以该值必须大于499
\n

添加一个用户目录为 /home/testuser2 用户组为root,用户名为test2的新用户

\n
\n

useradd -d /home/testuser2 -g root test2

\n
\n
2. 查看系统用户
\n

cat /etc/passwd 或 cat /etc/shadow

\n
\n
3. 修改指定用户信息
修改/设置用户密码
\n

sudo passwd testuser

\n
\n

输入两次密码,出现如下提示信息时说明修改成功

\n
  1. Changing password for user testuser.
  2. New password:
  3. BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word
  4. Retype new password:
  5. passwd: all authentication tokens updated successfully.
修改用户名

将testuser修改为newuser

\n
\n

sudo usermod -l newuser testuser

\n
\n
修改用户组

将newuser的用户组修改为root

\n
\n

sudo usermod -g root newuser

\n
\n

执行成功之后用户newuser就只属于root用户组了

\n
为用户新增一个用户组
\n

usermod -aG wheel newuser

\n
\n
4. 删除指定用户

删除用户名为newuser的用户

\n
\n

sudo userdel newuser

\n
\n',1,0,246,'2020-08-25 15:31:51',0.0015,'2020-08-25 07:31:32','2020-08-25 07:31:32',0,0),(1336963516165324713,1,1336960357791449089,'Java 将一段Html内容转换为文本','代码如下\n\n```\nimport static org.springframework.web.util.HtmlUtils.htmlUnescape;\n\npublic class TextUtils {\n public static String html2text(String html) {\n return htmlUnescape(html) //将html中的实体转换为对应的字符串\n .replaceAll(\"\", \"\") //所有的html标签替换为空\n .replaceAll(\"\\\\u00A0+\", \" \")//替换不间断空格,ASCII值是160\n .replaceAll(\"\\\\s+\", \" \")//所有特殊字符替换为空格\n .replaceAll(\" +\", \" \")//将多个连续的空格替换为单个空格\n .trim();//去掉首尾空格\n }\n}\n```','

代码如下

\n
  1. import static org.springframework.web.util.HtmlUtils.htmlUnescape;
  2. public class TextUtils {
  3. public static String html2text(String html) {
  4. return htmlUnescape(html) //将html中的实体转换为对应的字符串
  5. .replaceAll(\"</?\\\\w+.*?>\", \"\") //所有的html标签替换为空
  6. .replaceAll(\"\\\\u00A0+\", \" \")//替换不间断空格,ASCII值是160
  7. .replaceAll(\"\\\\s+\", \" \")//所有特殊字符替换为空格
  8. .replaceAll(\" +\", \" \")//将多个连续的空格替换为单个空格
  9. .trim();//去掉首尾空格
  10. }
  11. }
',1,0,338,'2020-08-26 11:50:43',0.0016,'2020-08-26 03:50:43','2020-08-26 03:50:43',0,0),(1336963516165324714,1,1336960357791449089,'JS通过页面html内容生成一个目录导航','```\n//获取文章内容\nlet content = document.getElementsByClassName(\'detail-body\')[0].innerHTML\n//通过正则获取html内容中的所有html标签\nlet matches = content.match(/.*?<\\/h\\d>/g)\n//遍历标签生成一个目录数组\n\nlet tree = []\nlet rootLevel = 1\nlet parents = []\nfor(i in matches){\n let h = matches[i]\n let m = h.match(//g,\'\')\n //console.log(con)\n console.log(level)\n let id = Number(i)+1\n if(rootLevel == level){\n tree.push({id:id,name:con,level:level,parentId:0})\n parents = [{id:0,level:1},{id:id,level:level}]\n }else{\n if(level - parents[parents.length - 1].level < 0){\n parents.pop()\n }\n tree.push({id:id,name:con,level:level,parentId:parents[parents.length - 1].id})\n if(level - parents[parents.length - 1].level > 1){\n parents.push({id:id,level:level})\n }\n }\n}\nconsole.log(tree)\n//渲染数组生成标签\nfunction getChildren(items,parent){\n let result = []\n for(i in items){\n let item = items[i]\n if(item.parentId == parent.id){\n let children = getChildren(items,item)\n if(children.length > 0){\n item.children = children\n }\n result.push(item)\n }\n }\n return result\n}\nlet result = []\nfor(i in tree){\n let item = tree[i]\n if(item.parentId == 0){\n item.children = getChildren(tree,item)\n result.push(item)\n }\n}\nconsole.log(result)\n\nfunction renderTree(items,level){\n let ul = \"\"\n for(i in items){\n let item = items[i]\n let childrenHtml = \"\"\n if(item.children && item.children.length > 0){\n level++\n childrenHtml = \"\"\n }\n ul += \"
  • \"+item.name+childrenHtml+\"
  • \"\n }\n return ul\n}\nlet ul = \"\"\nconsole.log(ul)\n```','
    1. //获取文章内容
    2. let content = document.getElementsByClassName(\'detail-body\')[0].innerHTML
    3. //通过正则获取html内容中的所有html标签
    4. let matches = content.match(/<h(\\d) .*?>.*?<\\/h\\d>/g)
    5. //遍历标签生成一个目录数组
    6. let tree = []
    7. let rootLevel = 1
    8. let parents = []
    9. for(i in matches){
    10. let h = matches[i]
    11. let m = h.match(/<h(\\d) /)
    12. let level = Number(m[1])
    13. if(tree.length == 0){
    14. rootLevel = level
    15. }
    16. let con = h.replace(/<\\/?\\w.*?>/g,\'\')
    17. //console.log(con)
    18. console.log(level)
    19. let id = Number(i)+1
    20. if(rootLevel == level){
    21. tree.push({id:id,name:con,level:level,parentId:0})
    22. parents = [{id:0,level:1},{id:id,level:level}]
    23. }else{
    24. if(level - parents[parents.length - 1].level < 0){
    25. parents.pop()
    26. }
    27. tree.push({id:id,name:con,level:level,parentId:parents[parents.length - 1].id})
    28. if(level - parents[parents.length - 1].level > 1){
    29. parents.push({id:id,level:level})
    30. }
    31. }
    32. }
    33. console.log(tree)
    34. //渲染数组生成标签
    35. function getChildren(items,parent){
    36. let result = []
    37. for(i in items){
    38. let item = items[i]
    39. if(item.parentId == parent.id){
    40. let children = getChildren(items,item)
    41. if(children.length > 0){
    42. item.children = children
    43. }
    44. result.push(item)
    45. }
    46. }
    47. return result
    48. }
    49. let result = []
    50. for(i in tree){
    51. let item = tree[i]
    52. if(item.parentId == 0){
    53. item.children = getChildren(tree,item)
    54. result.push(item)
    55. }
    56. }
    57. console.log(result)
    58. function renderTree(items,level){
    59. let ul = \"\"
    60. for(i in items){
    61. let item = items[i]
    62. let childrenHtml = \"\"
    63. if(item.children && item.children.length > 0){
    64. level++
    65. childrenHtml = \"<ul class=\'sub-list d\"+level+\"\'>\"+renderTree(item.children,level)+\"</ul>\"
    66. }
    67. ul += \"<li>\"+item.name+childrenHtml+\"</li>\"
    68. }
    69. return ul
    70. }
    71. let ul = \"<ul>\"+renderTree(result,1)+\"</ul>\"
    72. console.log(ul)
    ',2,0,157,'2020-11-20 22:47:15',0.0118,'2020-08-07 19:51:40','2020-08-07 19:51:40',0,0),(1336963516165324715,1,1336960357791449089,'HttpClient发送http请求','#### 1. pom.xml 引入坐标\n```\n\n org.apache.httpcomponents\n httpclient\n 4.5.3\n\n```\n\n#### 2.测试\n\n##### 发送GET请求\n```\n //1.创建客户端\n CloseableHttpClient httpClient = HttpClients.createDefault();\n \n //2.声明get请求\n HttpGet request = new HttpGet(\"http://www.baidu.com\");\n \n //3.发送请求\n CloseableHttpResponse response = httpClient.execute(request);\n //4.判断状态码\n if (response.getStatusLine().getStatusCode() == 200) {\n HttpEntity entity = response.getEntity();\n //使用工具类EntityUtils,从响应中取出实体表示的内容并转换成字符串\n String string = EntityUtils.toString(entity, \"UTF-8\");\n System.out.println(string);\n }\n //5.关闭资源\n response.close();\n httpClient.close();\n```\n##### 发送POST请求\n```\n //获取客户端\n CloseableHttpClient client = HttpClients.createDefault();\n \n //声明POST请求\n HttpPost request = new HttpPost(\"https://gitee.com/oauth/token\");\n \n //设置User-Agent\n request.addHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36\");\n \n //构建请求参数\n ArrayList parameters = new ArrayList<>();\n parameters.add(new BasicNameValuePair(\"grant_type\", \"authorization_code\"));\n parameters.add(new BasicNameValuePair(\"code\", \"xxx\"));\n parameters.add(new BasicNameValuePair(\"client_id\", \"xxx\"));\n parameters.add(new BasicNameValuePair(\"client_secret\", \"xxx\"));\n parameters.add(new BasicNameValuePair(\"redirect_uri\", \"http://localhost:8001/oauth/gitee/callback\"));\n\n UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(parameters, \"UTF-8\");\n\n //设置请求的参数\n request.setEntity(urlEncodedFormEntity);\n \n //发送请求\n CloseableHttpResponse response = client.execute(request);\n System.out.println(response.getStatusLine().getStatusCode());\n if (response.getStatusLine().getStatusCode() == 200) {\n HttpEntity entity = response.getEntity();\n String body = EntityUtils.toString(entity, \"UTF-8\");\n\n System.out.println(body);\n } else {\n System.out.println(EntityUtils.toString(response.getEntity(), \"UTF-8\"));\n }\n \n //关闭资源\n response.close();\n client.close();\n```','

    1. pom.xml 引入坐标

    1. <dependency>
    2. <groupId>org.apache.httpcomponents</groupId>
    3. <artifactId>httpclient</artifactId>
    4. <version>4.5.3</version>
    5. </dependency>

    2.测试

    发送GET请求
    1. //1.创建客户端
    2. CloseableHttpClient httpClient = HttpClients.createDefault();
    3. //2.声明get请求
    4. HttpGet request = new HttpGet(\"http://www.baidu.com\");
    5. //3.发送请求
    6. CloseableHttpResponse response = httpClient.execute(request);
    7. //4.判断状态码
    8. if (response.getStatusLine().getStatusCode() == 200) {
    9. HttpEntity entity = response.getEntity();
    10. //使用工具类EntityUtils,从响应中取出实体表示的内容并转换成字符串
    11. String string = EntityUtils.toString(entity, \"UTF-8\");
    12. System.out.println(string);
    13. }
    14. //5.关闭资源
    15. response.close();
    16. httpClient.close();
    发送POST请求
    1. //获取客户端
    2. CloseableHttpClient client = HttpClients.createDefault();
    3. //声明POST请求
    4. HttpPost request = new HttpPost(\"https://gitee.com/oauth/token\");
    5. //设置User-Agent
    6. request.addHeader(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36\");
    7. //构建请求参数
    8. ArrayList<NameValuePair> parameters = new ArrayList<>();
    9. parameters.add(new BasicNameValuePair(\"grant_type\", \"authorization_code\"));
    10. parameters.add(new BasicNameValuePair(\"code\", \"xxx\"));
    11. parameters.add(new BasicNameValuePair(\"client_id\", \"xxx\"));
    12. parameters.add(new BasicNameValuePair(\"client_secret\", \"xxx\"));
    13. parameters.add(new BasicNameValuePair(\"redirect_uri\", \"http://localhost:8001/oauth/gitee/callback\"));
    14. UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(parameters, \"UTF-8\");
    15. //设置请求的参数
    16. request.setEntity(urlEncodedFormEntity);
    17. //发送请求
    18. CloseableHttpResponse response = client.execute(request);
    19. System.out.println(response.getStatusLine().getStatusCode());
    20. if (response.getStatusLine().getStatusCode() == 200) {
    21. HttpEntity entity = response.getEntity();
    22. String body = EntityUtils.toString(entity, \"UTF-8\");
    23. System.out.println(body);
    24. } else {
    25. System.out.println(EntityUtils.toString(response.getEntity(), \"UTF-8\"));
    26. }
    27. //关闭资源
    28. response.close();
    29. client.close();
    ',1,0,409,'2020-08-26 17:45:41',0.0017,'2020-08-26 09:44:39','2020-12-09 16:05:32',0,0),(1336963516165324716,1,1336960357791449089,'vagrant up启动卡在Booting VM','调试模式查看更错错误信息\n```\nvagrant up --debug\n```','

    调试模式查看更错错误信息

    \n
    1. vagrant up --debug
    ',0,0,3,'2020-12-30 05:27:23',0.0000,'2020-09-14 01:54:05','2020-09-14 01:54:05',0,0),(1336963516165324717,1,1336960357791449089,'Spark SQL','占坑','

    占坑

    \n',0,0,5,'2020-12-30 13:27:23',0.0000,'2020-09-19 02:15:31','2020-09-19 02:15:31',0,0),(1336963516165324718,1,1336960357791449089,'k8s','环境:Centos7\n\n### Kubernetes简介和安装\n安装docker\n> yum install docker -y\n\nminikube 本地安装\nhttps://developer.aliyun.com/article/221687\n\n```\ncurl -Lo minikube https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.13.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/\n```\n\n\n\nkubeadm 集群安装\n\n\n### Kubernetes中的基本概念和操作\n#### 1 kubectl的基本使用\n#### 2 k8s的节点和标签\n#### 3 k8s调度的最小单位pod(上)\n#### 4 k8s调度的最小单位pod(下)\n#### 5 Namespace命名空间\n#### 6 创建我们自己的context\n#### 7 Controller和Deployment\n#### 8 deployment的演示\n#### 9 Replicaset在Deployment更新中的作用\n\n### 容器的的运维和监控\n#### 1 容器的基本监控\n#### 2 k8s集群运行资源监控——Heapster+Grafana+InfluxDB\n#### 3 根据资源占用自动横向伸缩\n#### 4 k8s集群Log的采集和展示——ELK+Fluentd\n#### 5 k8s集群监控方案Prometheus','

    环境:Centos7

    \n

    Kubernetes简介和安装

    安装docker

    \n
    \n

    yum install docker -y

    \n
    \n

    minikube 本地安装
    https://developer.aliyun.com/article/221687

    \n
    1. curl -Lo minikube https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v1.13.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/

    kubeadm 集群安装

    \n

    Kubernetes中的基本概念和操作

    1 kubectl的基本使用

    2 k8s的节点和标签

    3 k8s调度的最小单位pod(上)

    4 k8s调度的最小单位pod(下)

    5 Namespace命名空间

    6 创建我们自己的context

    7 Controller和Deployment

    8 deployment的演示

    9 Replicaset在Deployment更新中的作用

    容器的的运维和监控

    1 容器的基本监控

    2 k8s集群运行资源监控——Heapster+Grafana+InfluxDB

    3 根据资源占用自动横向伸缩

    4 k8s集群Log的采集和展示——ELK+Fluentd

    5 k8s集群监控方案Prometheus

    ',0,0,8,'2020-12-30 13:27:23',0.0000,'2020-09-19 07:46:42','2020-09-19 07:46:42',0,0),(1336963516165324719,1,1336960357791449089,'lombok使用','##### 通过使用 @**Data** 和 @**Builder** 注解生成的类没有无参构造函数,导致mybatis构建实体时报错\n\n解决方式:通过在实体类中手动添加一个无参构造函数并且为无参构造函数添加 @**Tolerate** 注解,如下:\n```\n@Data\n@Builder\npublic class Column {\n private int id;\n private String name;\n private int sort;\n\n @Tolerate\n Column(){}\n}\n```\n\n**注:这个错误在编译时不会报出来,可能在运行时才会抛出异常**','
    Data 和 @Builder 注解生成的类没有无参构造函数,导致mybatis构建实体时报错\" class=\"reference-link\">通过使用 @Data 和 @Builder 注解生成的类没有无参构造函数,导致mybatis构建实体时报错

    解决方式:通过在实体类中手动添加一个无参构造函数并且为无参构造函数添加 @Tolerate 注解,如下:

    \n
    1. @Data
    2. @Builder
    3. public class Column {
    4. private int id;
    5. private String name;
    6. private int sort;
    7. @Tolerate
    8. Column(){}
    9. }

    注:这个错误在编译时不会报出来,可能在运行时才会抛出异常

    \n',0,0,12,'2020-12-30 13:27:23',0.0000,'2020-09-21 03:24:45','2020-09-21 03:24:45',0,0),(1336963516165324720,1,1336960357791449089,'Linux 硬盘 内存 CPU查看命令','##### 硬盘\n查看硬盘大小\n> df -h\n\n查看目录文件的大小\n>du -h\n\n##### 内存\n查看内存大小\n>free -h\n\n##### CPU\n查看CPU个数\n> lscpu','
    硬盘

    查看硬盘大小

    \n
    \n

    df -h

    \n
    \n

    查看目录文件的大小

    \n
    \n

    du -h

    \n
    \n
    内存

    查看内存大小

    \n
    \n

    free -h

    \n
    \n
    CPU

    查看CPU个数

    \n
    \n

    lscpu

    \n
    \n',1,0,116,'2020-09-25 15:45:36',0.0015,'2020-09-07 01:47:35','2020-09-07 01:47:35',0,0),(1336963516165324721,1,1336960357791449089,'用Jenkins做测试环境的自动化构建与部署','#### 环境准备\n\n#### 安装\n##### 配置yum源\n> sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo\n\n##### 导入rpm密钥\n```\nrpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key\n```\n\n##### 安装kenkins\n> yum install jenkins -y\n\n##### 启动\n> systemctl start jenkins\n\n启动之后浏览器访问127.0.0.1:8080根据提示进行初始化\n\n1. 初始化密码\n2. 选择要安装的插件\n3. 创建管理员用户\n\n\n安装插件\nrebuilder\nsafe restart\n\n安全配置(默认用户登录后可以做所有操作,不安全)\n\n#### 自动化部署','

    环境准备

    安装

    配置yum源
    \n

    sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

    \n
    \n
    导入rpm密钥
    1. rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
    安装kenkins
    \n

    yum install jenkins -y

    \n
    \n
    启动
    \n

    systemctl start jenkins

    \n
    \n

    启动之后浏览器访问127.0.0.1:8080根据提示进行初始化

    \n
      \n
    1. 初始化密码
    2. 选择要安装的插件
    3. 创建管理员用户
    \n

    安装插件
    rebuilder
    safe restart

    \n

    安全配置(默认用户登录后可以做所有操作,不安全)

    \n

    自动化部署

    ',0,0,5,'2020-12-30 13:27:23',0.0000,'2020-10-10 13:53:58','2020-10-10 13:53:58',0,0),(1336963516165324722,1,1336960357791449089,'Jenkins+K8s实现持续集成','占坑','

    占坑

    \n',0,0,3,'2020-12-30 13:27:23',10.0000,'2020-10-11 04:13:12','2020-10-11 04:13:12',0,0),(1336963516165324723,1,1336960357791449089,'Docker使用说明','### Docker安装\n\n### Docker的镜像和容器\n#### 1 Docker架构和底层技术简介\ndocker提供了一个开发,打包,运行app的平台\n把app底层和infrastructure隔离开来\n\n**application**\n\n**docker engine**\n1. 后台进程(dockerd)\n2. REST API Server\n3. CLI接口(docker)\n\n**infrastructure(physical/virtual)**\n\n\n\n#### 2 Docker Image概述\n#### 3 DIY一个Base Image\n#### 4 初识Container\n#### 5 构建自己的Docker镜像\n#### 6 Dockerfile语法梳理及最佳实践\n#### 7 RUN vs CMD vs Entrypoint\n#### 8 镜像的发布\n#### 9 Dockerfile实战\n#### 10 容器的操作\n#### 11 Dockerfile实战(2)\n#### 12 容器的资源限制\n\n### Docker的网络\n#### 4-1 本章概述和实验环境介绍\n#### 4-2 网络基础回顾\n#### 4-3 Linux网络命名空间\n#### 4-4 Docker bridge0详解\n#### 4-5 容器之间的link\n#### 4-6 容器的端口映射\n#### 4-7 容器网络之host和none\n#### 4-8 多容器复杂应用的部署演示\n#### 4-9 Overlay和Underlay的通俗解释\n#### 4-10 Docker Overlay网络和etcd实现多机容器通信\n\n### Docker的持久化存储和数据共享\n#### 5-1 本章介绍\n#### 5-2 本章实验环境介绍\n#### 5-3 数据持久化之Data Volume\n#### 5-4 数据持久化之Bind Mouting\n#### 5-5 开发者利器-Docker+Bind Mout\n\n### Docker Compose多容器部署\n#### 6-1 根据前面所学部署一个wordpress\n#### 6-2 Docker Compose到底是什么\n#### 6-3 Docker Compose的安装和基本使用\n#### 6-4 水平扩展和负载均衡\n#### 6-5 部署一个复杂的投票应用\n\n\n### 容器编排Docker Swarm\n#### 7-1 容器编排Swarm介绍\n#### 7-2 创建一个三节点的swarm集群\n#### 7-3 Service的创建维护和水平扩展\n#### 7-4 在swarm集群里通过service部署wordpress\n#### 7-5 集群服务间通信之Routing Mesh\n#### 7-6 Routing Mesh之Ingress负载均衡\n#### 7-7 Docker Stack部署Wordpress\n#### 7-8 作业解答之部署投票应用\n#### 7-9 Docker Secret管理和使用\n#### 7-10 Docker Secret在Stack中的使用\n#### 7-11 Service更新','

    Docker安装

    Docker的镜像和容器

    1 Docker架构和底层技术简介

    docker提供了一个开发,打包,运行app的平台
    把app底层和infrastructure隔离开来

    \n

    application

    \n

    docker engine

    \n
      \n
    1. 后台进程(dockerd)
    2. REST API Server
    3. CLI接口(docker)
    \n

    infrastructure(physical/virtual)

    \n

    2 Docker Image概述

    3 DIY一个Base Image

    4 初识Container

    5 构建自己的Docker镜像

    6 Dockerfile语法梳理及最佳实践

    7 RUN vs CMD vs Entrypoint

    8 镜像的发布

    9 Dockerfile实战

    10 容器的操作

    11 Dockerfile实战(2)

    12 容器的资源限制

    Docker的网络

    4-1 本章概述和实验环境介绍

    4-2 网络基础回顾

    4-3 Linux网络命名空间

    4-4 Docker bridge0详解

    4-5 容器之间的link

    4-6 容器的端口映射

    4-7 容器网络之host和none

    4-8 多容器复杂应用的部署演示

    4-9 Overlay和Underlay的通俗解释

    4-10 Docker Overlay网络和etcd实现多机容器通信

    Docker的持久化存储和数据共享

    5-1 本章介绍

    5-2 本章实验环境介绍

    5-3 数据持久化之Data Volume

    5-4 数据持久化之Bind Mouting

    5-5 开发者利器-Docker+Bind Mout

    Docker Compose多容器部署

    6-1 根据前面所学部署一个wordpress

    6-2 Docker Compose到底是什么

    6-3 Docker Compose的安装和基本使用

    6-4 水平扩展和负载均衡

    6-5 部署一个复杂的投票应用

    容器编排Docker Swarm

    7-1 容器编排Swarm介绍

    7-2 创建一个三节点的swarm集群

    7-3 Service的创建维护和水平扩展

    7-4 在swarm集群里通过service部署wordpress

    7-5 集群服务间通信之Routing Mesh

    7-6 Routing Mesh之Ingress负载均衡

    7-7 Docker Stack部署Wordpress

    7-8 作业解答之部署投票应用

    7-9 Docker Secret管理和使用

    7-10 Docker Secret在Stack中的使用

    7-11 Service更新

    ',0,0,16,'2020-12-30 13:27:23',0.0000,'2020-10-11 13:29:27','2020-10-11 13:29:27',0,0),(1336963516165324799,1,1336960357791449089,'shell 命令行中格式化输出 json','> echo \'{\"key\":\"value\"}\' | python -mjson.tool\n\n效果如下\n\n```\n[root@localhost ~]# echo \'{\"key\":\"value\"}\' | python -mjson.tool\n{\n \"key\": \"value\"\n}\n\n```','
    \n

    echo ‘{“key”:”value”}’ | python -mjson.tool

    \n
    \n

    效果如下

    \n
    1. [root@localhost ~]# echo \'{\"key\":\"value\"}\' | python -mjson.tool
    2. {
    3. \"key\": \"value\"
    4. }
    ',1,0,196,'2020-09-10 19:48:50',0.0015,'2020-09-10 19:48:50','2020-09-10 19:48:50',0,0),(1336963516165324800,1,1336960357791449089,'使用openssl的随机函数生成随机字符串','语法:\n>openssl rand [-out file] [-rand file(s)] [-base64] [-hex] num\n\n参数说明:\n\n|参数|说明|\n|:--:|:--:|\n| -out | 指定随机数输出文件,否则输出到标准输出 |\n|-rand file|指定随机数种子文件。种子文件中的字符越随机,openssl rand生成随机数的速度越快,随机度越高|\n|-base64| 指定生成的随机数的编码格式为base64 |\n|-hex|指定生成的随机数的编码格式为hex|\n|num|指定随机数的长度|\n\n示例如下:\n```\n[root@localhost ~]# openssl rand -base64 32\ngNAL1IMR/zbzYrzWoUUhQzIZUDP4SooScu8wAUesw4g=\n\n[root@localhost ~]# openssl rand -hex 32\n4c5a40cf3f5b6f2fc6a2dc189a1e80e967ce022013aab9e10852e3e272cdafc5\n```','

    语法:

    \n
    \n

    openssl rand [-out file] [-rand file(s)] [-base64] [-hex] num

    \n
    \n

    参数说明:

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    参数说明
    -out指定随机数输出文件,否则输出到标准输出
    -rand file指定随机数种子文件。种子文件中的字符越随机,openssl rand生成随机数的速度越快,随机度越高
    -base64指定生成的随机数的编码格式为base64
    -hex指定生成的随机数的编码格式为hex
    num指定随机数的长度
    \n

    示例如下:

    \n
    1. [root@localhost ~]# openssl rand -base64 32
    2. gNAL1IMR/zbzYrzWoUUhQzIZUDP4SooScu8wAUesw4g=
    3. [root@localhost ~]# openssl rand -hex 32
    4. 4c5a40cf3f5b6f2fc6a2dc189a1e80e967ce022013aab9e10852e3e272cdafc5
    ',1,0,224,'2020-10-08 14:08:06',0.0017,'2020-10-08 14:08:06','2020-10-08 14:08:06',0,0),(1336963516165324801,1,1336960357791449089,'Hello World','```\necho \"hello world\";\n```','
    1. echo \"hello world\"
    ',1,3,169,'2020-07-26 19:57:59',0.0017,'2020-07-17 12:54:19','2020-07-17 12:54:19',0,0); /*!40000 ALTER TABLE `posts` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `system_config` -- DROP TABLE IF EXISTS `system_config`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `system_config` ( `id` int(11) NOT NULL AUTO_INCREMENT, `attribute` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` datetime NOT NULL, `remark` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `updated_at` datetime NOT NULL, `value` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `attribute_unique` (`attribute`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `system_config` -- LOCK TABLES `system_config` WRITE; /*!40000 ALTER TABLE `system_config` DISABLE KEYS */; INSERT INTO `system_config` VALUES (1,'gitee_oauth_client_id','2020-12-28 13:57:22','','2020-12-28 17:17:47',''),(2,'gitee_oauth_client_secret','2020-12-28 13:57:22','','2020-12-28 13:57:22',''),(3,'gitee_oauth_redirect_uri','2020-12-28 13:57:22','','2020-12-28 13:57:22','http://localhost:8001/oauth/gitee/callback'),(4,'github_oauth_client_id','2020-12-28 13:57:22','','2020-12-28 16:31:21','sdfgsg'),(5,'github_oauth_client_secret','2020-12-28 13:57:22','github oauth 秘钥','2020-12-28 17:06:29','asdfag'),(6,'github_oauth_redirect_uri','2020-12-28 13:57:22','','2020-12-28 13:57:22',''),(7,'sitename','2021-08-01 19:03:01','站点名称','2021-08-01 19:03:01','技术社区'),(8,'site_keyword','2021-08-01 19:03:25','站点关键字','2021-08-01 19:03:25','Keyword'),(9,'site_description','2021-08-01 19:03:49','站点描述','2021-08-01 19:03:49','site description'); /*!40000 ALTER TABLE `system_config` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `tags` -- DROP TABLE IF EXISTS `tags`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `tags` ( `id` bigint(20) NOT NULL, `name` varchar(255) NOT NULL COMMENT '标签名称', `description` text NOT NULL COMMENT '标签描述', `created_at` datetime NOT NULL, `updated_at` datetime NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `tags` -- LOCK TABLES `tags` WRITE; /*!40000 ALTER TABLE `tags` DISABLE KEYS */; /*!40000 ALTER TABLE `tags` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_blacklist` -- DROP TABLE IF EXISTS `user_blacklist`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_blacklist` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `black_user_id` bigint(20) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_blacklist` -- LOCK TABLES `user_blacklist` WRITE; /*!40000 ALTER TABLE `user_blacklist` DISABLE KEYS */; /*!40000 ALTER TABLE `user_blacklist` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_categories` -- DROP TABLE IF EXISTS `user_categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_categories` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '用户ID', `name` varchar(256) NOT NULL DEFAULT '' COMMENT '用户分类名称', `enable` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否可用', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_categories` -- LOCK TABLES `user_categories` WRITE; /*!40000 ALTER TABLE `user_categories` DISABLE KEYS */; /*!40000 ALTER TABLE `user_categories` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_collection` -- DROP TABLE IF EXISTS `user_collection`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_collection` ( `id` bigint(20) unsigned NOT NULL DEFAULT '0', `user_id` bigint(20) NOT NULL DEFAULT '0', `post_id` bigint(20) NOT NULL DEFAULT '0', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_collection` -- LOCK TABLES `user_collection` WRITE; /*!40000 ALTER TABLE `user_collection` DISABLE KEYS */; INSERT INTO `user_collection` VALUES (1336965494991757314,1336960357791449089,1336963516165324801,'2020-12-10 17:26:28'),(1345032254100930561,1336960357791449089,1336963516165324707,'2021-01-01 15:40:54'),(1345032273046601729,1336960357791449089,1336963516165324703,'2021-01-01 15:40:58'),(1345032290897559553,1336960357791449089,1336963516165324705,'2021-01-01 15:41:02'),(1345032312376590338,1336960357791449089,1336963516165324712,'2021-01-01 15:41:07'),(1345032339547291649,1336960357791449089,1336963516165324704,'2021-01-01 15:41:14'),(1345032369809195010,1336960357791449089,1336963516165324702,'2021-01-01 15:41:21'),(1345032387161030657,1336960357791449089,1336963516165324713,'2021-01-01 15:41:25'),(1345032405309784065,1336960357791449089,1336963516165324701,'2021-01-01 15:41:30'),(1345032429880016898,1336960357791449089,1336963516165324715,'2021-01-01 15:41:35'),(1345636454463815682,1336963516165324799,1336960357791449089,'2021-01-03 07:41:46'),(1345638478391566337,1336960357791449089,1336963516165324799,'2021-01-03 07:49:49'),(1345659536012267521,1336960357791449089,1336963516165324714,'2021-01-03 09:13:29'); /*!40000 ALTER TABLE `user_collection` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_follow` -- DROP TABLE IF EXISTS `user_follow`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_follow` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NOT NULL, `follow_user_id` bigint(20) NOT NULL, `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_follow` -- LOCK TABLES `user_follow` WRITE; /*!40000 ALTER TABLE `user_follow` DISABLE KEYS */; /*!40000 ALTER TABLE `user_follow` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_message` -- DROP TABLE IF EXISTS `user_message`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_message` ( `id` bigint(20) unsigned NOT NULL DEFAULT '0', `sender_id` bigint(11) NOT NULL DEFAULT '0', `receiver_id` bigint(11) NOT NULL DEFAULT '0', `type` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `content` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_message` -- LOCK TABLES `user_message` WRITE; /*!40000 ALTER TABLE `user_message` DISABLE KEYS */; /*!40000 ALTER TABLE `user_message` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_post_archive` -- DROP TABLE IF EXISTS `user_post_archive`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_post_archive` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '用户Id', `year` int(4) NOT NULL DEFAULT '2021' COMMENT '年', `month` int(11) NOT NULL DEFAULT '1' COMMENT '月', `post_count` int(11) NOT NULL DEFAULT '0' COMMENT '文章数量', PRIMARY KEY (`id`), UNIQUE KEY `uk_user_year_mouth` (`user_id`,`year`,`month`) ) ENGINE=InnoDB AUTO_INCREMENT=1422546445076037634 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_post_archive` -- LOCK TABLES `user_post_archive` WRITE; /*!40000 ALTER TABLE `user_post_archive` DISABLE KEYS */; /*!40000 ALTER TABLE `user_post_archive` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_tags` -- DROP TABLE IF EXISTS `user_tags`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_tags` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户Id', `tag_id` int(11) NOT NULL DEFAULT '0' COMMENT '标签', `name` varchar(256) NOT NULL DEFAULT '' COMMENT '标签名称', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_tags` -- LOCK TABLES `user_tags` WRITE; /*!40000 ALTER TABLE `user_tags` DISABLE KEYS */; /*!40000 ALTER TABLE `user_tags` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `user_token` -- DROP TABLE IF EXISTS `user_token`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `user_token` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户Id', `type` varchar(16) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'token类型', `token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'token', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `expire_in` bigint(255) DEFAULT '0' COMMENT '过期时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `user_token` -- LOCK TABLES `user_token` WRITE; /*!40000 ALTER TABLE `user_token` DISABLE KEYS */; /*!40000 ALTER TABLE `user_token` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `users` ( `id` bigint(20) unsigned NOT NULL, `username` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名', `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '密码', `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '邮箱', `name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '名称', `avatar` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '头像', `signature` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '清明', `city` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '城市', `experience` int(11) NOT NULL DEFAULT '0' COMMENT '经验值', `is_admin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否管理员', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `users` -- LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; INSERT INTO `users` VALUES (1336960357791449089,'peng49','$2a$10$stu3n5ppS2KkPVyjLZrE.eCJ/P4OuoCOZP9ERdQJL633ZtKK2BRi2','mail@t.com','','/static/b35dfb4c-8708-4a91-8839-86b5539c134b.png','S','SZ',0,1,'2020-12-13 08:24:47','2020-12-11 01:06:03'); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2021-08-03 14:18:28