| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- package com.railway.common.config;
- import lombok.Data;
- import org.springframework.boot.context.properties.ConfigurationProperties;
- import org.springframework.stereotype.Component;
- /**
- * 全局配置类
- *
- * @author railway
- */
- @Data
- @Component
- @ConfigurationProperties(prefix = "railway")
- public class RailwayConfig {
- /**
- * 项目名称
- */
- private String name;
- /**
- * 版本
- */
- private String version;
- /**
- * 版权年份
- */
- private String copyrightYear;
- private static String filePath;
- /**
- * 获取地址开关
- */
- private static boolean addressEnabled;
- public static boolean isAddressEnabled() {
- return addressEnabled;
- }
- public void setAddressEnabled(boolean addressEnabled) {
- RailwayConfig.addressEnabled = addressEnabled;
- }
- public static String getFilePath() {
- return filePath;
- }
- public void setFilePath(String filePath){
- RailwayConfig.filePath = filePath;
- }
- }
|