<p>readModuleConfig.</p>

@param properties a {@link java.util.Properties} object.
@param isDev      a boolean.
973713
@SuppressWarnings("unchecked")
    public static void readModuleConfig(Properties properties, boolean isDev) {
        logger.info(Messages.get("info.module.load.conf"));
        //读取模块配置
        Enumeration<URL> moduleUrls = IOUtils.getResources("conf/module.conf");
        List<String> readedModule = Lists.newArrayList();
        if (moduleUrls.hasMoreElements()) {
            while (moduleUrls.hasMoreElements()) {
                InputStream in = null;
                URL url = moduleUrls.nextElement();
                try {
                    String fileName = url.getFile();
                    String modelName = fileName;
                    int jarFileIndex = modelName.lastIndexOf("!");
                    if (jarFileIndex != -1) {
                        modelName = modelName.substring(0, jarFileIndex);
                    }

                    jarFileIndex = modelName.lastIndexOf(".");
                    if (jarFileIndex != -1) {
                        modelName = modelName.substring(0, jarFileIndex);
                    }

                    int fileIndex = modelName.lastIndexOf("/");
                    modelName = modelName.substring(fileIndex + 1);

                    if (url.getProtocol().equals("file") && "module".equals(modelName)) {
                        //projectName/target/classes/conf/module
                        //projectName/src/main/resources/conf/module
                        if (fileName.endsWith("/target/classes/conf/module.conf")) {
                            try {
                                modelName = Paths.get(url.toURI())
                                        .resolveSibling("../../../").normalize().getFileName().toString();
                            } catch (URISyntaxException e) {
                                // no op
                            }
                        } else if (fileName.endsWith("/src/main/resources/conf/module.conf")) {
                            try {
                                modelName = Paths.get(url.toURI()).resolveSibling("../../../../")
                                        .normalize().getFileName().toString();
                            } catch (URISyntaxException e) {
                                // no op
                            }
                        }
                    }

                    if (readedModule.contains(modelName)) continue;
                    readedModule.add(modelName);

                    logger.info(Messages.get("info.module.load", modelName));
                    logger.debug(Messages.get("info.module.load.item.conf", toExternalForm(url)));
                    URLConnection connection = url.openConnection();

                    if (isDev) {
                        connection.setUseCaches(false);
                    }
                    in = connection.getInputStream();
                } catch (IOException e) {
                    logger.error(Messages.get("info.load.error", toExternalForm(url)));
                }
                loadProperties(in, properties, url);
            }
        } else {
            logger.info(Messages.get("info.module.none"));
        }
    }
1289184
public static Properties readInternalConfiguration()
    {
        //init properties
        Properties properties=new Properties();
        
        //get class loader
        ClassLoader classLoader=ReflectionHelper.getThreadContextClassLoader();

        //load internal properties
        InputStream inputStream=classLoader.getResourceAsStream("org/fax4j/"+LibraryConfigurationLoader.CONFIGURATION_FILE_NAME);
        LibraryConfigurationLoader.loadProperties(properties,inputStream,true);

        return properties;
    }
988590
private void parseConfig(Element property, BeanDefinitionBuilder propertyBuilder) {
        Element config = (Element) getTagChildren("config", property).item(0);

        if (config != null) {
            Properties properties = new Properties();
            NodeList entries = getTagChildren("entry", config);

            for (int i = 0; i < entries.getLength(); i++) {
                Element entry = (Element) entries.item(i);
                String key = entry.getAttribute("key");
                String value = entry.getTextContent().trim();
                properties.put(key, value);
            }

            propertyBuilder.addPropertyValue("config", properties);
        }
    }
36963
public void configure(Map<String, ?> configs, boolean isKey) {
    Preconditions.checkArgument(isKey==false, "LiAvroDeserializer only works for value fields");
    _datumReader = new GenericDatumReader<>();
    Properties props = new Properties();
    for (Map.Entry<String, ?> entry: configs.entrySet())
    {
      String value = String.valueOf(entry.getValue());
      props.setProperty(entry.getKey(), value);
    }

    _schemaRegistry = KafkaSchemaRegistryFactory.getSchemaRegistry(props);
  }
680686
public void setConfiguredProperties(BeanConfiguration configuration) {
        boolean changed = false;
        final Set<ConfiguredPropertyDescriptor> properties = getDescriptor().getConfiguredProperties();
        for (ConfiguredPropertyDescriptor property : properties) {
            final Object value = configuration.getProperty(property);
            final boolean changedValue = setConfiguredPropertyIfChanged(property, value);
            if (changedValue) {
                changed = true;
            }
        }
        if (changed) {
            onConfigurationChanged();
        }
    }
