When to use $ vs #?
Following the myBatis guidelines #{} is used in your sql statements. If you take a look any of MyBatis Reference in the Section Mapper XML Files it says explicity: Notice the parameter notation: #{id} Otherwise ${} is for 1- Configuration properties. For example: <properties resource=”org/mybatis/example/config.properties”> <property name=”username” value=”dev_user”/> <property name=”password” value=”F2Fa3!33TYyg”/> </properties> Then the properties … Read more