Package com.networknt.router.middleware
Class ServiceDictConfig
- java.lang.Object
-
- com.networknt.router.middleware.ServiceDictConfig
-
public class ServiceDictConfig extends Object
create the config class to enable loading from the config-server. With this class, it allows the mapping from the path to the serviceId to be defined as a string. And also a map in YAML.- Author:
- Steve Hu
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_NAME
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>getMappedConfig()Map<String,String>getMapping()booleanisEnabled()static ServiceDictConfigload()static ServiceDictConfigload(String configName)voidreload()
-
-
-
Field Detail
-
CONFIG_NAME
public static final String CONFIG_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
load
public static ServiceDictConfig load()
-
load
public static ServiceDictConfig load(String configName)
-
reload
public void reload()
-
isEnabled
public boolean isEnabled()
-
-