## in Mybatis frame # $ {} and {} What is the difference? do you know?

In Mybatis framework with $ # {} {} What is the difference? do you know?

  {#} Denotes a placeholder
    # {} May be implemented by the preparedStatement , java types and automatic conversion into jdbc type placeholder setting values # {} sql injection can be effectively prevented . # {} May receive pojo simple type values or attribute values. If the transmission of a single parameterType simple class -point value, {} brackets # may be another value or name.
  $ {} Represents a splicing sequence sql
   By $ {} may be parameterType incoming content not spliced in the sql jdbc type conversion, $ {} may receive a simple single value or pojo type attribute value, if the transmission of a single parameterType simple type values, $ {} brackets only It can be value.

 

Guess you like

Origin www.cnblogs.com/liurui-bk517/p/11305219.html