Initial commit: DataTool backend, frontend and Docker
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package com.datatool.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 文件传输配置:上传目录、单文件大小上限、房间过期时间。
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "datatool.transfer")
|
||||
public class TransferProperties {
|
||||
|
||||
private String uploadDir = "./data/uploads";
|
||||
private long maxFileSize = 104_857_600L; // 100MB
|
||||
private int roomExpireHours = 24;
|
||||
/** 定时过期清理间隔(毫秒),默认 1 小时。 */
|
||||
private long cleanupIntervalMs = 3600000L;
|
||||
|
||||
public String getUploadDir() {
|
||||
return uploadDir;
|
||||
}
|
||||
|
||||
public void setUploadDir(String uploadDir) {
|
||||
this.uploadDir = uploadDir;
|
||||
}
|
||||
|
||||
public long getMaxFileSize() {
|
||||
return maxFileSize;
|
||||
}
|
||||
|
||||
public void setMaxFileSize(long maxFileSize) {
|
||||
this.maxFileSize = maxFileSize;
|
||||
}
|
||||
|
||||
public int getRoomExpireHours() {
|
||||
return roomExpireHours;
|
||||
}
|
||||
|
||||
public void setRoomExpireHours(int roomExpireHours) {
|
||||
this.roomExpireHours = roomExpireHours;
|
||||
}
|
||||
|
||||
public long getCleanupIntervalMs() {
|
||||
return cleanupIntervalMs;
|
||||
}
|
||||
|
||||
public void setCleanupIntervalMs(long cleanupIntervalMs) {
|
||||
this.cleanupIntervalMs = cleanupIntervalMs;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user