优化配置文件
This commit is contained in:
parent
409afa710b
commit
bac3da7d8f
|
|
@ -1,10 +1,10 @@
|
||||||
package com.electromagnetic.industry.software.backup.pojo;
|
package com.electromagnetic.industry.software.backup.pojo;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Setter;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@Data
|
@Setter
|
||||||
@Component
|
@Component
|
||||||
@ConfigurationProperties(prefix = "ele.backup")
|
@ConfigurationProperties(prefix = "ele.backup")
|
||||||
public class BackupPro {
|
public class BackupPro {
|
||||||
|
|
@ -13,4 +13,13 @@ public class BackupPro {
|
||||||
|
|
||||||
private String logPath;
|
private String logPath;
|
||||||
|
|
||||||
|
private String winPrefix;
|
||||||
|
|
||||||
|
public String getSaveFolder() {
|
||||||
|
return System.getProperty("os.name").toLowerCase().startsWith("win") ? winPrefix + saveFolder : saveFolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogPath() {
|
||||||
|
return System.getProperty("os.name").toLowerCase().startsWith("win") ? winPrefix + logPath : logPath;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
|
|
||||||
ele:
|
ele:
|
||||||
backup:
|
backup:
|
||||||
saveFolder: "E:/szsd/ele/data/backup/"
|
saveFolder: "/szsd/ele/data/backup/"
|
||||||
logPath: "E:/szsd/ele/data/backup.log"
|
logPath: "/szsd/ele/data/backup.log"
|
||||||
|
winPrefix: "D:/tmp"
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
servlet:
|
servlet:
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,27 @@
|
||||||
#required
|
#required
|
||||||
spring.application.name=electromagnetic-data
|
spring.application.name=electromagnetic-data
|
||||||
spring.datasource.typd=com.alibaba.druid.pool.DruidDataSource
|
spring.datasource.typd=com.alibaba.druid.pool.DruidDataSource
|
||||||
spring.datasource.url=jdbc:mysql://139.224.43.89:3306/em_data?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
|
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/em_data_dev?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
|
||||||
spring.datasource.username=comac
|
spring.datasource.username=user
|
||||||
spring.datasource.password=2024*Comac
|
spring.datasource.password=123123
|
||||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||||
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
|
||||||
mybatis-plus.mapper-locations=classpath:sqlmapper/*.xml
|
mybatis-plus.mapper-locations=classpath:sqlmapper/*.xml
|
||||||
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
spring.servlet.multipart.max-file-size=500MB
|
spring.servlet.multipart.max-file-size=500MB
|
||||||
spring.servlet.multipart.max-request-size=10MB
|
spring.servlet.multipart.max-request-size=500MB
|
||||||
pagehelper.helperDialect=mysql
|
pagehelper.helperDialect=mysql
|
||||||
pagehelper.reasonable=false
|
pagehelper.reasonable=false
|
||||||
server.port=12395
|
server.port=12396
|
||||||
file.security.passwd=adknfhkj87654knd
|
|
||||||
#windows文件存储目录,用于测试
|
#windows文件存储目录,用于测试
|
||||||
data.windows.path=D:/tmp/eleData/project/
|
data.windows.path=D:/tmp/szsd/data/eleData/dev/project/
|
||||||
data.linux.path=/szsd/data/eleData/project/
|
data.upload.windows.tmp.path=D:/tmp/szsd/data/eleData/dev/upload/
|
||||||
data.upload.windows.tmp.path=D:/tmp/eleData/upload/
|
data.download.windows.tmp.path=D:/tmp/szsd/data/eleData/dev/download/
|
||||||
data.upload.linux.tmp.path=/szsd/data/eleData/upload/
|
|
||||||
data.download.windows.tmp.path=D:/tmp/eleData/download/
|
data.linux.path=/szsd/data/eleData/dev/project/
|
||||||
data.download.linux.tmp.path=/szsd/data/eleData/download/
|
data.upload.linux.tmp.path=/szsd/data/eleData/dev/upload/
|
||||||
|
data.download.linux.tmp.path=/szsd/data/eleData/dev/download/
|
||||||
|
|
||||||
prj.folder.max.length=6
|
prj.folder.max.length=6
|
||||||
|
|
||||||
|
spring.jackson.time-zone=GMT+8
|
||||||
Loading…
Reference in New Issue