首页>代码>基于SpringBoot+SpringBoot Data Jpa+Mysql的自适应摄影管理系统>/Shoot/src/main/java/com/java214/config/TYFConfig.java
package com.java214.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 全局配置类
 * 
 * @author TYF
 */
@Component
@ConfigurationProperties(prefix = "tyf")
public class TYFConfig
{
    /** 项目名称 */
    private static String name;

    /** 版本 */
    private static String version;

    /** 版权年份 */
    private static String copyrightYear;

    /** 实例演示开关 */
    private static boolean demoEnabled;

    /** 上传路径 */
    private static String profile;

    /** 获取地址开关 */
    private static boolean addressEnabled;

    public static String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        TYFConfig.name = name;
    }

    public static String getVersion()
    {
        return version;
    }

    public void setVersion(String version)
    {
        TYFConfig.version = version;
    }

    public static String getCopyrightYear()
    {
        return copyrightYear;
    }

    public void setCopyrightYear(String copyrightYear)
    {
        TYFConfig.copyrightYear = copyrightYear;
    }

    public static boolean isDemoEnabled()
    {
        return demoEnabled;
    }

    public void setDemoEnabled(boolean demoEnabled)
    {
        TYFConfig.demoEnabled = demoEnabled;
    }

    public static String getProfile()
    {
        return profile;
    }

    public void setProfile(String profile)
    {
        TYFConfig.profile = profile;
    }

    public static boolean isAddressEnabled()
    {
        return addressEnabled;
    }

    public void setAddressEnabled(boolean addressEnabled)
    {
        TYFConfig.addressEnabled = addressEnabled;
    }

    /**
     * 获取导入上传路径
     */
    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";
    }
}
最近下载更多
朱朱啊哈  LV16 4月8日
wanglinddad  LV55 3月13日
2781674049  LV1 3月5日
akkye_7  LV1 1月8日
lilong007  LV20 2023年12月30日
逝水莲花  LV7 2023年12月1日
2410068425  LV23 2023年11月27日
wuying8208  LV15 2023年11月25日
zxc131313  LV12 2023年11月19日
zcwmmd  LV20 2023年11月18日
最近浏览更多
kenhomeliu  LV29 4月30日
JulyMagnolia  LV4 4月29日
chirsbey2 4月18日
暂无贡献等级
东北虎啸  LV3 4月17日
荣》Cowboy  LV12 4月11日
xiaozhi丶  LV14 4月7日
朱朱啊哈  LV16 4月1日
sunlzh888888  LV28 3月16日
SZEPEZS  LV8 3月15日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友