Open archx opened 5 years ago
使用 @TxcTransaction(propagation = DTXPropagation.SUPPORTS)
注解
TxcSqlExecuteInterceptor
-> TableStructAnalyser
-> structRs = connection.getMetaData().getPrimaryKeys(connection.getCatalog(), null, table);
@Component
public class TableStructAnalyser {
// ...
public TableStruct analyse(Connection connection, String table) throws SQLException {
ResultSet structRs = null;
ResultSet columnSet = null;
TableStruct tableStruct = new TableStruct(table);
try {
structRs = connection.getMetaData().getPrimaryKeys(connection.getCatalog(), null, table);
columnSet = connection.getMetaData().getColumns(null, "%", table, "%");
while (structRs.next()) {
tableStruct.getPrimaryKeys().add(structRs.getString("COLUMN_NAME"));
}
while (columnSet.next()) {
tableStruct.getColumns().put(columnSet.getString("COLUMN_NAME"), columnSet.getString("TYPE_NAME"));
}
} catch (SQLException e) {
try {
DbUtils.close(structRs);
DbUtils.close(columnSet);
} catch (SQLException ignored) {
}
throw e;
}
return tableStruct;
}
// ....
}
1.问题描述
在demo中集成
shardingsphere 3.1.0
后出现异常shardingsphere
maven pom
spring boot
application.yaml
2. 环境:
3.异常信息