Skip to content

Commit 9984e97

Browse files
committed
Japanese translation for the 3rd party DataSource configuration.
1 parent 228bdba commit 9984e97

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/site/ja/xdoc/configuration.xml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,19 +1474,19 @@ SqlSessionFactory factory = sqlSessionFactoryBuilder.build(reader,properties);]]
14741474
上記のように指定すると、"encoding=UTF8" というプロパティが InitialContext のインスタンス生成時にコンストラクタに渡されます。
14751475
</p>
14761476

1477-
<p>
1478-
You can plug any 3rd party DataSource by implementing the interface <code>org.apache.ibatis.datasource.DataSourceFactory</code>:
1479-
</p>
1477+
<p>
1478+
上記以外の DataSource を利用する場合は <code>org.apache.ibatis.datasource.DataSourceFactory</code> インターフェイスを実装したアダプタを作成します。
1479+
</p>
14801480

14811481
<source><![CDATA[public interface DataSourceFactory {
14821482
void setProperties(Properties props);
14831483
DataSource getDataSource();
14841484
}]]></source>
14851485

14861486
<p>
1487-
<code>org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory</code> can be used as super class
1488-
class to build new datasource adapters. For example this is the code needed to plug C3P0:
1489-
</p>
1487+
アダプタを作成する際は <code>org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory</code> を継承することもできます。
1488+
下記は C3P0 のデータソースを利用する場合の実装例です。
1489+
</p>
14901490

14911491
<source><![CDATA[import org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory;
14921492
import com.mchange.v2.c3p0.ComboPooledDataSource;
@@ -1498,8 +1498,10 @@ public class C3P0DataSourceFactory extends UnpooledDataSourceFactory {
14981498
}
14991499
}]]></source>
15001500

1501-
<p>To set it up, add a property for each setter method you want MyBatis to call.
1502-
Below depicts a sample configuration which connects to a PostgreSQL database:</p>
1501+
<p>
1502+
作成したアダプタを設定する場合は property 要素を使って必要なプロパティを指定します。
1503+
上述のアダプタを使って PostgreSQL に接続する場合の設定例を挙げておきます。
1504+
</p>
15031505

15041506
<source><![CDATA[<dataSource type="org.myproject.C3P0DataSourceFactory">
15051507
<property name="driver" value="org.postgresql.Driver"/>

0 commit comments

Comments
 (0)