924093
protected void importConfigProperty(Definition def, Writer out) throws IOException
   {
      if (getConfigProps(def).size() > 0)
      {
         out.write("import javax.resource.spi.ConfigProperty;\n");
      }
   }
597875
public void loadPropertiesAsVariables() {
        BufferedReader reader = null;

        try {
            if (propertyFilesSet()) {
                for (String propertyFilePath : propertyFiles) {
                    Resource propertyFile = new PathMatchingResourcePatternResolver().getResource(propertyFilePath.trim());

                    log.debug("Reading property file " + propertyFile.getFilename());

                    // Use input stream as this also allows to read from resources in a JAR file
                    reader = new BufferedReader(new InputStreamReader(propertyFile.getInputStream()));

                    // local context instance handling variable replacement in property values
                    TestContext context = new TestContext();

                    // Careful!! The function registry *must* be set before setting the global variables.
                    // Variables can contain functions which are resolved when context.setGlobalVariables is invoked.
                    context.setFunctionRegistry(functionRegistry);
                    context.setGlobalVariables(globalVariables);

                    String propertyExpression;
                    while ((propertyExpression = reader.readLine()) != null) {

                        log.debug("Property line [ {} ]", propertyExpression);

                        propertyExpression = propertyExpression.trim();
                        if (!isPropertyLine(propertyExpression)) {
                            continue;
                        }

                        String key = propertyExpression.substring(0, propertyExpression.indexOf('=')).trim();
                        String value = propertyExpression.substring(propertyExpression.indexOf('=') + 1).trim();

                        log.debug("Property value replace dynamic content [ {} ]", value);
                        value = context.replaceDynamicContentInString(value);

                        if (log.isDebugEnabled()) {
                            log.debug("Loading property: " + key + "=" + value + " into default variables");
                        }

                        if (log.isDebugEnabled() && globalVariables.getVariables().containsKey(key)) {
                            log.debug("Overwriting property " + key + " old value:" + globalVariables.getVariables().get(key)
                                    + " new value:" + value);
                        }

                        globalVariables.getVariables().put(key, value);
                        // we need to keep local context up to date in case of recursive variable usage
                        context.setVariable(key, globalVariables.getVariables().get(key));
                    }

                    log.info("Loaded property file " + propertyFile.getFilename());
                }
            }
        } catch (IOException e) {
            throw new CitrusRuntimeException("Error while loading property file", e);
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e) {
                    log.warn("Unable to close property file reader", e);
                }
            }
        }
    }
4369
public void readExternal(java.io.ObjectInput in)
        throws java.io.IOException, ClassNotFoundException
    {
        _realmName= (String)in.readObject();
        _config=(String)in.readObject();
        if (_config!=null)
            load(_config);
    }
1190168
@SuppressWarnings("unchecked")
  public static void checkProperties(Properties properties, Properties defaults) {
    Set<String> names = Generics.newHashSet();
    for (Enumeration<String> e = (Enumeration<String>) properties.propertyNames();
         e.hasMoreElements(); ) {
      names.add(e.nextElement());
    }
    for (Enumeration<String> e = (Enumeration<String>) defaults.propertyNames();
         e.hasMoreElements(); ) {
      names.remove(e.nextElement());
    }
    if (!names.isEmpty()) {
      if (names.size() == 1) {
        throw new IllegalArgumentException("Unknown property: " + names.iterator().next());
      } else {
        throw new IllegalArgumentException("Unknown properties: " + names);
      }
    }
  }
292914
public synchronized void setConfigProperty(Config.ConfigProperty configProperty, Object configPropertyValue) {
        checkArgument(configProperty != null, "Config property cannot be null");
        checkArgument(checkNotInGlobalScope(configProperty),
                String.format("The configuration property (%s) is not supported in local config.", configProperty)); // NOSONAR
        checkArgument(configPropertyValue != null, "Config property value cannot be null");

        baseConfig.setProperty(configProperty.getName(), configPropertyValue);
    }
562327
@Override
	public final Properties getConfigProperties() {
		Properties props = doReadConfig();

		// Initialize hashcode of newly loaded properties.
		if (0 == this.propsHashCode) {
			this.propsHashCode = props.hashCode();
		}

		return props;
	}
980194
public void setProjectProperties(final Properties properties) {
        generateProjectPropertiesFile(getName(), propertyFile, true, properties, false, null, false);
        loadProperties();
    }
