Pre Merge pull request !35 from diaomina/master

pull/35/MERGE
diaomina 5 years ago committed by Gitee
commit cd819d7330

@ -1,204 +1,203 @@
package com.ruoyi.file.utils; package com.ruoyi.file.utils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import org.apache.commons.io.FilenameUtils; import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.core.exception.file.FileNameLengthLimitExceededException; import com.ruoyi.common.core.exception.file.FileNameLengthLimitExceededException;
import com.ruoyi.common.core.exception.file.FileSizeLimitExceededException; import com.ruoyi.common.core.exception.file.FileSizeLimitExceededException;
import com.ruoyi.common.core.exception.file.InvalidExtensionException; import com.ruoyi.common.core.exception.file.InvalidExtensionException;
import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.IdUtils; import com.ruoyi.common.core.utils.IdUtils;
import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.common.core.utils.file.MimeTypeUtils; import com.ruoyi.common.core.utils.file.MimeTypeUtils;
/** /**
* *
* *
* @author ruoyi * @author ruoyi
*/ */
public class FileUploadUtils public class FileUploadUtils
{ {
/** /**
* 50M * 50M
*/ */
public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024; public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
/** /**
* 100 * 100
*/ */
public static final int DEFAULT_FILE_NAME_LENGTH = 100; public static final int DEFAULT_FILE_NAME_LENGTH = 100;
/** /**
* *
*/ */
@Value("${file.prefix}") @Value("${file.prefix}")
public String localFilePrefix; public String localFilePrefix;
/** /**
* *
* *
* @param baseDir * @param baseDir
* @param file * @param file
* @return * @return
* @throws IOException * @throws IOException
*/ */
public static final String upload(String baseDir, MultipartFile file) throws IOException public static final String upload(String baseDir, MultipartFile file) throws IOException
{ {
try try
{ {
return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION);
} }
catch (Exception e) catch (Exception e)
{ {
throw new IOException(e.getMessage(), e); throw new IOException(e.getMessage(), e);
} }
} }
/** /**
* *
* *
* @param baseDir * @param baseDir
* @param file * @param file
* @param extension * @return
* @return * @throws FileSizeLimitExceededException
* @throws FileSizeLimitExceededException * @throws FileNameLengthLimitExceededException
* @throws FileNameLengthLimitExceededException * @throws IOException
* @throws IOException * @throws InvalidExtensionException
* @throws InvalidExtensionException */
*/ public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension)
public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException,
throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, InvalidExtensionException
InvalidExtensionException {
{ int fileNamelength = file.getOriginalFilename().length();
int fileNamelength = file.getOriginalFilename().length(); if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) {
{ throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); }
}
assertAllowed(file, allowedExtension);
assertAllowed(file, allowedExtension);
String fileName = extractFilename(file);
String fileName = extractFilename(file);
File desc = getAbsoluteFile(baseDir, fileName);
File desc = getAbsoluteFile(baseDir, fileName); file.transferTo(desc);
file.transferTo(desc); String pathFileName = getPathFileName(fileName);
String pathFileName = getPathFileName(fileName); return pathFileName;
return pathFileName; }
}
/**
/** *
* */
*/ public static final String extractFilename(MultipartFile file)
public static final String extractFilename(MultipartFile file) {
{ String fileName = file.getOriginalFilename();
String fileName = file.getOriginalFilename(); String extension = getExtension(file);
String extension = getExtension(file); fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension;
fileName = DateUtils.datePath() + "/" + IdUtils.fastUUID() + "." + extension; return fileName;
return fileName; }
}
private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException
private static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException {
{ File desc = new File(uploadDir + File.separator + fileName);
File desc = new File(uploadDir + File.separator + fileName);
if (!desc.exists())
if (!desc.exists()) {
{ if (!desc.getParentFile().exists())
if (!desc.getParentFile().exists()) {
{ desc.getParentFile().mkdirs();
desc.getParentFile().mkdirs(); }
} }
} return desc;
return desc; }
}
private static final String getPathFileName(String fileName) throws IOException
private static final String getPathFileName(String fileName) throws IOException {
{ String pathFileName = "/" + fileName;
String pathFileName = "/" + fileName; return pathFileName;
return pathFileName; }
}
/**
/** *
* *
* * @param file
* @param file * @return
* @return * @throws FileSizeLimitExceededException
* @throws FileSizeLimitExceededException * @throws InvalidExtensionException
* @throws InvalidExtensionException */
*/ public static final void assertAllowed(MultipartFile file, String[] allowedExtension)
public static final void assertAllowed(MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, InvalidExtensionException
throws FileSizeLimitExceededException, InvalidExtensionException {
{ long size = file.getSize();
long size = file.getSize(); if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE)
if (DEFAULT_MAX_SIZE != -1 && size > DEFAULT_MAX_SIZE) {
{ throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024);
throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024); }
}
String fileName = file.getOriginalFilename();
String fileName = file.getOriginalFilename(); String extension = getExtension(file);
String extension = getExtension(file); if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension))
if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) {
{ if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION)
if (allowedExtension == MimeTypeUtils.IMAGE_EXTENSION) {
{ throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension,
throw new InvalidExtensionException.InvalidImageExtensionException(allowedExtension, extension, fileName);
fileName); }
} else if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION)
else if (allowedExtension == MimeTypeUtils.FLASH_EXTENSION) {
{ throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension,
throw new InvalidExtensionException.InvalidFlashExtensionException(allowedExtension, extension, fileName);
fileName); }
} else if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION)
else if (allowedExtension == MimeTypeUtils.MEDIA_EXTENSION) {
{ throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension,
throw new InvalidExtensionException.InvalidMediaExtensionException(allowedExtension, extension, fileName);
fileName); }
} else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION)
else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION) {
{ throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension,
throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension, fileName);
fileName); }
} else
else {
{ throw new InvalidExtensionException(allowedExtension, extension, fileName);
throw new InvalidExtensionException(allowedExtension, extension, fileName); }
} }
} }
}
/**
/** * MIMEMIME
* MIMEMIME *
* * @param extension
* @param extension * @param allowedExtension
* @param allowedExtension * @return
* @return */
*/ public static final boolean isAllowedExtension(String extension, String[] allowedExtension)
public static final boolean isAllowedExtension(String extension, String[] allowedExtension) {
{ for (String str : allowedExtension)
for (String str : allowedExtension) {
{ if (str.equalsIgnoreCase(extension))
if (str.equalsIgnoreCase(extension)) {
{ return true;
return true; }
} }
} return false;
return false; }
}
/**
/** *
* *
* * @param file
* @param file * @return
* @return */
*/ public static final String getExtension(MultipartFile file)
public static final String getExtension(MultipartFile file) {
{ String extension = FilenameUtils.getExtension(file.getOriginalFilename());
String extension = FilenameUtils.getExtension(file.getOriginalFilename()); if (StringUtils.isEmpty(extension))
if (StringUtils.isEmpty(extension)) {
{ extension = MimeTypeUtils.getExtension(file.getContentType());
extension = MimeTypeUtils.getExtension(file.getContentType()); }
} return extension;
return extension; }
}
} }

