package com.ruoyi.common.config;
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.stereotype.Component;
|
|
/**
|
* 读取项目相关配置
|
*
|
* @author ruoyi
|
*/
|
@Component
|
@ConfigurationProperties(prefix = "ruoyi")
|
public class RuoYiConfig
|
{
|
/** 项目名称 */
|
private String name;
|
|
/** 版本 */
|
private String version;
|
|
/** 版权年份 */
|
private String copyrightYear;
|
|
/** 实例演示开关 */
|
private boolean demoEnabled;
|
|
/** 上传路径 */
|
private static String profile;
|
|
/** 获取地址开关 */
|
private static boolean addressEnabled;
|
|
/** 验证码类型 */
|
private static String captchaType;
|
|
/** 授权文件存储目录 */
|
private static String authFile;
|
|
/** 授权方式 */
|
private static String authType;
|
|
private static String ftpPath;
|
private static String ftpHost;
|
private static String ftpUserName;
|
private static String ftpPassWord;
|
private static String pass;
|
|
public static String getMkbm() {
|
return mkbm;
|
}
|
|
public void setMkbm(String mkbm) {
|
RuoYiConfig.mkbm = mkbm;
|
}
|
|
private static String mkbm;
|
|
private static String mkmc;
|
|
public static String getMkmc() {
|
return mkmc;
|
}
|
|
public void setMkmc(String mkmc) {
|
RuoYiConfig.mkmc = mkmc;
|
}
|
|
public static String getAuthFile() {
|
return authFile;
|
}
|
|
public void setAuthFile(String authFile) {
|
RuoYiConfig.authFile = authFile;
|
}
|
|
public static String getAuthType() {
|
return authType;
|
}
|
|
public void setAuthType(String authType) {
|
RuoYiConfig.authType = authType;
|
}
|
|
public static String getFtpPath() {
|
return ftpPath;
|
}
|
|
public void setFtpPath(String ftpPath) {
|
RuoYiConfig.ftpPath = ftpPath;
|
}
|
|
public static String getFtpHost() {
|
return ftpHost;
|
}
|
|
public void setFtpHost(String ftpHost) {
|
RuoYiConfig.ftpHost = ftpHost;
|
}
|
|
public static String getFtpUserName() {
|
return ftpUserName;
|
}
|
|
public void setFtpUserName(String ftpUserName) {
|
RuoYiConfig.ftpUserName = ftpUserName;
|
}
|
|
public static String getFtpPassWord() {
|
return ftpPassWord;
|
}
|
|
public void setFtpPassWord(String ftpPassWord) {
|
RuoYiConfig.ftpPassWord = ftpPassWord;
|
}
|
|
public static String getPass() {
|
return pass;
|
}
|
|
public void setPass(String pass) {
|
RuoYiConfig.pass = pass;
|
}
|
|
public String getName()
|
{
|
return name;
|
}
|
|
public void setName(String name)
|
{
|
this.name = name;
|
}
|
|
public String getVersion()
|
{
|
return version;
|
}
|
|
public void setVersion(String version)
|
{
|
this.version = version;
|
}
|
|
public String getCopyrightYear()
|
{
|
return copyrightYear;
|
}
|
|
public void setCopyrightYear(String copyrightYear)
|
{
|
this.copyrightYear = copyrightYear;
|
}
|
|
public boolean isDemoEnabled()
|
{
|
return demoEnabled;
|
}
|
|
public void setDemoEnabled(boolean demoEnabled)
|
{
|
this.demoEnabled = demoEnabled;
|
}
|
|
public static String getProfile()
|
{
|
return profile;
|
}
|
|
public void setProfile(String profile)
|
{
|
RuoYiConfig.profile = profile;
|
}
|
|
public static boolean isAddressEnabled()
|
{
|
return addressEnabled;
|
}
|
|
public void setAddressEnabled(boolean addressEnabled)
|
{
|
RuoYiConfig.addressEnabled = addressEnabled;
|
}
|
|
public static String getCaptchaType() {
|
return captchaType;
|
}
|
|
public void setCaptchaType(String captchaType) {
|
RuoYiConfig.captchaType = captchaType;
|
}
|
|
/**
|
* 获取导入上传路径
|
*/
|
public static String getImportPath()
|
{
|
return getProfile() + "/import";
|
}
|
|
/**
|
* 获取头像上传路径
|
*/
|
public static String getAvatarPath()
|
{
|
return getProfile() + "/avatar";
|
}
|
|
/**
|
* 获取下载路径
|
*/
|
public static String getDownloadPath()
|
{
|
return getProfile() + "/download/";
|
}
|
|
/**
|
* 获取上传路径
|
*/
|
public static String getUploadPath()
|
{
|
return getProfile() + "/upload";
|
}
|
}
|