1033028
private PropertyDescriptor _createPropertyDescriptor(boolean development)
    {
        try
        {
            CompositeComponentPropertyDescriptor attributeDescriptor = 
                new CompositeComponentPropertyDescriptor(_name.getValue());
            
            // If ProjectStage is Development, The "displayName", "shortDescription",
            // "expert", "hidden", and "preferred" attributes are exposed
            if (development)
            {
                CompositeTagAttributeUtils.addDevelopmentAttributesLiteral(attributeDescriptor,
                        _displayName, _shortDescription, _expert, _hidden, _preferred);
            }
            
            // note that no unspecified attributes are handled here, because the current
            // tag does not contain any, otherwise this code would not have been called.
            
            return attributeDescriptor;
        }
        catch (IntrospectionException e)
        {
            if (log.isLoggable(Level.SEVERE))
            {
                log.log(Level.SEVERE, "Cannot create PropertyDescriptor for attribute ",e);
            }
            throw new TagException(tag,e);
        }
    }
537195
private static void checkProperties(ConverterProperties properties) {
        boolean isIllegal = properties.isOnlyScanNonStaticMethod() && properties.isOnlyScanStaticMethod();
        if (isIllegal) {
            throw InvalidConfigurationException
                    .of("Only scanning static methods or scanning only non static methods can only select one");
        }
    }
128507
@Override
  public void configure(InputStream is) {
    if (is == null) {
      logger.error("No input stream to configure dictionary from?");
      return;
    }
    try {
      long startTime = System.currentTimeMillis();
      this.avpByNameMap = new TreeMap<String, AvpRepresentation>(new Comparator<String>() {
        @Override
        public int compare(String o1, String o2) {
          return (o1 == null) ? 1 : (o2 == null) ? -1 : o1.compareTo(o2);
        }
      });

      this.vendorMap = new HashMap<String, String>();
      this.typedefMap = new HashMap<String, String>();
      this.avpMap = new HashMap<AvpRepresentation, AvpRepresentation>();
      this.commandMap = new HashMap<MessageRepresentation, MessageRepresentation>();

      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      dbf.setValidating(false);
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.parse(is);

      doc.getDocumentElement().normalize();

      this.parseVendors(doc);
      this.parseTypeDefs(doc);
      this.parseAvps(doc);
      this.parseCommands(doc);

      this.configured = true;

      long endTime = System.currentTimeMillis();

      if (logger.isInfoEnabled()) {
        logger.info("Mobicents Diameter Dictionary loaded in {}ms -- Vendors[{}] Commands[{}] Types[{}] AVPs[{}]",
            new Object[] { (endTime - startTime), vendorMap.size(), commandMap.size(), typedefMap.size(), avpMap.size() });
      }

      if (logger.isInfoEnabled()) {
        StringBuffer sb = new StringBuffer();
        int c = 0;
        for (AvpRepresentation key : this.avpMap.keySet()) {
          if (this.avpMap.get(key).isWeak()) {
            c++;
            sb.append("---------------------------------\n").append("Found incomplete AVP definition:\n").append(this.avpMap.get(key)).append("\n");
          }
        }

        if (c > 0) {
          sb.append("------- TOTAL INCOMPLETE AVPS COUNT: ").append(c).append(" -------");
          logger.info(sb.toString());
        }
      }
    }
    catch (Exception e) {
      this.enabled = false;
      this.configured = false;
      logger.error("Failed to parse validator configuration. Validator disabled.", e);
    }
    finally {
      // close?
      try {
        is.close();
      }
      catch (IOException e) {
        logger.debug("Failed to close InputStream for Dictionary XML.", e);
      }
    }
  }
784028
public void augmentConfiguration(Properties configToAdd) {
		for (Entry<Object, Object> entry : configToAdd.entrySet()) {
			String configKey = (String) entry.getKey();
			String configValue = (String) entry.getValue();

			// Skip the property is it is not overridable
			if (null != privateConfigProperties && privateConfigProperties.contains(configKey)) {
				LOGGER.warn("The property " + configKey + " can not be overridden. It will remain with a value of "
						+ configProperties.get(configKey));
				continue;
			}

			// Augment mappings
			if (isAugmentable(configKey)) {
				String currentValue = configProperties.getProperty(configKey);
				currentValue += "," + configValue;
				configProperties.put(configKey, currentValue);
			} else
				// replace properties
				configProperties.put(configKey, configValue);
		}
	}
1129848
public void setProperties(Properties properties) throws ConfigurationException {
//		initialRequest = application.getCurrentRequest();
		autoReload = Boolean.valueOf(properties.getProperty("autoreload", "true"));

		defaultMappingName = properties.getProperty("defaultmapping", defaultMappingName);

/*		strict = section.getValue("strict", new GenericValue(strict), "abort mapping loading on errors").toBoolean().booleanValue();
        Environment.System.out.println("checking mapping strictly: " + strict);*/

		mappingFilesMap = PropertiesSupport.getSubsection(properties, "mapping");
	}