优化配置文件

This commit is contained in:
chenxudong 2025-04-18 15:24:32 +08:00
parent f48c02967d
commit 0749e8e543
3 changed files with 42 additions and 39 deletions

View File

@ -26,8 +26,7 @@ public class AopUtil {
} else if (value instanceof ServletResponse) {
log.info("参数中有response");
map.put(name, "response");
} else if (value instanceof MultipartFile) {
MultipartFile file = (MultipartFile) value;
} else if (value instanceof MultipartFile file) {
Map<String, Object> pars = new HashMap<>();
pars.put("fileName", file.getOriginalFilename());
pars.put("fileSize", file.getSize());

View File

@ -70,74 +70,77 @@ public class ElePropertyConfig {
@Value("${prj.folder.max.length}")
private Integer prjFolderMaxLength;
@Value("${prjRootPath}")
private String prjRootPath;
public String getEleTmpPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + eleTmpPath;
return winPrefix + prjRootPath + eleTmpPath;
}
return eleTmpPath;
return prjRootPath + eleTmpPath;
}
public String getSysPrjPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + sysPrjPath;
return winPrefix + prjRootPath + sysPrjPath;
}
return sysPrjPath;
return prjRootPath + sysPrjPath;
}
public String getSysUploadPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + sysUploadPath;
return winPrefix + prjRootPath + sysUploadPath;
}
return sysUploadPath;
return prjRootPath + sysUploadPath;
}
public String getSysDownloadPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + sysDownloadPath;
return winPrefix + prjRootPath + sysDownloadPath;
}
return sysDownloadPath;
return prjRootPath + sysDownloadPath;
}
public String getUserPrjPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + userPrjPath;
return winPrefix + prjRootPath + userPrjPath;
}
return userPrjPath;
return prjRootPath + userPrjPath;
}
public String getUserUploadPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + userUploadPath;
return winPrefix + prjRootPath + userUploadPath;
}
return userUploadPath;
return prjRootPath + userUploadPath;
}
public String getUserDownloadPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + userDownloadPath;
return winPrefix + prjRootPath + userDownloadPath;
}
return userDownloadPath;
return prjRootPath + userDownloadPath;
}
public String getRepoPrjPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + repoPrjPath;
return winPrefix + prjRootPath + repoPrjPath;
}
return repoPrjPath;
return prjRootPath + repoPrjPath;
}
public String getRepoUploadPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + repoUploadPath;
return winPrefix + prjRootPath + repoUploadPath;
}
return repoUploadPath;
return prjRootPath + repoUploadPath;
}
public String getRepoDownloadPath() {
if (EleCommonUtil.isWinOs()) {
return winPrefix + repoDownloadPath;
return winPrefix + prjRootPath + repoDownloadPath;
}
return repoDownloadPath;
return prjRootPath + repoDownloadPath;
}
public String getUploadDataDir(int dataOwnCode) {

View File

@ -5,15 +5,15 @@ spring.servlet.multipart.max-file-size=500MB
spring.servlet.multipart.max-request-size=500MB
spring.mvc.async.request-timeout=3600000
#mysql
spring.datasource.url=jdbc:mysql://139.196.179.195:3306/em_data_dev?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
spring.datasource.username=em_user_dev
spring.datasource.password=Szsd#2O25$dev
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=aaa
spring.datasource.password=12345
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
# es
spring.elasticsearch.password=123456
spring.elasticsearch.password=12345
spring.elasticsearch.username=elastic
spring.elasticsearch.uris=http://139.196.179.195:9200
spring.elasticsearch.uris=http://127.0.0.1:9200
#ai
spring.ai.ollama.base-url=http://localhost:11434
spring.ai.ollama.chat.options.model=gemma3:latest
@ -31,25 +31,26 @@ pagehelper.helperDialect=mysql
pagehelper.reasonable=false
# app
server.port=12396
winPrefix:D:/tmp
data.ele.tmp.path=/szsd/data/ele/prj/dev/tmp
winPrefix=D:/tmp
prjRootPath=/szsd/data/ele/prj/dev/
data.ele.tmp.path=tmp/
ai.store.max.docs=200
# sys path
data.sys.prj.path=/szsd/data/ele/prj/dev/sys_project/
data.sys.upload.path=/szsd/data/ele/prj/dev/sys_upload/
data.sys.download.path=/szsd/data/ele/prj/dev/sys_download/
data.sys.prj.path=sys_project/
data.sys.upload.path=sys_upload/
data.sys.download.path=sys_download/
# user path
data.user.prj.path=/szsd/data/ele/prj/dev/user_project/
data.user.upload.path=/szsd/data/ele/prj/dev/user_upload/
data.user.download.path=/szsd/data/ele/prj/dev/user_download/
data.user.prj.path=user_project/
data.user.upload.path=user_upload/
data.user.download.path=user_download/
# repo path
data.repo.prj.path=/szsd/data/ele/prj/dev/repo_project/
data.repo.upload.path=/szsd/data/ele/prj/dev/repo_upload/
data.repo.download.path=/szsd/data/ele/prj/dev/repo_download/
data.repo.prj.path=repo_project/
data.repo.upload.path=repo_upload/
data.repo.download.path=repo_download/
prj.folder.max.length=6
# backupFiles
tmp.file.store.hour=48
backup.remote.host=127.0.0.1
backup.remote.port=1111
backup.remote.port=12491
backup.mysql.path=/workspace/mysqlbak/test
backup.mysql.script.path=/workspace/mysqlbak/back_dev.sh