Skip to content

Commit 57223cc

Browse files
committed
Update document
See mybatisgh-376
1 parent 45c764d commit 57223cc

File tree

5 files changed

+52
-6
lines changed

5 files changed

+52
-6
lines changed

src/site/es/xdoc/mappers.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
133133
<p>
134134
<span class="label important">IMPORTANT</span> If use the lazy initialization feature,
135135
the developer need to understand following limitations. If any of following conditions are matches,
136-
the lazy initialization feature cannot use on your application.
136+
usually the lazy initialization feature cannot use on your application.
137137
</p>
138138
<ul>
139139
<li>When refers to the statement of <b>other mapper</b> using <code><![CDATA[<association>]]></code>(<code>@One</code>) and <code><![CDATA[<collection>]]></code>(<code>@Many</code>)</li>
@@ -142,6 +142,15 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
142142
<li>When refers to the result mapping of <b>other mapper</b> using <code><![CDATA[<select resultMap="...">]]></code>(<code>@ResultMap</code>)</li>
143143
</ul>
144144

145+
<p>
146+
<span class="label important">NOTE</span> However, It become possible to use it by simultaneously initializing dependent beans using <code>@DependsOn</code>(Spring's feature) as follow:
147+
</p>
148+
149+
<source><![CDATA[@DependsOn("vendorMapper")
150+
public interface GoodsMapper {
151+
// ...
152+
}]]></source>
153+
145154
<h4>&lt;mybatis:scan/&gt;</h4>
146155

147156
<p>

src/site/ja/xdoc/mappers.xml

+11-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
120120
</p>
121121
<p>
122122
<span class="label important">重要</span> 遅延初期化機能を使用する場合は、開発者は以下の制限を理解しておく必要があります。
123-
以下の条件のいずれかに一致する場合、あなたのアプリケーションで遅延初期化機能を使用することはできません
123+
以下の条件のいずれかに一致する場合、通常あなたのアプリケーションで遅延初期化機能を使用することはできません
124124
</p>
125125
<ul>
126126
<li><code><![CDATA[<association>]]></code>(<code>@One</code>) and <code><![CDATA[<collection>]]></code>(<code>@Many</code>)を利用して、<b>他のMapperの</b>ステートメントを参照している場合</li>
@@ -129,6 +129,16 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
129129
<li><code><![CDATA[<select resultMap="...">]]></code>(<code>@ResultMap</code>)を利用して、<b>他のMapperの</b>結果マッピングを参照している場合</li>
130130
</ul>
131131

132+
<p>
133+
<span class="label important">NOTE</span> しかしながら、以下のように<code>@DependsOn</code>(Springの機能)を利用して、
134+
依存するMapper Beanも同時に初期化すると遅延初期化機能を利用することができるようになります。
135+
</p>
136+
137+
<source><![CDATA[@DependsOn("vendorMapper")
138+
public interface GoodsMapper {
139+
// ...
140+
}]]></source>
141+
132142
<h4>&lt;mybatis:scan/&gt;</h4>
133143

134144
<p>

src/site/ko/xdoc/mappers.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
109109
<p>
110110
<span class="label important">IMPORTANT</span> If use the lazy initialization feature,
111111
the developer need to understand following limitations. If any of following conditions are matches,
112-
the lazy initialization feature cannot use on your application.
112+
usually the lazy initialization feature cannot use on your application.
113113
</p>
114114
<ul>
115115
<li>When refers to the statement of <b>other mapper</b> using <code><![CDATA[<association>]]></code>(<code>@One</code>) and <code><![CDATA[<collection>]]></code>(<code>@Many</code>)</li>
@@ -118,6 +118,15 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
118118
<li>When refers to the result mapping of <b>other mapper</b> using <code><![CDATA[<select resultMap="...">]]></code>(<code>@ResultMap</code>)</li>
119119
</ul>
120120

121+
<p>
122+
<span class="label important">NOTE</span> However, It become possible to use it by simultaneously initializing dependent beans using <code>@DependsOn</code>(Spring's feature) as follow:
123+
</p>
124+
125+
<source><![CDATA[@DependsOn("vendorMapper")
126+
public interface GoodsMapper {
127+
// ...
128+
}]]></source>
129+
121130
<h4>&lt;mybatis:scan/&gt;</h4>
122131

123132
<p><code>&lt;mybatis:scan/&gt;</code> XML엘리먼트는 스프링에서 제공하는 <code>&lt;context:component-scan/&gt;</code> 엘리먼트와 매우 유사한 방법으로 매퍼를 검색할 것이다. </p>

src/site/xdoc/mappers.xml

+11-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
136136
<p>
137137
<span class="label important">IMPORTANT</span> If use the lazy initialization feature,
138138
the developer need to understand following limitations. If any of following conditions are matches,
139-
the lazy initialization feature cannot use on your application.
139+
usually the lazy initialization feature cannot use on your application.
140140
</p>
141141
<ul>
142142
<li>When refers to the statement of <b>other mapper</b> using <code><![CDATA[<association>]]></code>(<code>@One</code>) and <code><![CDATA[<collection>]]></code>(<code>@Many</code>)</li>
@@ -145,6 +145,15 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
145145
<li>When refers to the result mapping of <b>other mapper</b> using <code><![CDATA[<select resultMap="...">]]></code>(<code>@ResultMap</code>)</li>
146146
</ul>
147147

148+
<p>
149+
<span class="label important">NOTE</span> However, It become possible to use it by simultaneously initializing dependent beans using <code>@DependsOn</code>(Spring's feature) as follow:
150+
</p>
151+
152+
<source><![CDATA[@DependsOn("vendorMapper")
153+
public interface GoodsMapper {
154+
// ...
155+
}]]></source>
156+
148157
<h4>&lt;mybatis:scan/&gt;</h4>
149158

150159
<p>
@@ -161,7 +170,7 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
161170
xsi:schemaLocation="
162171
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
163172
http://mybatis.org/schema/mybatis-spring http://mybatis.org/schema/mybatis-spring.xsd">
164-
173+
165174
<mybatis:scan base-package="org.mybatis.spring.sample.mapper" />
166175
167176
<!-- ... -->

src/site/zh/xdoc/mappers.xml

+10-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
117117
<p>
118118
<span class="label important">IMPORTANT</span> If use the lazy initialization feature,
119119
the developer need to understand following limitations. If any of following conditions are matches,
120-
the lazy initialization feature cannot use on your application.
120+
usually the lazy initialization feature cannot use on your application.
121121
</p>
122122
<ul>
123123
<li>When refers to the statement of <b>other mapper</b> using <code><![CDATA[<association>]]></code>(<code>@One</code>) and <code><![CDATA[<collection>]]></code>(<code>@Many</code>)</li>
@@ -126,6 +126,15 @@ public MapperFactoryBean<UserMapper> userMapper() throws Exception {
126126
<li>When refers to the result mapping of <b>other mapper</b> using <code><![CDATA[<select resultMap="...">]]></code>(<code>@ResultMap</code>)</li>
127127
</ul>
128128

129+
<p>
130+
<span class="label important">NOTE</span> However, It become possible to use it by simultaneously initializing dependent beans using <code>@DependsOn</code>(Spring's feature) as follow:
131+
</p>
132+
133+
<source><![CDATA[@DependsOn("vendorMapper")
134+
public interface GoodsMapper {
135+
// ...
136+
}]]></source>
137+
129138
<h4>&lt;mybatis:scan/&gt;</h4>
130139

131140
<p>

0 commit comments

Comments
 (0)