整合案例的源码是恒宇少年知识库小程序的接口源码,采用ApiBoot构建的接口服务项目,是一个针对ApiBoot落地使用的案例。

集成的ApiBoot依赖

该项目集成的ApiBoot模块比较多,pom.xml部分相关ApiBoot依赖如下所示:

  1. <dependencies>
  2. <!--ApiBoot Security Oauth-->
  3. <dependency>
  4. <groupId>org.minbox.framework</groupId>
  5. <artifactId>api-boot-starter-security-oauth-jwt</artifactId>
  6. </dependency>
  7. <!--ApiBoot Swagger-->
  8. <dependency>
  9. <groupId>org.minbox.framework</groupId>
  10. <artifactId>api-boot-starter-swagger</artifactId>
  11. </dependency>
  12. <!--ApiBoot Http Converter-->
  13. <dependency>
  14. <groupId>org.minbox.framework</groupId>
  15. <artifactId>api-boot-starter-http-converter</artifactId>
  16. </dependency>
  17. <!--ApiBoot Resource Load-->
  18. <dependency>
  19. <groupId>org.minbox.framework</groupId>
  20. <artifactId>api-boot-starter-resource-load</artifactId>
  21. </dependency>
  22. <!--ApiBoot Mybatis Enhance-->
  23. <dependency>
  24. <groupId>org.minbox.framework</groupId>
  25. <artifactId>api-boot-starter-mybatis-enhance</artifactId>
  26. </dependency>
  27. <!--ApiBoot Mybatis Pageable-->
  28. <dependency>
  29. <groupId>org.minbox.framework</groupId>
  30. <artifactId>api-boot-starter-mybatis-pageable</artifactId>
  31. </dependency>
  32. </dependencies>
  33. <build>
  34. <plugins>
  35. <plugin>
  36. <groupId>org.minbox.framework</groupId>
  37. <artifactId>api-boot-mybatis-enhance-maven-codegen</artifactId>
  38. <version>2.0.9-SNAPSHOT</version>
  39. <dependencies>
  40. <!--数据驱动依赖-->
  41. <dependency>
  42. <groupId>mysql</groupId>
  43. <artifactId>mysql-connector-java</artifactId>
  44. <version>5.1.47</version>
  45. </dependency>
  46. </dependencies>
  47. <executions>
  48. <execution>
  49. <goals>
  50. <goal>generator</goal>
  51. </goals>
  52. </execution>
  53. </executions>
  54. <configuration>
  55. <!--为true时执行自动生成-->
  56. <execute>false</execute>
  57. <dbName>knowledge</dbName>
  58. <dbUrl>jdbc:mysql://localhost:3306</dbUrl>
  59. <dbUserName>root</dbUserName>
  60. <dbPassword>123456</dbPassword>
  61. <packageName>org.minbox.framework.knowledge.library.common.entity</packageName>
  62. <tableNamePattern>kl%</tableNamePattern>
  63. </configuration>
  64. </plugin>
  65. </plugins>
  66. </build>
  67. <dependencyManagement>
  68. <dependencies>
  69. <!--ApiBoot Dependencies-->
  70. <dependency>
  71. <groupId>org.minbox.framework</groupId>
  72. <artifactId>api-boot-dependencies</artifactId>
  73. <version>${api.boot.version}</version>
  74. <scope>import</scope>
  75. <type>pom</type>
  76. </dependency>
  77. </dependencies>
  78. </dependencyManagement>

