`

mybatis注解 #与$的区别

阅读更多

mybatis注解 #与$的区别:

 

$将传入的数据直接拼接在sql中。

@Delete(value = "update t_product  set isDelete='1',updateTime=#{updateTime} where id in(${ids})")

 

#方式能够很大程度防止sql注入。

一般能用#的就别用$. 

 

 

 

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics