用的是3.1版本,在数据库用这条sql查询是没问题
com.jfinal.plugin.activerecord.ActiveRecordException: java.sql.SQLException: sql injection violation, syntax error: syntax error, OVER over, pos 21 : select *,RANK () over (ORDER BY id DESC) from tb_user
at com.jfinal.plugin.activerecord.Model.find(Model.java:593)
at com.jfinal.plugin.activerecord.Model.find(Model.java:603)
at com.cn.xp.base._controller.active.ApiActiveController.test(ApiActiveController.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
项目:JFinal
确认 sql 没问题以后,注意这个异常:
java.sql.SQLException: sql injection violation
或许是你用的 druid 的 WallFilter 拦截了该 sql,认为该 sql 是有危险的,去除 WallFilter 试试