关于Parameter index out of range (1 > number of parameters, which is 0).
解决方法:
stmt = conn.prepareStatement("SELECT * from me.tb_sign where 1=1");
stmt.setObject(1, "参数1");
这个使用prepareStatement预处理sql时就报这种错,因为sql里没问号,但却通过stmt.setObject来设置参数。
修改:
stmt = conn.prepareStatement("SELECT * from me.tb_sign where name=?");
stmt.setObject(1, "参数1");
向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti