gpt4 book ai didi

org.apache.shardingsphere.core.yaml.YamlAuthentication.getPassword()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 06:17:31 30 4
gpt4 key购买 nike

本文整理了Java中org.apache.shardingsphere.core.yaml.YamlAuthentication.getPassword()方法的一些代码示例,展示了YamlAuthentication.getPassword()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlAuthentication.getPassword()方法的具体详情如下:
包路径:org.apache.shardingsphere.core.yaml.YamlAuthentication
类名称:YamlAuthentication
方法名:getPassword

YamlAuthentication.getPassword介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-shardingsphere

@Override
  public Authentication load(final String data) {
    YamlAuthentication result = new Yaml().loadAs(data, YamlAuthentication.class);
    Preconditions.checkState(!Strings.isNullOrEmpty(result.getUsername()), "Authority configuration is invalid.");
    return new Authentication(result.getUsername(), result.getPassword());
  }
}

代码示例来源:origin: apache/incubator-shardingsphere

private static void initShardingOrchestrationFacade(
    final YamlProxyServerConfiguration serverConfig, final Map<String, YamlProxyRuleConfiguration> ruleConfigs, final ShardingOrchestrationFacade shardingOrchestrationFacade) {
  if (ruleConfigs.isEmpty()) {
    shardingOrchestrationFacade.init();
  } else {
    shardingOrchestrationFacade.init(getDataSourceConfigurationMap(ruleConfigs), getRuleConfiguration(ruleConfigs), 
        new Authentication(serverConfig.getAuthentication().getUsername(), serverConfig.getAuthentication().getPassword()), serverConfig.getConfigMap(), serverConfig.getProps());
  }
}

代码示例来源:origin: apache/incubator-shardingsphere

private static void initShardingOrchestrationFacade(
    final YamlProxyServerConfiguration serverConfig, final Map<String, YamlProxyRuleConfiguration> ruleConfigs, final ShardingOrchestrationFacade shardingOrchestrationFacade) {
  if (ruleConfigs.isEmpty()) {
    shardingOrchestrationFacade.init();
  } else {
    shardingOrchestrationFacade.init(getDataSourceConfigurationMap(ruleConfigs), getRuleConfiguration(ruleConfigs), 
        new Authentication(serverConfig.getAuthentication().getUsername(), serverConfig.getAuthentication().getPassword()), serverConfig.getConfigMap(), serverConfig.getProps());
  }
}

代码示例来源:origin: apache/incubator-shardingsphere

/**
 * Main entrance.
 *
 * @param args startup arguments
 * @throws InterruptedException interrupted exception
 * @throws IOException IO exception
 */
public static void main(final String[] args) throws InterruptedException, IOException {
  ShardingConfiguration shardingConfig = new ShardingConfigurationLoader().load();
  int port = getPort(args);
  new ProxyListenerRegister().register();
  if (null == shardingConfig.getServerConfiguration().getOrchestration()) {
    startWithoutRegistryCenter(shardingConfig.getRuleConfigurationMap(), 
        new Authentication(shardingConfig.getServerConfiguration().getAuthentication().getUsername(), shardingConfig.getServerConfiguration().getAuthentication().getPassword()),
        shardingConfig.getServerConfiguration().getConfigMap(), shardingConfig.getServerConfiguration().getProps(), port);
  } else {
    startWithRegistryCenter(shardingConfig.getServerConfiguration(), shardingConfig.getRuleConfigurationMap().keySet(), shardingConfig.getRuleConfigurationMap(), port);
  }
}

代码示例来源:origin: apache/incubator-shardingsphere

/**
 * Main entrance.
 *
 * @param args startup arguments
 * @throws InterruptedException interrupted exception
 * @throws IOException IO exception
 */
public static void main(final String[] args) throws InterruptedException, IOException {
  ShardingConfiguration shardingConfig = new ShardingConfigurationLoader().load();
  int port = getPort(args);
  new ProxyListenerRegister().register();
  if (null == shardingConfig.getServerConfiguration().getOrchestration()) {
    startWithoutRegistryCenter(shardingConfig.getRuleConfigurationMap(), 
        new Authentication(shardingConfig.getServerConfiguration().getAuthentication().getUsername(), shardingConfig.getServerConfiguration().getAuthentication().getPassword()),
        shardingConfig.getServerConfiguration().getConfigMap(), shardingConfig.getServerConfiguration().getProps(), port);
  } else {
    startWithRegistryCenter(shardingConfig.getServerConfiguration(), shardingConfig.getRuleConfigurationMap().keySet(), shardingConfig.getRuleConfigurationMap(), port);
  }
}

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com