Skip to content

Commit 0e60a09

Browse files
donhuiharawata
andauthored
keep id the same as the English doc
Co-Authored-By: Iwao AVE! <[email protected]>
1 parent 0c5fa26 commit 0e60a09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/site/zh/xdoc/java-api.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<p>这部分内容剩余的示例将假设你使用了这种目录结构。</p>
6666
</subsection>
6767

68-
<subsection name="SqlSession" id="sqlSession">
68+
<subsection name="SqlSession" id="sqlSessions">
6969
<p>使用 MyBatis 的主要 Java 接口就是 SqlSession。你可以通过这个接口来执行命令,获取映射器和管理事务。我们会概括讨论一下 SqlSession 本身,但是首先我们还是要了解如何获取一个 SqlSession 实例。SqlSession 是由 SqlSessionFactory 实例创建的。SqlSessionFactory 对象包含创建 SqlSession 实例的所有方法。而 SqlSessionFactory 本身是由 SqlSessionFactoryBuilder 创建的,它可以从 XML、注解或手动配置 Java 代码来创建 SqlSessionFactory。</p>
7070
<p>
7171
<span class="label important">注意</span> 当 Mybatis 与一些依赖注入框架(如 Spring 或者 Guice)同时使用时,SqlSession 将被依赖注入框架所创建,所以你不需要使用 SqlSessionFactoryBuilder 或者 SqlSessionFactory,可以直接看 SqlSession 这一节。请参考 Mybatis-Spring 或者 Mybatis-Guice 手册了解更多信息。</p>

0 commit comments

Comments
 (0)