@ConfigurationProperties(prefix="site.options") public class SiteOptionProperties extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
OrderExpireInMinutes_Key |
static String |
OrderPlatformFeePercentage_Key |
static String |
RefreshTokenExpireInMonth_Key |
static String |
TokenExpireInMinutes_Key |
| 构造器和说明 |
|---|
SiteOptionProperties() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getIntValue(String type,
String key,
Integer defaultValue)
获取某客户端某key的相关整数配置
|
Object |
getTypeValues(String type)
获取客户端所有相关关键字的配置
|
String |
getValue(String type,
String key)
获取客户端相关关键字的配置,未设置则返回null
|
String |
getValue(String type,
String key,
String defaultValue)
获取客户端相关关键字的配置,未设置则返回默认值
|
void |
init() |
void |
reloadFromStorage()
重新从数据库加载配置
|
@PostConstruct public void init()
@Scheduled(initialDelay=60000L,
fixedDelay=60000L)
public void reloadFromStorage()
public String getValue(String type, String key)
type - 客户端key - 关键字keypublic String getValue(String type, String key, String defaultValue)
type - 客户端key - 关键字keydefaultValue - 默认值public int getIntValue(String type, String key, Integer defaultValue)
type - 客户端key - 关键keydefaultValue - 默认值Copyright © 2020. All rights reserved.