@ -36,7 +36,7 @@ insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_mod
(2,'ruoyi-gateway-dev.yml','DEFAULT_GROUP','spring:\r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n cloud:\r\n gateway:\r\n discovery:\r\n locator:\r\n lowerCaseServiceId: true\r\n enabled: true\r\n routes:\r\n # 认证中心\r\n - id: ruoyi-auth\r\n uri: lb://ruoyi-auth\r\n predicates:\r\n - Path=/auth/**\r\n filters:\r\n # 验证码处理\r\n - CacheRequestFilter\r\n - ValidateCodeFilter\r\n - StripPrefix=1\r\n # 代码生成\r\n - id: ruoyi-gen\r\n uri: lb://ruoyi-gen\r\n predicates:\r\n - Path=/code/**\r\n filters:\r\n - StripPrefix=1\r\n # 定时任务\r\n - id: ruoyi-job\r\n uri: lb://ruoyi-job\r\n predicates:\r\n - Path=/schedule/**\r\n filters:\r\n - StripPrefix=1\r\n # 系统模块\r\n - id: ruoyi-system\r\n uri: lb://ruoyi-system\r\n predicates:\r\n - Path=/system/**\r\n filters:\r\n - StripPrefix=1\r\n # 文件服务\r\n - id: ruoyi-file\r\n uri: lb://ruoyi-file\r\n predicates:\r\n - Path=/file/**\r\n filters:\r\n - StripPrefix=1\r\n\r\n# 不校验白名单\r\nignore:\r\n whites:\r\n - /auth/logout\r\n - /auth/login\r\n - /*/v2/api-docs\r\n - /csrf\r\n','ef4a58daf989827334b3aac1c9d68392','2020-05-14 14:17:55','2020-11-18 17:53:23',NULL,'0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','null'), (2,'ruoyi-gateway-dev.yml','DEFAULT_GROUP','spring:\r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n cloud:\r\n gateway:\r\n discovery:\r\n locator:\r\n lowerCaseServiceId: true\r\n enabled: true\r\n routes:\r\n # 认证中心\r\n - id: ruoyi-auth\r\n uri: lb://ruoyi-auth\r\n predicates:\r\n - Path=/auth/**\r\n filters:\r\n # 验证码处理\r\n - CacheRequestFilter\r\n - ValidateCodeFilter\r\n - StripPrefix=1\r\n # 代码生成\r\n - id: ruoyi-gen\r\n uri: lb://ruoyi-gen\r\n predicates:\r\n - Path=/code/**\r\n filters:\r\n - StripPrefix=1\r\n # 定时任务\r\n - id: ruoyi-job\r\n uri: lb://ruoyi-job\r\n predicates:\r\n - Path=/schedule/**\r\n filters:\r\n - StripPrefix=1\r\n # 系统模块\r\n - id: ruoyi-system\r\n uri: lb://ruoyi-system\r\n predicates:\r\n - Path=/system/**\r\n filters:\r\n - StripPrefix=1\r\n # 文件服务\r\n - id: ruoyi-file\r\n uri: lb://ruoyi-file\r\n predicates:\r\n - Path=/file/**\r\n filters:\r\n - StripPrefix=1\r\n\r\n# 不校验白名单\r\nignore:\r\n whites:\r\n - /auth/logout\r\n - /auth/login\r\n - /*/v2/api-docs\r\n - /csrf\r\n','ef4a58daf989827334b3aac1c9d68392','2020-05-14 14:17:55','2020-11-18 17:53:23',NULL,'0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','null'),
(3,'ruoyi-auth-dev.yml','DEFAULT_GROUP','spring: \r\n datasource:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: password\r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n','868c15010a7a15c027d4c90a48aabb3e','2020-11-20 00:00:00','2020-11-20 00:00:00',NULL,'0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','null'), (3,'ruoyi-auth-dev.yml','DEFAULT_GROUP','spring: \r\n datasource:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: password\r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n','868c15010a7a15c027d4c90a48aabb3e','2020-11-20 00:00:00','2020-11-20 00:00:00',NULL,'0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','null'),
(4,'ruoyi-monitor-dev.yml','DEFAULT_GROUP','# spring\r\nspring: \r\n security:\r\n user:\r\n name: ruoyi\r\n password: 123456\r\n boot:\r\n admin:\r\n ui:\r\n title: 若依服务状态监控\r\n','d8997d0707a2fd5d9fc4e8409da38129','2020-11-20 00:00:00','2020-12-21 16:28:07',NULL,'0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','null'), (4,'ruoyi-monitor-dev.yml','DEFAULT_GROUP','# spring\r\nspring: \r\n security:\r\n user:\r\n name: ruoyi\r\n password: 123456\r\n boot:\r\n admin:\r\n ui:\r\n title: 若依服务状态监控\r\n','d8997d0707a2fd5d9fc4e8409da38129','2020-11-20 00:00:00','2020-12-21 16:28:07',NULL,'0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','null'),
(5,'ruoyi-system-dev.yml','DEFAULT_GROUP','# spring配置\r\nspring: \r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n datasource:\r\n druid:\r\n stat-view-servlet:\r\n enabled: true\r\n loginUsername: admin\r\n loginPassword: 123456\r\n dynamic:\r\n druid:\r\n initial-size: 5\r\n min-idle: 5\r\n maxActive: 20\r\n maxWait: 60000\r\n timeBetweenEvictionRunsMillis: 60000\r\n minEvictableIdleTimeMillis: 300000\r\n validationQuery: SELECT 1 FROM DUAL\r\n testWhileIdle: true\r\n testOnBorrow: false\r\n testOnReturn: false\r\n poolPreparedStatements: true\r\n maxPoolPreparedStatementPerConnectionSize: 20\r\n filters: stat,wall,slf4j\r\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\r\n datasource:\r\n # 主库数据源\r\n master:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: password\r\n # 从库数据源\r\n # slave:\r\n # url: \r\n # username: \r\n # password: \r\n # driver-class-name: \r\n\r\n# mybatis配置\r\nmybatis:\r\n # 搜索指定包别名\r\n typeAliasesPackage: com.ruoyi.system\r\n # 配置mapper的扫描找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger配置\r\nswagger:\r\n title: 系统模块接口文档\r\n license: Powered By ruoyi\r\n licenseUrl: https://ruoyi.vip\r\n authorization:\r\n name: RuoYi OAuth\r\n auth-regex: ^.*$\r\n authorization-scope-list:\r\n - scope: server\r\n description: 客户端授权范围\r\n token-url-list:\r\n - http://localhost:8080/auth/oauth/token\r\n','c8eede0126999265ffb465a21502add7','2020-11-20 00:00:00','2020-12-21 16:27:55',NULL,'0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','null'), (5,'ruoyi-system-dev.yml','DEFAULT_GROUP','# spring配置\nspring: \n redis: \n host: localhost \n port: 6379 \n password: \n datasource: \n druid:\n stat-view-servlet: \n enabled: true \n loginUsername: admin \n loginPassword: 123456 \n dynamic:\n druid:\n initial-size: 5 \n min-idle: 5 \n maxActive: 20 \n maxWait: 60000 \n timeBetweenEvictionRunsMillis: 60000 \n minEvictableIdleTimeMillis: 300000 \n validationQuery: SELECT 1 FROM DUAL \n testWhileIdle: true \n testOnBorrow: false \n testOnReturn: false \n poolPreparedStatements: true \n maxPoolPreparedStatementPerConnectionSize: 20 \n filters: stat,wall,slf4j \n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource: \n # 主库数据源\n master: \n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: toor\n driver-class-name: com.mysql.cj.jdbc.Driver\n # 从库数据源\n # slave:\n # url: \n # username: \n # password: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.system\n # 配置mapper的扫描找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n authorization:\n name: RuoYi OAuth\n auth-regex: ^.*$\n authorization-scope-list:\n - scope: server\n description: 客户端授权范围\n token-url-list:\n - http://localhost:8080/auth/oauth/token\n','c8eede0126999265ffb465a21502add7','2020-11-20 00:00:00','2020-12-21 16:27:55',NULL,'0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','null'),
(6,'ruoyi-gen-dev.yml','DEFAULT_GROUP','# spring配置\r\nspring: \r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n datasource: \r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: password\r\n\r\n# mybatis配置\r\nmybatis:\r\n # 搜索指定包别名\r\n typeAliasesPackage: com.ruoyi.gen.domain\r\n # 配置mapper的扫描找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger配置\r\nswagger:\r\n title: 代码生成接口文档\r\n license: Powered By ruoyi\r\n licenseUrl: https://ruoyi.vip\r\n authorization:\r\n name: RuoYi OAuth\r\n auth-regex: ^.*$\r\n authorization-scope-list:\r\n - scope: server\r\n description: 客户端授权范围\r\n token-url-list:\r\n - http://localhost:8080/auth/oauth/token\r\n\r\n# 代码生成\r\ngen: \r\n # 作者\r\n author: ruoyi\r\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\r\n packageName: com.ruoyi.system\r\n # 自动去除表前缀默认是false\r\n autoRemovePre: false\r\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\r\n tablePrefix: sys_\r\n','5554d54c838876bf2372934c0631aa1b','2020-11-20 00:00:00','2020-12-21 16:23:44',NULL,'0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','null'), (6,'ruoyi-gen-dev.yml','DEFAULT_GROUP','# spring配置\r\nspring: \r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n datasource: \r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: password\r\n\r\n# mybatis配置\r\nmybatis:\r\n # 搜索指定包别名\r\n typeAliasesPackage: com.ruoyi.gen.domain\r\n # 配置mapper的扫描找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger配置\r\nswagger:\r\n title: 代码生成接口文档\r\n license: Powered By ruoyi\r\n licenseUrl: https://ruoyi.vip\r\n authorization:\r\n name: RuoYi OAuth\r\n auth-regex: ^.*$\r\n authorization-scope-list:\r\n - scope: server\r\n description: 客户端授权范围\r\n token-url-list:\r\n - http://localhost:8080/auth/oauth/token\r\n\r\n# 代码生成\r\ngen: \r\n # 作者\r\n author: ruoyi\r\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\r\n packageName: com.ruoyi.system\r\n # 自动去除表前缀默认是false\r\n autoRemovePre: false\r\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\r\n tablePrefix: sys_\r\n','5554d54c838876bf2372934c0631aa1b','2020-11-20 00:00:00','2020-12-21 16:23:44',NULL,'0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','null'),
(7,'ruoyi-job-dev.yml','DEFAULT_GROUP','# spring配置\r\nspring: \r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n datasource:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: password\r\n\r\n# mybatis配置\r\nmybatis:\r\n # 搜索指定包别名\r\n typeAliasesPackage: com.ruoyi.job.domain\r\n # 配置mapper的扫描找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger配置\r\nswagger:\r\n title: 定时任务接口文档\r\n license: Powered By ruoyi\r\n licenseUrl: https://ruoyi.vip\r\n authorization:\r\n name: RuoYi OAuth\r\n auth-regex: ^.*$\r\n authorization-scope-list:\r\n - scope: server\r\n description: 客户端授权范围\r\n token-url-list:\r\n - http://localhost:8080/auth/oauth/token\r\n','b187acdcbfb8be114f0570bc569ca96d','2020-11-20 00:00:00','2020-12-21 16:24:07',NULL,'0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','null'), (7,'ruoyi-job-dev.yml','DEFAULT_GROUP','# spring配置\r\nspring: \r\n redis:\r\n host: localhost\r\n port: 6379\r\n password: \r\n datasource:\r\n driver-class-name: com.mysql.cj.jdbc.Driver\r\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\r\n username: root\r\n password: password\r\n\r\n# mybatis配置\r\nmybatis:\r\n # 搜索指定包别名\r\n typeAliasesPackage: com.ruoyi.job.domain\r\n # 配置mapper的扫描找到所有的mapper.xml映射文件\r\n mapperLocations: classpath:mapper/**/*.xml\r\n\r\n# swagger配置\r\nswagger:\r\n title: 定时任务接口文档\r\n license: Powered By ruoyi\r\n licenseUrl: https://ruoyi.vip\r\n authorization:\r\n name: RuoYi OAuth\r\n auth-regex: ^.*$\r\n authorization-scope-list:\r\n - scope: server\r\n description: 客户端授权范围\r\n token-url-list:\r\n - http://localhost:8080/auth/oauth/token\r\n','b187acdcbfb8be114f0570bc569ca96d','2020-11-20 00:00:00','2020-12-21 16:24:07',NULL,'0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','null'),
(8,'ruoyi-file-dev.yml','DEFAULT_GROUP','# 本地文件上传 \r\nfile:\r\n domain: http://127.0.0.1:9300\r\n path: D:/ruoyi/uploadPath\r\n prefix: /statics\r\n\r\n# FastDFS配置\r\nfdfs:\r\n domain: http://8.129.231.12\r\n soTimeout: 3000\r\n connectTimeout: 2000\r\n trackerList: 8.129.231.12:22122\r\n\r\n# Minio配置\r\nminio:\r\n url: http://8.129.231.12:9000\r\n accessKey: minioadmin\r\n secretKey: minioadmin\r\n bucketName: test','5382b93f3d8059d6068c0501fdd41195','2020-11-20 00:00:00','2020-12-21 21:01:59',NULL,'0:0:0:0:0:0:0:1','','','文件服务','null','null','yaml','null'), (8,'ruoyi-file-dev.yml','DEFAULT_GROUP','# 本地文件上传 \r\nfile:\r\n domain: http://127.0.0.1:9300\r\n path: D:/ruoyi/uploadPath\r\n prefix: /statics\r\n\r\n# FastDFS配置\r\nfdfs:\r\n domain: http://8.129.231.12\r\n soTimeout: 3000\r\n connectTimeout: 2000\r\n trackerList: 8.129.231.12:22122\r\n\r\n# Minio配置\r\nminio:\r\n url: http://8.129.231.12:9000\r\n accessKey: minioadmin\r\n secretKey: minioadmin\r\n bucketName: test','5382b93f3d8059d6068c0501fdd41195','2020-11-20 00:00:00','2020-12-21 21:01:59',NULL,'0:0:0:0:0:0:0:1','','','文件服务','null','null','yaml','null'),

Loading…
Cancel
Save