PreparedStatementによって設定されたパラメーターを確認する場所!

現在、企業はSQLインジェクションを防ぐためにPreparedStatementを使用することがよくありますが、設定されたパラメーターがそれを確認し、記録を作成し、次回ブログを読むことを忘れることがあります。

// 代码块
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);

ここに画像の説明を挿入

開くと、保存したパラメータが表示されます。パラメータを
ここに画像の説明を挿入
展開すると、設定値が表示されます。
ここに画像の説明を挿入
ここに画像の説明を挿入

おすすめ

転載: blog.csdn.net/qq_42258975/article/details/108732126