sql注入

Statement --------------->>>select * from 表名 where username=' username' and password=' 可填可不填  ' or 1=1 -- '  -与'之间有个空格

这样就可以登录了    说明Statement不能防止非法注入

PreparedStatement----------------->>>>同样的上面那个语句   不可运行   

原文地址:https://www.cnblogs.com/ly-china/p/5414149.html