Jfinal报错:

com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: sql injection violation, multi-statement not allow 

 

public List<WarningFormDoc> findDocByPatrolRecordId(String patrolRecordId){
String sql="select * from warning_form_doc where PATROL_RECORD_ID = " + patrolRecordId;
return WarningFormDoc.dao.find(sql);
}

改为:
public List<WarningFormDoc> findDocByPatrolRecordId(String patrolRecordId){
String sql="select * from warning_form_doc where PATROL_RECORD_ID = ?";
return WarningFormDoc.dao.find(sql, patrolRecordId);
}

原因可能存在sql注入报错;



相关文章:

  • 2022-12-23
  • 2021-09-10
  • 2021-12-11
  • 2022-01-29
  • 2022-01-02
  • 2021-08-19
猜你喜欢
  • 2022-01-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2021-04-01
  • 2022-12-23
相关资源
相似解决方案