Blame view

src/main/java/cn/iocoder/dashboard/framework/apollox/Config.java 656 Bytes
ec9ed896   YunaiV   实现配置中心的基础
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  package cn.iocoder.dashboard.framework.apollox;
  
  import java.util.Set;
  
  /**
   * 配置接口
   *
   * @author Jason Song(song_s@ctrip.com)
   */
  public interface Config {
  
      /**
       * Return the property value with the given key, or {@code defaultValue} if the key doesn't exist.
       *
       * @param key          the property name
       * @param defaultValue the default value when key is not found or any error occurred
       * @return the property value
       */
      String getProperty(String key, String defaultValue);
  
      /**
       * Return a set of the property names
       *
       * @return the property names
       */
      Set<String> getPropertyNames();
  
  }