@Singleton
@Named
public class NacosConfigService
extends java.lang.Object
implements com.github.flycat.spi.config.ConfigService, com.github.flycat.spi.SpiService
| Constructor and Description |
|---|
NacosConfigService(com.github.flycat.context.ApplicationConfiguration applicationConfiguration) |
NacosConfigService(com.alibaba.nacos.api.config.ConfigService configService,
com.github.flycat.context.ApplicationConfiguration applicationConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
void |
createConfigService() |
com.github.flycat.context.ApplicationConfiguration |
getApplicationConfiguration() |
java.lang.String |
getConfig(java.lang.String dataId) |
java.lang.String |
getConfig(java.lang.String dataId,
long timeoutMs) |
java.lang.String |
getConfig(java.lang.String dataId,
java.lang.String group,
long timeoutMs) |
<T> T |
getJsonConfig(java.lang.String dataId,
java.lang.Class<T> type) |
<T> T |
getJsonConfig(java.lang.String dataId,
java.lang.String name,
java.lang.Class<T> type) |
public NacosConfigService(com.github.flycat.context.ApplicationConfiguration applicationConfiguration)
public NacosConfigService(com.alibaba.nacos.api.config.ConfigService configService,
com.github.flycat.context.ApplicationConfiguration applicationConfiguration)
public com.github.flycat.context.ApplicationConfiguration getApplicationConfiguration()
getApplicationConfiguration in interface com.github.flycat.spi.SpiServicepublic java.lang.String getConfig(java.lang.String dataId)
throws com.github.flycat.spi.config.ConfigException
getConfig in interface com.github.flycat.spi.config.ConfigServicecom.github.flycat.spi.config.ConfigExceptionpublic java.lang.String getConfig(java.lang.String dataId,
long timeoutMs)
throws com.github.flycat.spi.config.ConfigException
getConfig in interface com.github.flycat.spi.config.ConfigServicecom.github.flycat.spi.config.ConfigExceptionpublic java.lang.String getConfig(java.lang.String dataId,
java.lang.String group,
long timeoutMs)
throws com.github.flycat.spi.config.ConfigException
getConfig in interface com.github.flycat.spi.config.ConfigServicecom.github.flycat.spi.config.ConfigExceptionpublic <T> T getJsonConfig(java.lang.String dataId,
java.lang.Class<T> type)
throws com.github.flycat.spi.config.ConfigException
getJsonConfig in interface com.github.flycat.spi.config.ConfigServicecom.github.flycat.spi.config.ConfigExceptionpublic <T> T getJsonConfig(java.lang.String dataId,
java.lang.String name,
java.lang.Class<T> type)
throws com.github.flycat.spi.config.ConfigException
getJsonConfig in interface com.github.flycat.spi.config.ConfigServicecom.github.flycat.spi.config.ConfigExceptionpublic void createConfigService()