code: @SuppressWarnings("unchecked")
      protected void configure() {
  
          Properties properties = readDefaultConfig();
  
          Properties appProperties = new Props();
  
          List<String> appConf = Lists.newArrayListWithExpectedSize(configFiles.length);
          for (String conf : configFiles) {
              //读取应用程序配置
              URL appCfgUrl = readAppConfig(appProperties, conf);
              appConf.add(toExternalForm(appCfgUrl));
          }
  
          //获取应用程序模式
          try {
              mode = Mode.valueOf(appProperties.getProperty("app.mode").toUpperCase());
          } catch (Exception e) {
              mode = Mode.PRODUCT;
          }
  
          //设置应用程序名称
          setApplicationName(StringUtils.defaultString(appProperties.getProperty("app.name"), DEFAULT_APP_NAME));
          applicationVersion = appProperties.getProperty("app.version");
          if (StringUtils.isBlank(applicationVersion)) {
              applicationVersion = new UnknownVersion();
          }
  
          //配置日志器
          configureLogger(appProperties);
  
          if (!isInitialized())
              Ameba.printInfo();
  
          logger.info(Messages.get("info.init"));
          logger.info(Messages.get("info.app.conf", appConf));
  
          //读取模式配置
          readModeConfig(properties, mode);
  
          //读取模块配置
          readModuleConfig(properties, getMode().isDev());
  
          properties.putAll(appProperties);
  
          srcProperties.putAll((Map) properties);
  
          setEnvironmentConfig(srcProperties);
  
          addOnSetup(srcProperties);
  
          //转换jersey配置项
          convertJerseyConfig(srcProperties);
  
          //将临时配置对象放入应用程序配置
          addProperties(srcProperties);
  
          srcProperties = Collections.unmodifiableMap(srcProperties);
  
          registerBinder();
  
          configureExclude(srcProperties);
  
          //配置资源
          configureResource();
  
          //配置特性
          configureFeature(srcProperties);
  
          //配置服务器相关
          configureServer();
  
          //清空临时读取的配置
          properties.clear();
  
          scanClasses();
  
          addOnDone();
  
          addons = Collections.unmodifiableSet(addons);
          excludes = Collections.unmodifiableSet(excludes);
  
          logger.info(Messages.get("info.feature.load"));
      }
docs: <p>configure.</p>