@Override public Object getInternalProperty(String key) { return ConfigUtils.getProperty(key); } }
@Override public Object getInternalProperty(String key) { return ConfigUtils.getProperty(key); } }
public static String getProperty(String key) { return getProperty(key, null); }
public static String getProperty(String key) { return getProperty(key, null); }
@Override public void start() { String file = ConfigUtils.getProperty(LOGBACK_FILE); if (file != null && file.length() > 0) { String level = ConfigUtils.getProperty(LOGBACK_LEVEL); if (StringUtils.isEmpty(level)) { level = DEFAULT_LOGBACK_LEVEL; } // maxHistory=0 Infinite history int maxHistory = StringUtils.parseInteger(ConfigUtils.getProperty(LOGBACK_MAX_HISTORY)); doInitializer(file, level, maxHistory); } }
@Override public void start() { String file = ConfigUtils.getProperty(LOGBACK_FILE); if (file != null && file.length() > 0) { String level = ConfigUtils.getProperty(LOGBACK_LEVEL); if (StringUtils.isEmpty(level)) { level = DEFAULT_LOGBACK_LEVEL; } // maxHistory=0 Infinite history int maxHistory = StringUtils.parseInteger(ConfigUtils.getProperty(LOGBACK_MAX_HISTORY)); doInitializer(file, level, maxHistory); } }
@Override public void start() { String configPath = ConfigUtils.getProperty(SPRING_CONFIG); if (StringUtils.isEmpty(configPath)) { configPath = DEFAULT_SPRING_CONFIG; } context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+")); context.start(); }
@Override public void start() { String configPath = ConfigUtils.getProperty(SPRING_CONFIG); if (StringUtils.isEmpty(configPath)) { configPath = DEFAULT_SPRING_CONFIG; } context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+")); context.start(); }
@SuppressWarnings("deprecation") protected void checkApplication() { // for backward compatibility createApplicationIfAbsent(); if (!application.isValid()) { throw new IllegalStateException("No application config found or it's not a valid config! " + "Please add <dubbo:application name=\"...\" /> to your spring config."); } ApplicationModel.setApplication(application.getName()); // backward compatibility String wait = ConfigUtils.getProperty(Constants.SHUTDOWN_WAIT_KEY); if (wait != null && wait.trim().length() > 0) { System.setProperty(Constants.SHUTDOWN_WAIT_KEY, wait.trim()); } else { wait = ConfigUtils.getProperty(Constants.SHUTDOWN_WAIT_SECONDS_KEY); if (wait != null && wait.trim().length() > 0) { System.setProperty(Constants.SHUTDOWN_WAIT_SECONDS_KEY, wait.trim()); } } }
@SuppressWarnings("deprecation") protected void checkApplication() { // for backward compatibility createApplicationIfAbsent(); if (!application.isValid()) { throw new IllegalStateException("No application config found or it's not a valid config! " + "Please add <dubbo:application name=\"...\" /> to your spring config."); } ApplicationModel.setApplication(application.getName()); // backward compatibility String wait = ConfigUtils.getProperty(Constants.SHUTDOWN_WAIT_KEY); if (wait != null && wait.trim().length() > 0) { System.setProperty(Constants.SHUTDOWN_WAIT_KEY, wait.trim()); } else { wait = ConfigUtils.getProperty(Constants.SHUTDOWN_WAIT_SECONDS_KEY); if (wait != null && wait.trim().length() > 0) { System.setProperty(Constants.SHUTDOWN_WAIT_SECONDS_KEY, wait.trim()); } } }
private void loadRegistriesFromBackwardConfig() { // for backward compatibility // -Ddubbo.registry.address is now deprecated. if (registries == null || registries.isEmpty()) { String address = ConfigUtils.getProperty("dubbo.registry.address"); if (address != null && address.length() > 0) { List<RegistryConfig> tmpRegistries = new ArrayList<RegistryConfig>(); String[] as = address.split("\\s*[|]+\\s*"); for (String a : as) { RegistryConfig registryConfig = new RegistryConfig(); registryConfig.setAddress(a); registryConfig.refresh(); tmpRegistries.add(registryConfig); } setRegistries(tmpRegistries); } } }
private void loadRegistriesFromBackwardConfig() { // for backward compatibility // -Ddubbo.registry.address is now deprecated. if (registries == null || registries.isEmpty()) { String address = ConfigUtils.getProperty("dubbo.registry.address"); if (address != null && address.length() > 0) { List<RegistryConfig> tmpRegistries = new ArrayList<RegistryConfig>(); String[] as = address.split("\\s*[|]+\\s*"); for (String a : as) { RegistryConfig registryConfig = new RegistryConfig(); registryConfig.setAddress(a); registryConfig.refresh(); tmpRegistries.add(registryConfig); } setRegistries(tmpRegistries); } } }
public static void main(String[] args) { try { if (ArrayUtils.isEmpty(args)) { String config = ConfigUtils.getProperty(CONTAINER_KEY, loader.getDefaultExtensionName()); args = Constants.COMMA_SPLIT_PATTERN.split(config);
public static void main(String[] args) { try { if (ArrayUtils.isEmpty(args)) { String config = ConfigUtils.getProperty(CONTAINER_KEY, loader.getDefaultExtensionName()); args = Constants.COMMA_SPLIT_PATTERN.split(config);
@Override public Object getInternalProperty(String key) { return ConfigUtils.getProperty(key); } }
@Override public Object getInternalProperty(String key) { return ConfigUtils.getProperty(key); } }
public static String getProperty(String key) { return getProperty(key, null); }
@Override public void start() { String file = ConfigUtils.getProperty(LOGBACK_FILE); if (file != null && file.length() > 0) { String level = ConfigUtils.getProperty(LOGBACK_LEVEL); if (level == null || level.length() == 0) { level = DEFAULT_LOGBACK_LEVEL; } // maxHistory=0 Infinite history int maxHistory = StringUtils.parseInteger(ConfigUtils.getProperty(LOGBACK_MAX_HISTORY)); doInitializer(file, level, maxHistory); } }
@Override public void start() { String configPath = ConfigUtils.getProperty(SPRING_CONFIG); if (configPath == null || configPath.length() == 0) { configPath = DEFAULT_SPRING_CONFIG; } context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+")); context.start(); }
@Override public void start() { String configPath = ConfigUtils.getProperty(SPRING_CONFIG); if (configPath == null || configPath.length() == 0) { configPath = DEFAULT_SPRING_CONFIG; } context = new ClassPathXmlApplicationContext(configPath.split("[,\\s]+")); context.start(); }