数据库结构

  1. /*
  2. Navicat MySQL Data Transfer
  3. Source Server : 知识库正式
  4. Source Server Type : MySQL
  5. Source Server Version : 50718
  6. Source Host : rm-2zeet0j72ljt4uz97wo.mysql.rds.aliyuncs.com:3306
  7. Source Schema : knowledge
  8. Target Server Type : MySQL
  9. Target Server Version : 50718
  10. File Encoding : 65001
  11. Date: 17/05/2019 13:44:51
  12. */
  13. SET NAMES utf8mb4;
  14. SET FOREIGN_KEY_CHECKS = 0;
  15. -- ----------------------------
  16. -- Table structure for clientdetails
  17. -- ----------------------------
  18. DROP TABLE IF EXISTS `clientdetails`;
  19. CREATE TABLE `clientdetails` (
  20. `appId` varchar(128) NOT NULL,
  21. `resourceIds` varchar(256) DEFAULT NULL,
  22. `appSecret` varchar(256) DEFAULT NULL,
  23. `scope` varchar(256) DEFAULT NULL,
  24. `grantTypes` varchar(256) DEFAULT NULL,
  25. `redirectUrl` varchar(256) DEFAULT NULL,
  26. `authorities` varchar(256) DEFAULT NULL,
  27. `access_token_validity` int(11) DEFAULT NULL,
  28. `refresh_token_validity` int(11) DEFAULT NULL,
  29. `additionalInformation` varchar(4096) DEFAULT NULL,
  30. `autoApproveScopes` varchar(256) DEFAULT NULL,
  31. PRIMARY KEY (`appId`)
  32. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  33. -- ----------------------------
  34. -- Table structure for kl_article_info
  35. -- ----------------------------
  36. DROP TABLE IF EXISTS `kl_article_info`;
  37. CREATE TABLE `kl_article_info` (
  38. `AI_ID` varchar(36) NOT NULL COMMENT '主键自增',
  39. `AI_USER_ID` varchar(36) DEFAULT NULL COMMENT '文章所属用户',
  40. `AI_TITLE` varchar(200) DEFAULT NULL COMMENT '文章标题',
  41. `AI_READ_COUNT` int(11) DEFAULT NULL COMMENT '阅读量',
  42. `AI_LIKE_COUNT` int(11) DEFAULT NULL COMMENT '喜欢数量',
  43. `AI_COMMENT_COUNT` int(11) DEFAULT NULL COMMENT '评论数量',
  44. `AI_SHARE_COUNT` int(11) DEFAULT NULL COMMENT '分享数量',
  45. `AI_CONTENT` longtext COMMENT '文章内容',
  46. `AI_IS_ORIGINAL` char(1) DEFAULT 'Y' COMMENT '是否为原创文章,Y:原创,N:转载',
  47. `AI_IS_RELEASE` char(1) DEFAULT NULL COMMENT '文章是否发布,Y:已发布,N:未发布',
  48. `AI_IS_HOT` char(1) DEFAULT 'N' COMMENT '是否热门,Y:热门,N:非热门',
  49. `AI_IS_TOP` char(1) DEFAULT 'N' COMMENT '是否置顶,Y:置顶,N:普通',
  50. `AI_IS_RECOMMEND` char(1) DEFAULT 'N' COMMENT '是否推荐,Y:推荐,N:不推荐',
  51. `AI_IS_MARKDOWN` char(1) DEFAULT 'Y' COMMENT '是否为markdown语法文章',
  52. `AI_RELEASE_TIME` datetime DEFAULT NULL COMMENT '发布时间',
  53. `AI_STATUS` char(3) DEFAULT 'O' COMMENT '文章状态,O:正常,D:已删除',
  54. `AI_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  55. `AI_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '文章创建时间',
  56. PRIMARY KEY (`AI_ID`),
  57. KEY `kl_article_info_AI_USER_ID_index` (`AI_USER_ID`)
  58. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章信息表';
  59. -- ----------------------------
  60. -- Table structure for kl_article_topic_info
  61. -- ----------------------------
  62. DROP TABLE IF EXISTS `kl_article_topic_info`;
  63. CREATE TABLE `kl_article_topic_info` (
  64. `ATI_ID` varchar(36) NOT NULL COMMENT '专题主键',
  65. `ATI_NAME` varchar(20) DEFAULT NULL COMMENT '专题名称',
  66. `ATI_SORT` int(11) DEFAULT NULL COMMENT '排序字段,值越大越靠前',
  67. `ATI_STATUS` char(1) DEFAULT 'O' COMMENT '专题状态,O:正常,D:已删除',
  68. `ATI_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  69. `ATI_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  70. PRIMARY KEY (`ATI_ID`)
  71. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章专题信息表';
  72. -- ----------------------------
  73. -- Table structure for kl_article_topic_uni
  74. -- ----------------------------
  75. DROP TABLE IF EXISTS `kl_article_topic_uni`;
  76. CREATE TABLE `kl_article_topic_uni` (
  77. `ATU_ID` int(11) NOT NULL AUTO_INCREMENT,
  78. `ATU_ARTICLE_ID` varchar(36) DEFAULT NULL COMMENT '文章编号,关联kl_article_info主键',
  79. `ATU_TOPIC_ID` varchar(36) DEFAULT NULL COMMENT '文章专题,关联kl_article_topic_info主键',
  80. `ATU_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  81. PRIMARY KEY (`ATU_ID`),
  82. KEY `kl_article_topic_uni_ATU_ARTICLE_ID_index` (`ATU_ARTICLE_ID`),
  83. KEY `kl_article_topic_uni_ATU_TOPIC_ID_index` (`ATU_TOPIC_ID`)
  84. ) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8 COMMENT='文章专题关联信息表';
  85. -- ----------------------------
  86. -- Table structure for kl_banner_info
  87. -- ----------------------------
  88. DROP TABLE IF EXISTS `kl_banner_info`;
  89. CREATE TABLE `kl_banner_info` (
  90. `BI_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  91. `BI_JUMP_ARTICLE_ID` varchar(36) DEFAULT NULL COMMENT '点击跳转文章编号,关联kl_article_info主键',
  92. `BI_START_TIME` datetime DEFAULT NULL COMMENT '展示开始时间',
  93. `BI_END_TIME` datetime DEFAULT NULL COMMENT '展示结束时间',
  94. `BI_STATUS` char(1) DEFAULT 'O' COMMENT '轮播图状态,O:正常,D:已删除',
  95. `BI_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  96. `BI_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  97. PRIMARY KEY (`BI_ID`),
  98. KEY `kl_banner_info_BI_JUMP_ARTICLE_ID_index` (`BI_JUMP_ARTICLE_ID`)
  99. ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='轮播图信息表';
  100. -- ----------------------------
  101. -- Table structure for kl_comment_info
  102. -- ----------------------------
  103. DROP TABLE IF EXISTS `kl_comment_info`;
  104. CREATE TABLE `kl_comment_info` (
  105. `CI_ID` varchar(36) NOT NULL COMMENT '留言主键',
  106. `CI_ARTICLE_ID` varchar(36) DEFAULT NULL COMMENT '文章编号,关联kl_article_info主键',
  107. `CI_CREATOR_ID` varchar(36) DEFAULT NULL COMMENT '评论创建者,关联kl_user_info主键',
  108. `CI_COMMENT_ID` varchar(36) DEFAULT NULL COMMENT '上级评论编号,关联本表主键',
  109. `CI_TARGET_ID` varchar(36) DEFAULT NULL COMMENT '回复目标用户编号,关联kl_user_info主键',
  110. `CI_CONTENT` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '留言内容',
  111. `CI_IS_AUTHOR` char(1) DEFAULT NULL COMMENT '是否为作者评论,Y:作者评论,N:非作者',
  112. `CI_LIKE_COUNT` int(11) DEFAULT NULL COMMENT '评论喜欢数量',
  113. `CI_COMMENT_COUNT` int(11) DEFAULT NULL COMMENT '评论的评论、回复数量',
  114. `CI_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '留言时间',
  115. PRIMARY KEY (`CI_ID`),
  116. KEY `kl_comment_info_CI_ARTICLE_ID_index` (`CI_ARTICLE_ID`),
  117. KEY `kl_comment_info_CI_COMMENT_ID_index` (`CI_COMMENT_ID`),
  118. KEY `kl_comment_info_CI_CREATOR_ID_index` (`CI_CREATOR_ID`),
  119. KEY `kl_comment_info_CI_TARGET_ID_index` (`CI_TARGET_ID`)
  120. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文章评论信息表';
  121. -- ----------------------------
  122. -- Table structure for kl_common_resource
  123. -- ----------------------------
  124. DROP TABLE IF EXISTS `kl_common_resource`;
  125. CREATE TABLE `kl_common_resource` (
  126. `CR_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  127. `CR_TYPE_ID` varchar(36) DEFAULT NULL COMMENT '资源类型,关联kl_common_resource_type主键',
  128. `CR_TARGET_ID` varchar(36) DEFAULT NULL COMMENT '资源所属目标编号',
  129. `CR_URL` text COMMENT '资源路径',
  130. `CR_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  131. PRIMARY KEY (`CR_ID`),
  132. KEY `kl_common_resource_CR_TARGET_ID_index` (`CR_TARGET_ID`),
  133. KEY `kl_common_resource_CR_TYPE_ID_index` (`CR_TYPE_ID`)
  134. ) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8 COMMENT='统一资源';
  135. -- ----------------------------
  136. -- Table structure for kl_common_resource_type
  137. -- ----------------------------
  138. DROP TABLE IF EXISTS `kl_common_resource_type`;
  139. CREATE TABLE `kl_common_resource_type` (
  140. `CRT_ID` varchar(36) NOT NULL COMMENT '资源编号',
  141. `CRT_NAME` varchar(30) DEFAULT NULL COMMENT '资源类型名称',
  142. `CRT_FLAG` varchar(50) DEFAULT NULL COMMENT '资源类型标识',
  143. `CRT_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  144. `CRT_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  145. PRIMARY KEY (`CRT_ID`)
  146. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='统一资源类型';
  147. -- ----------------------------
  148. -- Table structure for kl_feedback
  149. -- ----------------------------
  150. DROP TABLE IF EXISTS `kl_feedback`;
  151. CREATE TABLE `kl_feedback` (
  152. `KF_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '反馈主键自增',
  153. `KF_USER_ID` varchar(36) DEFAULT NULL COMMENT '反馈用户编号,关联kl_user_info主键',
  154. `KF_CONTENT` text COMMENT '反馈内容',
  155. `KF_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '反馈时间',
  156. PRIMARY KEY (`KF_ID`)
  157. ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COMMENT='意见反馈信息表';
  158. -- ----------------------------
  159. -- Table structure for kl_user_balance_info
  160. -- ----------------------------
  161. DROP TABLE IF EXISTS `kl_user_balance_info`;
  162. CREATE TABLE `kl_user_balance_info` (
  163. `UBI_ID` varchar(36) NOT NULL COMMENT '账户主键',
  164. `UBI_USER_ID` varchar(36) DEFAULT NULL COMMENT '用户编号,关联kl_user_info主键',
  165. `UBI_TYPE_ID` varchar(36) DEFAULT NULL COMMENT '账户类型编号,关联kl_balance_type主键',
  166. `UBI_BALANCE` decimal(8,2) DEFAULT NULL COMMENT '账户余额,保留两位小数点',
  167. `UBI_IS_LOCK` char(1) DEFAULT 'N' COMMENT '账户是否锁定,Y:已锁定,N:未锁定',
  168. `UBI_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  169. `UBI_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  170. PRIMARY KEY (`UBI_ID`),
  171. KEY `kl_user_balance_info_UBI_USER_ID_index` (`UBI_USER_ID`),
  172. KEY `kl_user_balance_info_UBI_TYPE_ID_index` (`UBI_TYPE_ID`)
  173. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户账户信息表';
  174. -- ----------------------------
  175. -- Table structure for kl_user_balance_record
  176. -- ----------------------------
  177. DROP TABLE IF EXISTS `kl_user_balance_record`;
  178. CREATE TABLE `kl_user_balance_record` (
  179. `BR_ID` int(11) NOT NULL AUTO_INCREMENT,
  180. `BR_BALANCE_ID` varchar(36) DEFAULT NULL COMMENT '所属账户编号,关联kl_balance_info主键',
  181. `BR_BEFORE` decimal(8,2) DEFAULT NULL COMMENT '变动之前的值',
  182. `BR_COUNT` decimal(8,2) DEFAULT NULL COMMENT '变动的值',
  183. `BR_AFTER` decimal(8,2) DEFAULT NULL COMMENT '变动后的值',
  184. `BR_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  185. `BR_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  186. PRIMARY KEY (`BR_ID`),
  187. KEY `kl_balance_record_BR_BALANCE_ID_index` (`BR_BALANCE_ID`)
  188. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='账户变动记录';
  189. -- ----------------------------
  190. -- Table structure for kl_user_balance_type
  191. -- ----------------------------
  192. DROP TABLE IF EXISTS `kl_user_balance_type`;
  193. CREATE TABLE `kl_user_balance_type` (
  194. `UBT_ID` varchar(36) NOT NULL COMMENT '账户类型主键',
  195. `UBT_NAME` varchar(20) DEFAULT NULL COMMENT '账户类型名称',
  196. `UBT_FLAG` varchar(20) DEFAULT NULL COMMENT '账户类型标识',
  197. `UBT_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  198. PRIMARY KEY (`UBT_ID`)
  199. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户账户类型';
  200. -- ----------------------------
  201. -- Table structure for kl_user_info
  202. -- ----------------------------
  203. DROP TABLE IF EXISTS `kl_user_info`;
  204. CREATE TABLE `kl_user_info` (
  205. `UI_ID` varchar(36) CHARACTER SET utf8 NOT NULL COMMENT '主键自增',
  206. `UI_NICK_NAME` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户昵称',
  207. `UI_OPEN_ID` varchar(30) CHARACTER SET utf8 DEFAULT NULL COMMENT '用户微信openId',
  208. `UI_PASSWORD` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '用户密码',
  209. `UI_LAST_LOGIN_TIME` datetime DEFAULT NULL COMMENT '最后登录时间',
  210. `UI_STATUS` char(1) CHARACTER SET utf8 DEFAULT 'O' COMMENT '用户状态,O:正常,D:已删除',
  211. `UI_IS_LOCK` char(1) CHARACTER SET utf8 DEFAULT 'N' COMMENT '是否锁定,Y:锁定,N:未锁定',
  212. `UI_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  213. `UI_MARK` varchar(200) CHARACTER SET utf8 DEFAULT NULL COMMENT '备注信息',
  214. PRIMARY KEY (`UI_ID`),
  215. KEY `kl_user_info_UI_OPEN_ID_index` (`UI_OPEN_ID`)
  216. ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='用户基本信息';
  217. -- ----------------------------
  218. -- Table structure for kl_user_like_record
  219. -- ----------------------------
  220. DROP TABLE IF EXISTS `kl_user_like_record`;
  221. CREATE TABLE `kl_user_like_record` (
  222. `ULR_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  223. `ULR_USER_ID` varchar(36) DEFAULT NULL COMMENT '用户编号,关联kl_user_info主键',
  224. `ULR_ARTICLE_ID` varchar(36) DEFAULT NULL COMMENT '文章编号,关联kl_article_info主键',
  225. `ULR_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  226. `URL_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  227. PRIMARY KEY (`ULR_ID`),
  228. KEY `kl_user_like_record_ULR_ARTICLE_ID_index` (`ULR_ARTICLE_ID`),
  229. KEY `kl_user_like_record_ULR_USER_ID_index` (`ULR_USER_ID`)
  230. ) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 COMMENT='用户喜欢文章记录';
  231. -- ----------------------------
  232. -- Table structure for kl_user_read_record
  233. -- ----------------------------
  234. DROP TABLE IF EXISTS `kl_user_read_record`;
  235. CREATE TABLE `kl_user_read_record` (
  236. `URR_ID` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  237. `URR_USER_ID` varchar(36) DEFAULT NULL COMMENT '阅读用户编号,关联kl_user_info主键',
  238. `URR_ARTICLE_ID` varchar(36) DEFAULT NULL COMMENT '文章编号,关联kl_article_info主键',
  239. `URR_CREATE_TIME` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '阅读时间',
  240. `URR_MARK` varchar(200) DEFAULT NULL COMMENT '备注信息',
  241. PRIMARY KEY (`URR_ID`),
  242. KEY `kl_article_read_record_ARR_ARTICLE_ID_index` (`URR_ARTICLE_ID`),
  243. KEY `kl_article_read_record_ARR_USER_ID_index` (`URR_USER_ID`)
  244. ) ENGINE=InnoDB AUTO_INCREMENT=136 DEFAULT CHARSET=utf8 COMMENT='文章阅读记录';
  245. -- ----------------------------
  246. -- Table structure for oauth_access_token
  247. -- ----------------------------
  248. DROP TABLE IF EXISTS `oauth_access_token`;
  249. CREATE TABLE `oauth_access_token` (
  250. `token_id` varchar(256) DEFAULT NULL,
  251. `token` blob,
  252. `authentication_id` varchar(128) NOT NULL,
  253. `user_name` varchar(256) DEFAULT NULL,
  254. `client_id` varchar(256) DEFAULT NULL,
  255. `authentication` blob,
  256. `refresh_token` varchar(256) DEFAULT NULL,
  257. PRIMARY KEY (`authentication_id`)
  258. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  259. -- ----------------------------
  260. -- Table structure for oauth_approvals
  261. -- ----------------------------
  262. DROP TABLE IF EXISTS `oauth_approvals`;
  263. CREATE TABLE `oauth_approvals` (
  264. `userId` varchar(256) DEFAULT NULL,
  265. `clientId` varchar(256) DEFAULT NULL,
  266. `scope` varchar(256) DEFAULT NULL,
  267. `status` varchar(10) DEFAULT NULL,
  268. `expiresAt` datetime DEFAULT NULL,
  269. `lastModifiedAt` datetime DEFAULT NULL
  270. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  271. -- ----------------------------
  272. -- Table structure for oauth_client_details
  273. -- ----------------------------
  274. DROP TABLE IF EXISTS `oauth_client_details`;
  275. CREATE TABLE `oauth_client_details` (
  276. `client_id` varchar(128) NOT NULL,
  277. `resource_ids` varchar(256) DEFAULT NULL,
  278. `client_secret` varchar(256) DEFAULT NULL,
  279. `scope` varchar(256) DEFAULT NULL,
  280. `authorized_grant_types` varchar(256) DEFAULT NULL,
  281. `web_server_redirect_uri` varchar(256) DEFAULT NULL,
  282. `authorities` varchar(256) DEFAULT NULL,
  283. `access_token_validity` int(11) DEFAULT NULL,
  284. `refresh_token_validity` int(11) DEFAULT NULL,
  285. `additional_information` varchar(4096) DEFAULT NULL,
  286. `autoapprove` varchar(256) DEFAULT NULL,
  287. PRIMARY KEY (`client_id`)
  288. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  289. -- ----------------------------
  290. -- Table structure for oauth_client_token
  291. -- ----------------------------
  292. DROP TABLE IF EXISTS `oauth_client_token`;
  293. CREATE TABLE `oauth_client_token` (
  294. `token_id` varchar(256) DEFAULT NULL,
  295. `token` blob,
  296. `authentication_id` varchar(128) NOT NULL,
  297. `user_name` varchar(256) DEFAULT NULL,
  298. `client_id` varchar(256) DEFAULT NULL,
  299. PRIMARY KEY (`authentication_id`)
  300. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  301. -- ----------------------------
  302. -- Table structure for oauth_code
  303. -- ----------------------------
  304. DROP TABLE IF EXISTS `oauth_code`;
  305. CREATE TABLE `oauth_code` (
  306. `code` varchar(256) DEFAULT NULL,
  307. `authentication` blob
  308. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  309. -- ----------------------------
  310. -- Table structure for oauth_refresh_token
  311. -- ----------------------------
  312. DROP TABLE IF EXISTS `oauth_refresh_token`;
  313. CREATE TABLE `oauth_refresh_token` (
  314. `token_id` varchar(256) DEFAULT NULL,
  315. `token` blob,
  316. `authentication` blob
  317. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  318. SET FOREIGN_KEY_CHECKS = 1;

源码下载