Ahora, las empresas suelen utilizar PreparedStatement para evitar la inyección de sql, pero a veces los parámetros establecidos se olvidan de mirarlos, hacer un registro y leer el blog la próxima vez.
// 代码块
PreparedStatement statement = null;
DruidPooledConnection connection = null;
connection = this.getUCDruidConnection();
String sql="select * from xxxx where xx=? and xx=? and xx=? and xx=? and xxx=? and xxx=? and xxx=? and xxx=? and xxx=?";
statement = connection.prepareStatement(sql);
statement.setInt(1, xxx);
statement.setInt(2, xxx);
Después de abrir, puede ver los parámetros que almacenamos:
expanda los parámetros, puede ver el valor establecido: