Skip to content

Commit 00e7732

Browse files
committed
Merge branch 'master' into master-update-configuration-15
2 parents bf973b0 + 7b856e8 commit 00e7732

File tree

5 files changed

+21
-22
lines changed

5 files changed

+21
-22
lines changed

src/main/java/org/apache/ibatis/builder/xml/mybatis-3-mapper.dtd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ extends CDATA #IMPLIED
6161
autoMapping (true|false) #IMPLIED
6262
>
6363

64-
<!ELEMENT constructor (idArg*,arg*)>
64+
<!ELEMENT constructor ((idArg|arg)*)>
6565

6666
<!ELEMENT id EMPTY>
6767
<!ATTLIST id

src/main/java/org/apache/ibatis/builder/xml/mybatis-mapper.xsd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2009-2021 the original author or authors.
4+
Copyright 2009-2022 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -108,10 +108,10 @@
108108
</xs:element>
109109
<xs:element name="constructor">
110110
<xs:complexType>
111-
<xs:sequence>
112-
<xs:element minOccurs="0" maxOccurs="unbounded" ref="idArg"/>
113-
<xs:element minOccurs="0" maxOccurs="unbounded" ref="arg"/>
114-
</xs:sequence>
111+
<xs:choice minOccurs="1" maxOccurs="unbounded">
112+
<xs:element ref="idArg"/>
113+
<xs:element ref="arg"/>
114+
</xs:choice>
115115
</xs:complexType>
116116
</xs:element>
117117
<xs:element name="id">

