------------吾亦无他,唯手熟尔,谦卑若愚,好学若饥------------- 先点进去看一下insert方法 用ctrl加鼠标左键点进去看 发现是一个接口SqlSession的方法,没有实现 ,但是通过里氏替换原则的想法,他是接口接收了实现类,所以找他的实现类DefaultSqlSession(idea快捷键ctrl+H) 进去后用ctrl+F查找insert,可以看到多个insert方法构成的重载,但是他们的方法实现调用了这个 public int insert(String st…
这里做了比较清晰的解释: http://mybatis.github.io/mybatis-3/java-api.html SqlSession As mentioned above, the SqlSession instance is the most powerful class in MyBatis. It is where you'll find all of the methods to execute statements, commit or rollback transacti…