只用到 masterslavedatasource的时候 建议不要强制数据库类型一致
protected final DatabaseType getDatabaseType(final Collection<DataSource>
dataSources) throws SQLException {
DatabaseType result = null;
for (DataSource each : dataSources) {
DatabaseType databaseType = getDatabaseType(each);
Preconditions.checkState(null == result ||
result.equals(databaseType), String.format("Database type inconsistent with
'%s' and '%s'", result, databaseType));
result = databaseType;
}
return result;
}
发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用