Java equivalent for PHP's mysql_real_escape_string()

后端 未结 7 694
温柔的废话
温柔的废话 2021-01-11 10:17

Is there a Java equivalent to PHP\'s mysql_real_escape_string() ?

This is to escape SQL injection attempts before passing them to Statement.execute().

I know

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-11 10:39

    org.apache.commons.lang.StringEscapeUtils.class in commons-lang.jar could solve your problem!

提交回复
热议问题