我正在尝试使用 executor 对象使用 jdbcTemplate 执行查询,但由于某种原因,该程序没有进入 jdbcTemplate 内部。
ExecutorService executor = Executors.newFixedThreadPool(NUMBER_OF_CONCURRENT_THREADS);
executor.execute(new Runnable() {
@Override
public void run() {
inboundJdbcTemplate.query(selectQuery, new RowCallbackHandler() {
@Override
public void processRow(ResultSet rs) throws SQLException {//<-instruction pointer never goes to this line
try {
//buffer.put(buildDataPoint(rs, testPermutationId));
System.out.println(rs.getString(0));
} catch (InterruptedException e) {
e.printStackTrace();
Thread.currentThread().interrupt();
}
}
});
try {
buffer.put(STOPPING_TOKEN);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
谁能帮我解决这个愚蠢的错误?