mirror of https://github.com/elunez/eladmin
parent
d936968cbe
commit
20b794fff5
36
CHANGELOG.md
36
CHANGELOG.md
|
@ -4,4 +4,38 @@
|
|||
- 升级 Spring boot 2.4.4 。
|
||||
- 升级 Swagger 3.0.0 。
|
||||
- 升级 commons-pool2 2.9.0 。
|
||||
-
|
||||
- 升级 mapstruct 1.4.2.Final 。
|
||||
- 升级 druid 1.2.6 。
|
||||
- 升级 fastjson 1.2.76 。
|
||||
- 优化数据库脚本。
|
||||
- 替换容器,tomcat -> undertow 。
|
||||
|
||||
## 升级过程中遇到的问题及解决方法
|
||||
|
||||
### 执行数据库脚本报异常
|
||||
|
||||
MySQL 中 int,bigint 等类型不需要写长度数字。将 int(8) 这类内容改为 int。
|
||||
|
||||
### 跨域配置问题
|
||||
|
||||
> When allowCredentials is true, allowedOrigins cannot contain the special value "*“since that cannot be set on the “Access-Control-Allow-Origin” response header. To allow credentials to a set of origins, list them explicitly or consider using"allowedOriginPatterns” instead.
|
||||
|
||||
修改如下代码:
|
||||
|
||||
```java
|
||||
@Bean
|
||||
public CorsFilter corsFilter() {
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowCredentials(true);
|
||||
// 增加这一行代码
|
||||
config.addAllowedOriginPattern("*");
|
||||
// 注释掉这一行代码
|
||||
// config.addAllowedOrigin("*");
|
||||
config.addAllowedHeader("*");
|
||||
config.addAllowedMethod("*");
|
||||
source.registerCorsConfiguration("/**", config);
|
||||
return new CorsFilter(source);
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<properties>
|
||||
<hutool.version>5.3.4</hutool.version>
|
||||
<guava.version>30.1.1-jre</guava.version>
|
||||
</properties>
|
||||
|
||||
<artifactId>eladmin-common</artifactId>
|
||||
|
@ -22,5 +23,14 @@
|
|||
<artifactId>hutool-all</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${guava.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
|
@ -16,7 +16,6 @@
|
|||
package me.zhengjie.config;
|
||||
|
||||
import com.fasterxml.classmate.TypeResolver;
|
||||
import com.google.common.base.Predicates;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
@ -27,15 +26,22 @@ import org.springframework.core.Ordered;
|
|||
import org.springframework.data.domain.Pageable;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.oas.annotations.EnableOpenApi;
|
||||
import springfox.documentation.schema.AlternateTypeRule;
|
||||
import springfox.documentation.schema.AlternateTypeRuleConvention;
|
||||
import springfox.documentation.service.*;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.service.ApiKey;
|
||||
import springfox.documentation.service.AuthorizationScope;
|
||||
import springfox.documentation.service.SecurityReference;
|
||||
import springfox.documentation.service.SecurityScheme;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import static com.google.common.collect.Lists.newArrayList;
|
||||
import static springfox.documentation.schema.AlternateTypeRules.newRule;
|
||||
|
||||
|
@ -45,7 +51,7 @@ import static springfox.documentation.schema.AlternateTypeRules.newRule;
|
|||
* @date 2018-11-23
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
@EnableOpenApi
|
||||
public class SwaggerConfig {
|
||||
|
||||
@Value("${jwt.header}")
|
||||
|
@ -57,12 +63,12 @@ public class SwaggerConfig {
|
|||
@Bean
|
||||
@SuppressWarnings("all")
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
return new Docket(DocumentationType.OAS_30)
|
||||
.enable(enabled)
|
||||
.pathMapping("/")
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
.paths(Predicates.not(PathSelectors.regex("/error.*")))
|
||||
.paths(Predicate.not(PathSelectors.regex("/error.*")))
|
||||
.paths(PathSelectors.any())
|
||||
.build()
|
||||
//添加登陆认证
|
||||
|
@ -74,7 +80,7 @@ public class SwaggerConfig {
|
|||
return new ApiInfoBuilder()
|
||||
.description("一个简单且易上手的 Spring boot 后台管理框架")
|
||||
.title("EL-ADMIN 接口文档")
|
||||
.version("2.6")
|
||||
.version("2.7")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package me.zhengjie.utils;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package me.zhengjie.utils;
|
||||
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
import static me.zhengjie.utils.EncryptUtils.*;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static me.zhengjie.utils.EncryptUtils.desDecrypt;
|
||||
import static me.zhengjie.utils.EncryptUtils.desEncrypt;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class EncryptUtilsTest {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package me.zhengjie.utils;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static me.zhengjie.utils.FileUtil.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
public class FileUtilTest {
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
package me.zhengjie.utils;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.mock.web.MockHttpServletRequest;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.Date;
|
||||
|
||||
import static me.zhengjie.utils.StringUtils.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
public class StringUtilsTest {
|
||||
|
||||
|
|
|
@ -20,8 +20,6 @@ import me.zhengjie.annotation.rest.AnonymousGetMapping;
|
|||
import me.zhengjie.utils.SpringContextHolder;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.servlet.server.ServletWebServerFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
|
@ -51,12 +49,13 @@ public class AppRun {
|
|||
return new SpringContextHolder();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ServletWebServerFactory webServerFactory() {
|
||||
TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory();
|
||||
fa.addConnectorCustomizers(connector -> connector.setProperty("relaxedQueryChars", "[]{}"));
|
||||
return fa;
|
||||
}
|
||||
// 最新的tomcat不允许查询参数中包含[]{}字符,如果不用 tomcat 注释掉该行就行。
|
||||
// @Bean
|
||||
// public ServletWebServerFactory webServerFactory() {
|
||||
// TomcatServletWebServerFactory fa = new TomcatServletWebServerFactory();
|
||||
// fa.addConnectorCustomizers(connector -> connector.setProperty("relaxedQueryChars", "[]{}"));
|
||||
// return fa;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 访问首页提示
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.springframework.http.converter.HttpMessageConverter;
|
|||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.filter.CorsFilter;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
@ -54,7 +55,8 @@ public class ConfigurerAdapter implements WebMvcConfigurer {
|
|||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
CorsConfiguration config = new CorsConfiguration();
|
||||
config.setAllowCredentials(true);
|
||||
config.addAllowedOrigin("*");
|
||||
config.addAllowedOriginPattern("*");
|
||||
// config.addAllowedOrigin("*");
|
||||
config.addAllowedHeader("*");
|
||||
config.addAllowedMethod("*");
|
||||
source.registerCorsConfiguration("/**", config);
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
| __| | | (_| | (_| | | | | | | | | | |
|
||||
\___|_| \__,_|\__,_|_| |_| |_|_|_| |_|
|
||||
|
||||
:: Spring Boot :: (v2.1.0.RELEASE)
|
||||
:: Spring Boot :: (v2.4.4)
|
|
@ -1,11 +1,9 @@
|
|||
package me.zhengjie;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
//@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class EladminSystemApplicationTests {
|
||||
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
package me.zhengjie;
|
||||
|
||||
import me.zhengjie.modules.security.service.UserDetailsServiceImpl;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
@ExtendWith(SpringExtension.class)
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = AppRun.class)
|
||||
public class LoginCacheTest {
|
||||
|
||||
@Resource(name = "userDetailsService")
|
||||
|
|
16
pom.xml
16
pom.xml
|
@ -32,10 +32,10 @@
|
|||
<java.version>11</java.version>
|
||||
<log4jdbc.version>1.16</log4jdbc.version>
|
||||
<swagger.version>3.0.0</swagger.version>
|
||||
<fastjson.version>1.2.70</fastjson.version>
|
||||
<druid.version>1.1.24</druid.version>
|
||||
<fastjson.version>1.2.76</fastjson.version>
|
||||
<druid.version>1.2.6</druid.version>
|
||||
<commons-pool2.version>2.9.0</commons-pool2.version>
|
||||
<mapstruct.version>1.3.1.Final</mapstruct.version>
|
||||
<mapstruct.version>1.4.2.Final</mapstruct.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
|
@ -49,6 +49,16 @@
|
|||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!--Spring boot 测试-->
|
||||
|
|
|
@ -22,7 +22,7 @@ SET FOREIGN_KEY_CHECKS = 0;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `code_column_config`;
|
||||
CREATE TABLE `code_column_config` (
|
||||
`column_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`column_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`table_name` varchar(255) DEFAULT NULL,
|
||||
`column_name` varchar(255) DEFAULT NULL,
|
||||
`column_type` varchar(255) DEFAULT NULL,
|
||||
|
@ -45,7 +45,7 @@ CREATE TABLE `code_column_config` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `code_gen_config`;
|
||||
CREATE TABLE `code_gen_config` (
|
||||
`config_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`config_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`table_name` varchar(255) DEFAULT NULL COMMENT '表名',
|
||||
`author` varchar(255) DEFAULT NULL COMMENT '作者',
|
||||
`cover` bit(1) DEFAULT NULL COMMENT '是否覆盖',
|
||||
|
@ -64,12 +64,12 @@ CREATE TABLE `code_gen_config` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `mnt_app`;
|
||||
CREATE TABLE `mnt_app` (
|
||||
`app_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`app_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '应用名称',
|
||||
`upload_path` varchar(255) DEFAULT NULL COMMENT '上传目录',
|
||||
`deploy_path` varchar(255) DEFAULT NULL COMMENT '部署路径',
|
||||
`backup_path` varchar(255) DEFAULT NULL COMMENT '备份路径',
|
||||
`port` int(255) DEFAULT NULL COMMENT '应用端口',
|
||||
`port` int DEFAULT NULL COMMENT '应用端口',
|
||||
`start_script` varchar(4000) DEFAULT NULL COMMENT '启动脚本',
|
||||
`deploy_script` varchar(4000) DEFAULT NULL COMMENT '部署脚本',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
|
@ -113,8 +113,8 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `mnt_deploy`;
|
||||
CREATE TABLE `mnt_deploy` (
|
||||
`deploy_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`app_id` bigint(20) DEFAULT NULL COMMENT '应用编号',
|
||||
`deploy_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`app_id` bigint DEFAULT NULL COMMENT '应用编号',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
|
@ -154,8 +154,8 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `mnt_deploy_server`;
|
||||
CREATE TABLE `mnt_deploy_server` (
|
||||
`deploy_id` bigint(20) NOT NULL COMMENT '部署ID',
|
||||
`server_id` bigint(20) NOT NULL COMMENT '服务ID',
|
||||
`deploy_id` bigint NOT NULL COMMENT '部署ID',
|
||||
`server_id` bigint NOT NULL COMMENT '服务ID',
|
||||
PRIMARY KEY (`deploy_id`,`server_id`) USING BTREE,
|
||||
KEY `FKeaaha7jew9a02b3bk9ghols53` (`server_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='应用与服务器关联';
|
||||
|
@ -171,12 +171,12 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `mnt_server`;
|
||||
CREATE TABLE `mnt_server` (
|
||||
`server_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`server_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`account` varchar(50) DEFAULT NULL COMMENT '账号',
|
||||
`ip` varchar(20) DEFAULT NULL COMMENT 'IP地址',
|
||||
`name` varchar(100) DEFAULT NULL COMMENT '名称',
|
||||
`password` varchar(100) DEFAULT NULL COMMENT '密码',
|
||||
`port` int(11) DEFAULT NULL COMMENT '端口',
|
||||
`port` int DEFAULT NULL COMMENT '端口',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
|
@ -190,11 +190,11 @@ CREATE TABLE `mnt_server` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dept`;
|
||||
CREATE TABLE `sys_dept` (
|
||||
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` bigint(20) DEFAULT NULL COMMENT '上级部门',
|
||||
`sub_count` int(5) DEFAULT 0 COMMENT '子部门数目',
|
||||
`dept_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` bigint DEFAULT NULL COMMENT '上级部门',
|
||||
`sub_count` int DEFAULT 0 COMMENT '子部门数目',
|
||||
`name` varchar(255) NOT NULL COMMENT '名称',
|
||||
`dept_sort` int(5) DEFAULT 999 COMMENT '排序',
|
||||
`dept_sort` int DEFAULT 999 COMMENT '排序',
|
||||
`enabled` bit(1) NOT NULL COMMENT '状态',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
|
@ -223,7 +223,7 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dict`;
|
||||
CREATE TABLE `sys_dict` (
|
||||
`dict_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`dict_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '字典名称',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
|
@ -247,11 +247,11 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_dict_detail`;
|
||||
CREATE TABLE `sys_dict_detail` (
|
||||
`detail_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`dict_id` bigint(11) DEFAULT NULL COMMENT '字典id',
|
||||
`detail_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`dict_id` bigint DEFAULT NULL COMMENT '字典id',
|
||||
`label` varchar(255) NOT NULL COMMENT '字典标签',
|
||||
`value` varchar(255) NOT NULL COMMENT '字典值',
|
||||
`dict_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||
`dict_sort` int DEFAULT NULL COMMENT '排序',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
|
@ -277,10 +277,10 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_job`;
|
||||
CREATE TABLE `sys_job` (
|
||||
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`job_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '岗位名称',
|
||||
`enabled` bit(1) NOT NULL COMMENT '岗位状态',
|
||||
`job_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||
`job_sort` int DEFAULT NULL COMMENT '排序',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||||
|
@ -305,13 +305,13 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_log`;
|
||||
CREATE TABLE `sys_log` (
|
||||
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`log_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`description` varchar(255) DEFAULT NULL,
|
||||
`log_type` varchar(255) DEFAULT NULL,
|
||||
`method` varchar(255) DEFAULT NULL,
|
||||
`params` text DEFAULT NULL,
|
||||
`request_ip` varchar(255) DEFAULT NULL,
|
||||
`time` bigint(20) DEFAULT NULL,
|
||||
`time` bigint DEFAULT NULL,
|
||||
`username` varchar(255) DEFAULT NULL,
|
||||
`address` varchar(255) DEFAULT NULL,
|
||||
`browser` varchar(255) DEFAULT NULL,
|
||||
|
@ -327,14 +327,14 @@ CREATE TABLE `sys_log` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_menu`;
|
||||
CREATE TABLE `sys_menu` (
|
||||
`menu_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
|
||||
`sub_count` int(5) DEFAULT 0 COMMENT '子菜单数目',
|
||||
`type` int(11) DEFAULT NULL COMMENT '菜单类型',
|
||||
`menu_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`pid` bigint DEFAULT NULL COMMENT '上级菜单ID',
|
||||
`sub_count` int DEFAULT 0 COMMENT '子菜单数目',
|
||||
`type` int DEFAULT NULL COMMENT '菜单类型',
|
||||
`title` varchar(255) DEFAULT NULL COMMENT '菜单标题',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '组件名称',
|
||||
`component` varchar(255) DEFAULT NULL COMMENT '组件',
|
||||
`menu_sort` int(5) DEFAULT NULL COMMENT '排序',
|
||||
`menu_sort` int DEFAULT NULL COMMENT '排序',
|
||||
`icon` varchar(255) DEFAULT NULL COMMENT '图标',
|
||||
`path` varchar(255) DEFAULT NULL COMMENT '链接地址',
|
||||
`i_frame` bit(1) DEFAULT NULL COMMENT '是否外链',
|
||||
|
@ -438,7 +438,7 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_quartz_job`;
|
||||
CREATE TABLE `sys_quartz_job` (
|
||||
`job_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`job_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`bean_name` varchar(255) DEFAULT NULL COMMENT 'Spring Bean名称',
|
||||
`cron_expression` varchar(255) DEFAULT NULL COMMENT 'cron 表达式',
|
||||
`is_pause` bit(1) DEFAULT NULL COMMENT '状态:1暂停、0启用',
|
||||
|
@ -473,7 +473,7 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_quartz_log`;
|
||||
CREATE TABLE `sys_quartz_log` (
|
||||
`log_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`log_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`bean_name` varchar(255) DEFAULT NULL,
|
||||
`create_time` datetime DEFAULT NULL,
|
||||
`cron_expression` varchar(255) DEFAULT NULL,
|
||||
|
@ -491,9 +491,9 @@ CREATE TABLE `sys_quartz_log` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_role`;
|
||||
CREATE TABLE `sys_role` (
|
||||
`role_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`role_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`name` varchar(255) NOT NULL COMMENT '名称',
|
||||
`level` int(255) DEFAULT NULL COMMENT '角色级别',
|
||||
`level` int DEFAULT NULL COMMENT '角色级别',
|
||||
`description` varchar(255) DEFAULT NULL COMMENT '描述',
|
||||
`data_scope` varchar(255) DEFAULT NULL COMMENT '数据权限',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
|
@ -518,8 +518,8 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_roles_depts`;
|
||||
CREATE TABLE `sys_roles_depts` (
|
||||
`role_id` bigint(20) NOT NULL,
|
||||
`dept_id` bigint(20) NOT NULL,
|
||||
`role_id` bigint NOT NULL,
|
||||
`dept_id` bigint NOT NULL,
|
||||
PRIMARY KEY (`role_id`,`dept_id`) USING BTREE,
|
||||
KEY `FK7qg6itn5ajdoa9h9o78v9ksur` (`dept_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色部门关联';
|
||||
|
@ -529,8 +529,8 @@ CREATE TABLE `sys_roles_depts` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_roles_menus`;
|
||||
CREATE TABLE `sys_roles_menus` (
|
||||
`menu_id` bigint(20) NOT NULL COMMENT '菜单ID',
|
||||
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||
`menu_id` bigint NOT NULL COMMENT '菜单ID',
|
||||
`role_id` bigint NOT NULL COMMENT '角色ID',
|
||||
PRIMARY KEY (`menu_id`,`role_id`) USING BTREE,
|
||||
KEY `FKcngg2qadojhi3a651a5adkvbq` (`role_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='角色菜单关联';
|
||||
|
@ -647,8 +647,8 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_user`;
|
||||
CREATE TABLE `sys_user` (
|
||||
`user_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`dept_id` bigint(20) DEFAULT NULL COMMENT '部门名称',
|
||||
`user_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`dept_id` bigint DEFAULT NULL COMMENT '部门名称',
|
||||
`username` varchar(255) DEFAULT NULL COMMENT '用户名',
|
||||
`nick_name` varchar(255) DEFAULT NULL COMMENT '昵称',
|
||||
`gender` varchar(2) DEFAULT NULL COMMENT '性别',
|
||||
|
@ -658,7 +658,7 @@ CREATE TABLE `sys_user` (
|
|||
`avatar_path` varchar(255) DEFAULT NULL COMMENT '头像真实路径',
|
||||
`password` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||
`is_admin` bit(1) DEFAULT b'0' COMMENT '是否为admin账号',
|
||||
`enabled` bigint(20) DEFAULT NULL COMMENT '状态:1启用、0禁用',
|
||||
`enabled` bigint DEFAULT NULL COMMENT '状态:1启用、0禁用',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||||
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||||
`pwd_reset_time` datetime DEFAULT NULL COMMENT '修改密码的时间',
|
||||
|
@ -687,8 +687,8 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_users_jobs`;
|
||||
CREATE TABLE `sys_users_jobs` (
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`job_id` bigint(20) NOT NULL COMMENT '岗位ID',
|
||||
`user_id` bigint NOT NULL COMMENT '用户ID',
|
||||
`job_id` bigint NOT NULL COMMENT '岗位ID',
|
||||
PRIMARY KEY (`user_id`,`job_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
@ -705,8 +705,8 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `sys_users_roles`;
|
||||
CREATE TABLE `sys_users_roles` (
|
||||
`user_id` bigint(20) NOT NULL COMMENT '用户ID',
|
||||
`role_id` bigint(20) NOT NULL COMMENT '角色ID',
|
||||
`user_id` bigint NOT NULL COMMENT '用户ID',
|
||||
`role_id` bigint NOT NULL COMMENT '角色ID',
|
||||
PRIMARY KEY (`user_id`,`role_id`) USING BTREE,
|
||||
KEY `FKq4eq273l04bpu4efj0jd0jb98` (`role_id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='用户角色关联';
|
||||
|
@ -724,7 +724,7 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tool_alipay_config`;
|
||||
CREATE TABLE `tool_alipay_config` (
|
||||
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||
`config_id` bigint NOT NULL COMMENT 'ID',
|
||||
`app_id` varchar(255) DEFAULT NULL COMMENT '应用ID',
|
||||
`charset` varchar(255) DEFAULT NULL COMMENT '编码',
|
||||
`format` varchar(255) DEFAULT NULL COMMENT '类型 固定格式json',
|
||||
|
@ -750,7 +750,7 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tool_email_config`;
|
||||
CREATE TABLE `tool_email_config` (
|
||||
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||
`config_id` bigint NOT NULL COMMENT 'ID',
|
||||
`from_user` varchar(255) DEFAULT NULL COMMENT '收件人',
|
||||
`host` varchar(255) DEFAULT NULL COMMENT '邮件服务器SMTP地址',
|
||||
`pass` varchar(255) DEFAULT NULL COMMENT '密码',
|
||||
|
@ -764,7 +764,7 @@ CREATE TABLE `tool_email_config` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tool_local_storage`;
|
||||
CREATE TABLE `tool_local_storage` (
|
||||
`storage_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`storage_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`real_name` varchar(255) DEFAULT NULL COMMENT '文件真实的名称',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '文件名',
|
||||
`suffix` varchar(255) DEFAULT NULL COMMENT '后缀',
|
||||
|
@ -789,7 +789,7 @@ COMMIT;
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tool_qiniu_config`;
|
||||
CREATE TABLE `tool_qiniu_config` (
|
||||
`config_id` bigint(20) NOT NULL COMMENT 'ID',
|
||||
`config_id` bigint NOT NULL COMMENT 'ID',
|
||||
`access_key` text DEFAULT NULL COMMENT 'accessKey',
|
||||
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符',
|
||||
`host` varchar(255) NOT NULL COMMENT '外链域名',
|
||||
|
@ -804,7 +804,7 @@ CREATE TABLE `tool_qiniu_config` (
|
|||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `tool_qiniu_content`;
|
||||
CREATE TABLE `tool_qiniu_content` (
|
||||
`content_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`content_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||||
`bucket` varchar(255) DEFAULT NULL COMMENT 'Bucket 识别符',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '文件名称',
|
||||
`size` varchar(255) DEFAULT NULL COMMENT '文件大小',
|
||||
|
|
Loading…
Reference in New Issue