Skip to content

Commit cd70a99

Browse files
TimRoweharawata
authored andcommitted
Add Chinese Translation.
1 parent 66e1b99 commit cd70a99

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

src/site/zh/xdoc/configuration.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
9191
<p>因此,通过方法参数传递的属性具有最高优先级,resource/url 属性中指定的配置文件次之,最低优先级的是 properties 属性中指定的属性。</p>
9292

9393
<p>
94-
Since the MyBatis 3.4.2, your can specify a default value into placeholder as follow:
94+
从MyBatis 3.4.2开始,你可以为占位符指定一个默认值。例如:
9595
</p>
9696
<source><![CDATA[
9797
<dataSource type="POOLED">
@@ -100,8 +100,8 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
100100
</dataSource>]]></source>
101101

102102
<p>
103-
This feature is disabled by default. If you specify a default value into placeholder,
104-
you should be enable this feature by adding a special property as follow:
103+
这个特性默认是关闭的。如果你想为占位符指定一个默认值,
104+
你应该添加一个指定的属性来开启这个特性。例如:
105105
</p>
106106

107107
<source><![CDATA[
@@ -111,9 +111,9 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
111111
</properties>]]></source>
112112

113113
<p>
114-
<span class="label important">NOTE</span> Also If you are used already the <code>":"</code> as property key(e.g. <code>db:username</code>)
115-
or you are used already the ternary operator of OGNL expression(e.g. <code>${tableName != null ? tableName : 'global_constants'}</code>) on your sql definition,
116-
you should be change the character that separate key and default value by adding a special property as follow:
114+
<span class="label important">NOTE</span> 你可以使用 <code>":"</code> 作为属性键(e.g. <code>db:username</code>)
115+
或者你也可以在sql定义中使用 OGNL 表达式的三元运算符(e.g. <code>${tableName != null ? tableName : 'global_constants'}</code>)
116+
你应该通过增加一个指定的属性来改变分隔键和默认值的字符。例如:
117117
</p>
118118

119119
<source><![CDATA[
@@ -175,7 +175,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
175175
aggressiveLazyLoading
176176
</td>
177177
<td>
178-
When enabled, any method call will load all the lazy properties of the object. Otherwise, each property is loaded on demand (see also <code>lazyLoadTriggerMethods</code>).
178+
当开启时,任何方法的调用都会加载该对象的所有属性。否则,每个属性会按需加载(参考<code>lazyLoadTriggerMethods</code>).
179179
</td>
180180
<td>
181181
true | false
@@ -249,11 +249,11 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
249249
autoMappingUnknownColumnBehavior
250250
</td>
251251
<td>
252-
Specify the behavior when detects an unknown column (or unknown property type) of automatic mapping target.
252+
指定发现自动映射目标未知列(或者未知属性类型)的行为。
253253
<ul>
254-
<li><code>NONE</code>: Do nothing</li>
255-
<li><code>WARNING</code>: Output warning log (The log level of <code>'org.apache.ibatis.session.AutoMappingUnknownColumnBehavior'</code> must be set to <code>WARN</code>)</li>
256-
<li><code>FAILING</code>: Fail mapping (Throw <code>SqlSessionException</code>)</li>
254+
<li><code>NONE</code>: 不做任何反应</li>
255+
<li><code>WARNING</code>: 输出提醒日志 (<code>'org.apache.ibatis.session.AutoMappingUnknownColumnBehavior'</code> 的日志等级必须设置为 <code>WARN</code>)</li>
256+
<li><code>FAILING</code>: 映射失败 (抛出 <code>SqlSessionException</code>)</li>
257257
</ul>
258258
</td>
259259
<td>
@@ -430,9 +430,9 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
430430
returnInstanceForEmptyRow
431431
</td>
432432
<td>
433-
MyBatis, by default, returns <code>null</code> when all the columns of a returned row are NULL.
434-
When this setting is enabled, MyBatis returns an empty instance instead.
435-
Note that it is also applied to nested results (i.e. collectioin and association). Since: 3.4.2
433+
当返回行的所有列都是空时,MyBatis默认返回<code>null</code>
434+
当开启这个设置时,MyBatis会返回一个空实例。
435+
请注意,它也适用于嵌套的结果集 (i.e. collectioin and association)。(从3.4.2开始)
436436
</td>
437437
<td>
438438
true | false

0 commit comments

Comments
 (0)