【Video & Communication Platform】
http://study.163.com/course/introduction.htm?courseId=1004329008&utm_campaign=commission&utm_source=400000000155061&utm_medium=share
http://study.163.com/course/introduction.htm?courseId=1004638001&utm_campaign=commission&utm_source=400000000155061&utm_medium=share
https://gitee.com/happyangellxq520/spring-boot
à Spring Boot communication platform
http://412887952-qq-com.iteye.com/blog/2321532
[This blog, there is a supporting video, the video address: " Spring Boot MyBatis Upgrade - Annotation - # and $ Symbol Special ( HD) " , click the following to read the original text in the official account, and the video will explain in more detail]
The # and $ symbols play a very important role in MyBatis 's SQL parameter injection. These two symbols still need to be understood clearly, otherwise the attacked SQL statement may be written . Well, this article is to solve the respective usage scenarios of # and $ .
Outline of this section:
Next, please move to the WeChat public account SpringBoot to browse:
Check the springboot official account article for details (the official account QR code, enter 140 to return to the article):
-----------------------------------------------------------
Example description:
à Statements using #{} :
@Select("Select * from Demo where name = #{name}") public List<Demo> selectByName1(@Param("name") String name);
Explanation: This example creates a precompiled statement that looks like: select * from Demo where name = ?;
Observe the console's SQL print:
selectByName1 : ==> Preparing: Select * from Demo where name = ? DemoMapper.selectByName1 : ==> Parameters: 王五(String) DemoMapper.selectByName1 : <== Total: 9
视频&交流平台:
http://study.163.com/course/introduction.htm?courseId=1004329008
http://412887952-qq-com.iteye.com/blog/2321532