本文整理了Java中org.wso2.carbon.utils.Utils.getRuntimeConfigPath()
方法的一些代码示例,展示了Utils.getRuntimeConfigPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getRuntimeConfigPath()
方法的具体详情如下:
包路径:org.wso2.carbon.utils.Utils
类名称:Utils
方法名:getRuntimeConfigPath
[英]Get the conf path of the runtime.
[中]获取运行时的conf路径。
代码示例来源:origin: org.wso2.carbon.auth/org.wso2.carbon.auth.oauth
private Map<String, List<String>> populateDefaultFileBaseScopes() {
Map<String, List<String>> fileBasedScopeMap = new LinkedHashMap<>();
String fileBasedConfigPath = Utils.getRuntimeConfigPath().toString() + File.separator + JDBCAuthConstants
.FILE_BASE_SCOPE_FILE_NAME;
try {
String content = IOUtils.toString(new FileInputStream(fileBasedConfigPath));
fileBasedScopeMap = (Map<String, List<String>>) new Yaml().load(content);
} catch (IOException e) {
log.error("Error while Reading Configuration:" + JDBCAuthConstants.FILE_BASE_SCOPE_FILE_NAME);
}
return fileBasedScopeMap;
}
}
代码示例来源:origin: org.wso2.carbon.config/org.wso2.carbon.config
/**
* Initialise carbon config provider.
*
* @param bundleContext OSGi Bundle Context
*/
private void initializeConfigProvider(BundleContext bundleContext) {
try {
Path deploymentConfigPath = Paths.get(Utils.getRuntimeConfigPath().toString(),
Constants.DEPLOYMENT_CONFIG_YAML);
ConfigProvider configProvider = ConfigProviderFactory.getConfigProvider(deploymentConfigPath, secureVault);
bundleContext.registerService(ConfigProvider.class, configProvider, null);
logger.debug("ConfigProvider OSGi service registered successfully");
} catch (ConfigurationException e) {
logger.error("Error occurred while initializing config provider" , e);
}
}
}
代码示例来源:origin: org.wso2.carbon.secvault/org.wso2.carbon.secvault.ciphertool
System.setProperty(Constants.RUNTIME, carbonRuntime);
Object objCipherTool = Utils.createCipherTool(urlClassLoader, org.wso2.carbon.utils.Utils
.getRuntimeConfigPath().resolve(Constants.DEPLOYMENT_CONFIG_YAML));
processCommand(commandName, commandParam, objCipherTool);
if (commandLineParser.getCommandName().isPresent()) {
Path secureVaultConfigPath;
if (customConfigPath == null) {
secureVaultConfigPath = org.wso2.carbon.utils.Utils.getRuntimeConfigPath().resolve(Constants
.DEPLOYMENT_CONFIG_YAML);
} else {
内容来源于网络,如有侵权,请联系作者删除!