public static void setProperties(Properties inputProps) { props = new PropertiesHelper(resolveProperties(inputProps)); for (Iterator it = props.entrySet().iterator(); it.hasNext(); ) { Map.Entry entry = (Map.Entry) it.next(); GLogger.println("[Property] " + entry.getKey() + "=" + entry.getValue()); } GLogger.println(""); GLogger.println( "[Auto Replace] [.] => [/] on generator.properties, key=source_key+'_dir', For example: pkg=com.company ==> pkg_dir=com/company \n"); Properties dirProperties = autoReplacePropertiesValue2DirValue(props.getProperties()); props.getProperties().putAll(dirProperties); }
public static void reload() { try { GLogger.println( "Start Load GeneratorPropeties from classpath:" + Arrays.toString(PROPERTIES_FILE_NAMES)); Properties p = new Properties(); String[] loadedFiles = PropertiesHelper.loadAllPropertiesFromClassLoader(p, PROPERTIES_FILE_NAMES); GLogger.println("GeneratorPropeties Load Success,files:" + Arrays.toString(loadedFiles)); setProperties(p); } catch (IOException e) { throw new RuntimeException("Load " + PROPERTIES_FILE_NAMES + " error", e); } }