Skip to content

Commit

Permalink
Merge pull request #3312 from luozongle01/fixTypo20241208
Browse files Browse the repository at this point in the history
Fix Typo
  • Loading branch information
hazendaz authored Dec 8, 2024
2 parents 94bee64 + a7e0032 commit 37fb15f
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/ibatis/annotations/Select.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* public interface UserMapper {
* @Select({ "<script>", "select * from users", "where name = #{name}",
* "<if test=\"age != null\"> age = #{age} </if>", "</script>" })
* User select(@NotNull String name, @Nullable Intger age);
* User select(@NotNull String name, @Nullable Integer age);
* }
* }</pre>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/
/**
* Parses annotions to create a Configuration.
* Parses annotations to create a Configuration.
*/
package org.apache.ibatis.builder.annotation;
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected String objectValueString(Object value) {
try {
return ArrayUtil.toString(((Array) value).getArray());
} catch (SQLException e) {
// Intentialy fall through to return value.toString()
// Intentionally fall through to return value.toString()
}
}
return value.toString();
Expand Down
2 changes: 1 addition & 1 deletion src/site/es/xdoc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
<td>
MyBatis, by default, returns <code>null</code> when all the columns of a returned row are NULL.
When this setting is enabled, MyBatis returns an empty instance instead.
Note that it is also applied to nested results (i.e. collectioin and association). Since: 3.4.2
Note that it is also applied to nested results (i.e. collection and association). Since: 3.4.2
</td>
<td>
true | false
Expand Down
2 changes: 1 addition & 1 deletion src/site/ja/markdown/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mappers 要素には Mapper のリストが含まれています。Mapper とは

## XML を使わずに SqlSessionFactory を生成する

XML を使わず Java のコードで設定を行いたい方のために、Configuraiton クラスが提供されています。<br />
XML を使わず Java のコードで設定を行いたい方のために、Configuration クラスが提供されています。<br />
XML 形式の設定ファイルで指定できるオプションは、このクラスでも全て設定可能です。