src/site/zh/xdoc/configuration.xml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
500500
指定 MyBatis 所用日志的具体实现,未指定时将自动查找。
501501
</td>
502502
<td>
503-
SLF4J | LOG4J(deprecated since 3.5.9) | LOG4J2 | JDK_LOGGING | COMMONS_LOGGING | STDOUT_LOGGING | NO_LOGGING
503+
SLF4J | LOG4J3.5.9 起废弃) | LOG4J2 | JDK_LOGGING | COMMONS_LOGGING | STDOUT_LOGGING | NO_LOGGING
504504
</td>
505505
<td>
506506
未设置
@@ -514,7 +514,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
514514
指定 Mybatis 创建可延迟加载对象所用到的代理工具。
515515
</td>
516516
<td>
517-
CGLIB (deprecated since 3.5.10) | JAVASSIST
517+
CGLIB 3.5.10 起废弃) | JAVASSIST
518518
</td>
519519
<td>
520520
JAVASSIST (MyBatis 3.3 以上)
@@ -584,23 +584,22 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
584584
defaultSqlProviderType
585585
</td>
586586
<td>
587-
Specifies an sql provider class that holds provider method (Since 3.5.6).
588-
This class apply to the <code>type</code>(or <code>value</code>) attribute on sql provider annotation(e.g. <code>@SelectProvider</code>),
589-
when these attribute was omitted.
587+
指定一个拥有 provider 方法的 sql provider 类 (新增于 3.5.6).
588+
这个类适用于指定 sql provider 注解上的<code>type</code>(或 <code>value</code>) 属性(当这些属性在注解中被忽略时)。 (e.g. <code>@SelectProvider</code>)
590589
</td>
591590
<td>
592-
A type alias or fully qualified class name
591+
类型别名或者全限定名
593592
</td>
594593
<td>
595-
Not set
594+
未设置
596595
</td>
597596
</tr>
598597
<tr>
599598
<td>
600599
nullableOnForEach
601600
</td>
602601
<td>
603-
Specifies the default value of 'nullable' attribute on 'foreach' tag. (Since 3.5.9)
602+
为 'foreach' 标签的 'nullable' 属性指定默认值。(新增于 3.5.9
604603
</td>
605604
<td>
606605
true | false
@@ -614,7 +613,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, environ
614613
argNameBasedConstructorAutoMapping
615614
</td>
616615
<td>
617-
When applying constructor auto-mapping, argument name is used to search the column to map instead of relying on the column order. (Since 3.5.10)
616+
当应用构造器自动映射时,参数名称被用来搜索要映射的列,而不再依赖列的顺序。(新增于 3.5.10
618617
</td>
619618
<td>
620619
true | false
@@ -1697,7 +1696,7 @@ SqlSessionFactory factory = new SqlSessionFactoryBuilder().build(reader, propert
16971696
<p>在 MyBatis 中有两种类型的事务管理器(也就是 type="[JDBC|MANAGED]"):</p>
16981697
<ul>
16991698
<li>
1700-
JDBC – 这个配置直接使用了 JDBC 的提交和回滚设施,它依赖从数据源获得的连接来管理事务作用域。 By default, it enables auto-commit when closing the connection for compatibility with some drivers. However, for some drivers, enabling auto-commit is not only unnecesry, but also is an expensive operation. So, since version 3.5.10, you can skip this step by setting the "skipSetAutoCommitOnClose" property to true. For example:
1699+
JDBC – 这个配置直接使用了 JDBC 的提交和回滚功能,它依赖从数据源获得的连接来管理事务作用域。默认情况下,为了与某些驱动程序兼容,它在关闭连接时启用自动提交。然而,对于某些驱动程序来说,启用自动提交不仅是不必要的,而且是一个代价高昂的操作。因此,从 3.5.10 版本开始,你可以通过将 "skipSetAutoCommitOnClose" 属性设置为 "true" 来跳过这个步骤。例如:
17011700
<source><![CDATA[<transactionManager type="JDBC">
17021701
<property name="skipSetAutoCommitOnClose" value="true"/>
17031702
</transactionManager>]]></source>

src/site/zh/xdoc/logging.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
Log4j 2
4040
</li>
4141
<li>
42-
Log4j (deprecated since 3.5.9)
42+
Log4j 3.5.9 起废弃)
4343
</li>
4444
<li>
4545
JDK logging
@@ -97,7 +97,7 @@ org.apache.ibatis.logging.LogFactory.useStdOutLogging();
9797
</p>
9898
<p>对于 web 应用或企业级应用,则需要将 <code>logback-classic.jar</code>, <code>logback-core.jar</code> and <code>slf4j-api.jar</code> 添加到 <code>WEB-INF/lib</code> 目录下;对于独立应用,可以将它添加到JVM 的 <code>-classpath</code> 启动参数中。
9999
</p>
100-
<p>If you use the maven, you can download jar files by adding following settings on your <code>pom.xml</code>.
100+
<p>如果你使用 maven, 你可以通过在 <code>pom.xml</code> 中添加下面的依赖来下载 jar 文件。
101101
</p>
102102
<source><![CDATA[
103103
<dependency>
@@ -213,7 +213,7 @@ public interface BlogMapper {
213213

214214
<p></p>
215215
<h4>
216-
Configuration example for Log4j 2
216+
Log4j 2 配置示例
217217
</h4>
218218

219219
<p><code>pom.xml</code></p>
@@ -250,7 +250,7 @@ public interface BlogMapper {
250250

251251
<p></p>
252252
<h4>
253-
Configuration example for Log4j
253+
Log4j 配置示例
254254
</h4>
255255

256256
<p><code>pom.xml</code></p>
@@ -277,7 +277,7 @@ log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n
277277

278278
<p></p>
279279
<h4>
280-
Configuration example for JDK logging
280+
JDK logging 配置示例
281281
</h4>
282282

283283
<p><code>logging.properties</code></p>

src/test/java/org/apache/ibatis/reflection/ReflectorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ static class Child extends Parent<String> {
174174
}
175175

176176
@Test
177-
void shouldResoleveReadonlySetterWithOverload() {
177+
void shouldResolveReadonlySetterWithOverload() {
178178
class BeanClass implements BeanInterface<String> {
179179
@Override
180180
public void setId(String id) {

0 commit comments

Comments
 (0)