[go: nahoru, domu]

Skip to content

Commit

Permalink
Merge pull request mybatis#2185 from junejs/fix-doc-typo-zh
Browse files Browse the repository at this point in the history
Fix doc typo
  • Loading branch information
harawata committed Mar 20, 2021
2 parents 590dfe8 + b02f123 commit b91f62b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/site/zh/xdoc/java-api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</subsection>

<subsection name="SqlSession" id="sqlSessions">
<p>使用 MyBatis 的主要 Java 接口就是 SqlSession。你可以通过这个接口来执行命令,获取映射器示例和管理事务。在介绍 SqlSession 接口之前,我们先来了解如何获取一个 SqlSession 实例。SqlSessions 是由 SqlSessionFactory 实例创建的。SqlSessionFactory 对象包含创建 SqlSession 实例的各种方法。而 SqlSessionFactory 本身是由 SqlSessionFactoryBuilder 创建的,它可以从 XML、注解或 Java 配置代码来创建 SqlSessionFactory。</p>
<p>使用 MyBatis 的主要 Java 接口就是 SqlSession。你可以通过这个接口来执行命令,获取映射器实例和管理事务。在介绍 SqlSession 接口之前,我们先来了解如何获取一个 SqlSession 实例。SqlSessions 是由 SqlSessionFactory 实例创建的。SqlSessionFactory 对象包含创建 SqlSession 实例的各种方法。而 SqlSessionFactory 本身是由 SqlSessionFactoryBuilder 创建的,它可以从 XML、注解或 Java 配置代码来创建 SqlSessionFactory。</p>
<p>
<span class="label important">提示</span> 当 Mybatis 与一些依赖注入框架(如 Spring 或者 Guice)搭配使用时,SqlSession 将被依赖注入框架创建并注入,所以你不需要使用 SqlSessionFactoryBuilder 或者 SqlSessionFactory,可以直接阅读 SqlSession 这一节。请参考 Mybatis-Spring 或者 Mybatis-Guice 手册以了解更多信息。</p>
<h4>SqlSessionFactoryBuilder</h4>
Expand Down

0 comments on commit b91f62b

Please sign in to comment.