代码拉取完成,页面将自动刷新
hikari多数据源的时候走这个处理逻辑的话,jdbc.many.exam.username这种参数只是把“jdbc.”去掉,保留“many.exam.username”,后续hikari创建datasource时候会报错,多数据源的时候substring(5)是不是应该改成substring(prefix.length())啊
public static DataSource createHikariCPDataSource(PropertiesProxy conf, String prefix) throws Exception {
Properties properties = new Properties();
for (String key : conf.keys()) {
if (!key.startsWith(prefix) || key.equals(prefix + "type"))
continue;
if (key.equals(prefix + "url")) {
if (!conf.has(prefix + "jdbcUrl"))
properties.put("jdbcUrl", conf.get(key));
} else {
properties.put(key.substring(5), conf.get(key));
}
}
return new HikariDataSource(new HikariConfig(properties));
}
要不发个pull request吧?
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
登录 后才可以发表评论