mirror of
https://github.com/zfile-dev/zfile.git
synced 2025-04-19 05:34:52 +00:00
38 lines
1.0 KiB
Java
38 lines
1.0 KiB
Java
package im.zhaojun.common.model.constant;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
/**
|
|
* @author zhaojun
|
|
*/
|
|
@Configuration
|
|
public class ZFileConstant {
|
|
|
|
public final static String USER_HOME = System.getProperty("user.home");
|
|
|
|
public static final String AUDIO_TMP_PATH = "/.zfile/tmp/audio/";
|
|
|
|
/**
|
|
* 页面文档文件
|
|
*/
|
|
public static String README_FILE_NAME = "readme.md";
|
|
|
|
/**
|
|
* 密码文件
|
|
*/
|
|
public static String PASSWORD_FILE_NAME = "password.txt";
|
|
|
|
@Autowired(required = false)
|
|
public void setHeaderFileName(@Value("${zfile.constant.readme}") String headerFileName) {
|
|
ZFileConstant.README_FILE_NAME = headerFileName;
|
|
}
|
|
|
|
@Autowired(required = false)
|
|
public void setPasswordFileName(@Value("${zfile.constant.password}") String passwordFileName) {
|
|
ZFileConstant.PASSWORD_FILE_NAME = passwordFileName;
|
|
}
|
|
|
|
}
|