```java
Expand Down
6 changes: 3 additions & 3 deletions src/site/ja/xdoc/configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ public class StringTypeHandler extends BaseTypeHandler<String> {
</p>

<p>
MyBatis は、このタイプハンドラーの総称型(Genric Type)から適用対象の Java タイプを自動判定しますが、この動作をオーバーライドする方法が2つあります。
MyBatis は、このタイプハンドラーの総称型(Generic Type)から適用対象の Java タイプを自動判定しますが、この動作をオーバーライドする方法が2つあります。
</p>
<ul>
<li>typeHandler 要素に javaType 属性を追加する(例:javaType="String")
Expand Down Expand Up @@ -1775,8 +1775,8 @@ public class ExamplePlugin implements Interceptor {
</li>
</ul>
<p>
SqlSessionFactoryBuilder に envrionment を渡すことで、どの環境に対する SqlSessionFactory をビルドするか指定することができます。
envrionment を引数に取るシグネチャは下記の2つです。
SqlSessionFactoryBuilder に environment を渡すことで、どの環境に対する SqlSessionFactory をビルドするか指定することができます。
environment を引数に取るシグネチャは下記の2つです。
</p>

<source><![CDATA[SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environment);
Expand Down
4 changes: 2 additions & 2 deletions src/site/markdown/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ These are extremely important tweaks that modify the way that MyBatis behaves at
| defaultScriptingLanguage | Specifies the language used by default for dynamic SQL generation. | A type alias or fully qualified class name. | org.apache.ibatis.scripting.xmltags.XMLLanguageDriver |
| defaultEnumTypeHandler | Specifies the `TypeHandler` used by default for Enum. (Since: 3.4.5) | A type alias or fully qualified class name. | org.apache.ibatis.type.EnumTypeHandler |
| callSettersOnNulls | Specifies if setters or map's put method will be called when a retrieved value is null. It is useful when you rely on Map.keySet() or null value initialization. Note primitives such as (int,boolean,etc.) will not be set to null. | true &#124; false | false |
| returnInstanceForEmptyRow | MyBatis, by default, returns `null` when all the columns of a returned row are NULL. When this setting is enabled, MyBatis returns an empty instance instead. Note that it is also applied to nested results (i.e. collectioin and association). Since: 3.4.2 | true &#124; false | false |
| returnInstanceForEmptyRow | MyBatis, by default, returns `null` when all the columns of a returned row are NULL. When this setting is enabled, MyBatis returns an empty instance instead. Note that it is also applied to nested results (i.e. collection and association). Since: 3.4.2 | true &#124; false | false |
| logPrefix | Specifies the prefix string that MyBatis will add to the logger names. | Any String | Not set |
| logImpl | Specifies which logging implementation MyBatis should use. If this setting is not present logging implementation will be autodiscovered. | SLF4J &#124; LOG4J(deprecated since 3.5.9) &#124; LOG4J2 &#124; JDK_LOGGING &#124; COMMONS_LOGGING &#124; STDOUT_LOGGING &#124; NO_LOGGING | Not set |
| proxyFactory | Specifies the proxy tool that MyBatis will use for creating lazy loading capable objects. | CGLIB (deprecated since 3.5.10) &#124; JAVASSIST | JAVASSIST (MyBatis 3.3 or above) |
Expand Down Expand Up @@ -345,7 +345,7 @@ The associated JDBC type can be specified by two means:
- Adding a `jdbcType` attribute to the typeHandler element (for example: `jdbcType="VARCHAR"`).
- Adding a `@MappedJdbcTypes` annotation to your TypeHandler class specifying the list of JDBC types to associate it with. This annotation will be ignored if the `jdbcType` attribute as also been specified.

When deciding which TypeHandler to use in a `ResultMap`, the Java type is known (from the result type), but the JDBC type is unknown. MyBatis therefore uses the combination `javaType=[TheJavaType], jdbcType=null` to choose a TypeHandler. This means that using a `@MappedJdbcTypes` annotation *restricts* the scope of a TypeHandler and makes it unavailable for use in `ResultMap`s unless explicity set. To make a TypeHandler available for use in a `ResultMap`, set `includeNullJdbcType=true` on the `@MappedJdbcTypes` annotation. Since Mybatis 3.4.0 however, if a **single** TypeHandler is registered to handle a Java type, it will be used by default in `ResultMap`s using this Java type (i.e. even without `includeNullJdbcType=true`).
When deciding which TypeHandler to use in a `ResultMap`, the Java type is known (from the result type), but the JDBC type is unknown. MyBatis therefore uses the combination `javaType=[TheJavaType], jdbcType=null` to choose a TypeHandler. This means that using a `@MappedJdbcTypes` annotation *restricts* the scope of a TypeHandler and makes it unavailable for use in `ResultMap`s unless explicitly set. To make a TypeHandler available for use in a `ResultMap`, set `includeNullJdbcType=true` on the `@MappedJdbcTypes` annotation. Since Mybatis 3.4.0 however, if a **single** TypeHandler is registered to handle a Java type, it will be used by default in `ResultMap`s using this Java type (i.e. even without `includeNullJdbcType=true`).

And finally you can let MyBatis search for your TypeHandlers:

Expand Down
2 changes: 1 addition & 1 deletion src/site/zh_CN/markdown/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Mybatis 通过使用内置的日志工厂提供日志功能。内置日志工厂

MyBatis 内置日志工厂基于运行时自省机制选择合适的日志工具。它会使用第一个查找得到的工具(按上文列举的顺序查找)。如果一个都未找到,日志功能就会被禁用。

不少应用服务器(如 Tomcat 和 WebShpere)的类路径中已经包含 Commons Logging,所以在这种配置环境下的 MyBatis 会把它作为日志工具,记住这点非常重要。这将意味着,在诸如 WebSphere 的环境中,它提供了 Commons Logging 的私有实现,你的 Log4J 配置将被忽略。MyBatis 将你的 Log4J 配置忽略掉是相当令人郁闷的(事实上,正是因为在这种配置环境下,MyBatis 才会选择使用 Commons Logging 而不是 Log4J)。如果你的应用部署在一个类路径已经包含 Commons Logging 的环境中,而你又想使用其它日志工具,你可以通过在 MyBatis 配置文件 mybatis-config.xml 里面添加一项 setting 来选择别的日志工具。
不少应用服务器(如 Tomcat 和 WebSphere)的类路径中已经包含 Commons Logging,所以在这种配置环境下的 MyBatis 会把它作为日志工具,记住这点非常重要。这将意味着,在诸如 WebSphere 的环境中,它提供了 Commons Logging 的私有实现,你的 Log4J 配置将被忽略。MyBatis 将你的 Log4J 配置忽略掉是相当令人郁闷的(事实上,正是因为在这种配置环境下,MyBatis 才会选择使用 Commons Logging 而不是 Log4J)。如果你的应用部署在一个类路径已经包含 Commons Logging 的环境中,而你又想使用其它日志工具,你可以通过在 MyBatis 配置文件 mybatis-config.xml 里面添加一项 setting 来选择别的日志工具。

```xml
<configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/site/zh_CN/xdoc/java-api.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ try (SqlSession session = sqlSessionFactory.openSession()) {
<td><code>@CacheNamespace</code></td>
<td><code>类</code></td>
<td><code>&lt;cache&gt;</code></td>
       <td>为给定的命名空间(比如类)配置缓存。属性:<code>implemetation</code>、<code>eviction</code>、<code>flushInterval</code>、<code>size</code>、<code>readWrite</code>、<code>blocking</code>、<code>properties</code>。</td>
       <td>为给定的命名空间(比如类)配置缓存。属性:<code>implementation</code>、<code>eviction</code>、<code>flushInterval</code>、<code>size</code>、<code>readWrite</code>、<code>blocking</code>、<code>properties</code>。</td>
</tr>
<tr>
<td><code>@Property</code></td>
Expand Down

0 comments on commit 37fb15f

Please sign in to comment.