错误原因 使用String.format时,待fomat的字符串本身存在%,例如: String.format("where t.name like 王% and t.id = %s", idStr ) 修正 String.format("where t.name like 王%% and t.id = %s", idStr )