1

これらのパラメーターの設定方法: http://commons.apache.org/proper/commons-pool/api-1.2/org/apache/commons/pool/impl/GenericKeyedObjectPoolFactory.html

私はプールを実装しました。さまざまなパラメーターを設定したいのですが [主に Bean を使用して]、これらのパラメーターがどこで呼び出されているのかわかりません。それらのゲッターまたはセッターがないようです

4

1 に答える 1

1

コンストラクター引数を使用します。Spring docs から取り上げた例を次に示します。

<bean id="exampleBean" class="examples.ExampleBean">
  <constructor-arg><ref bean="anotherExampleBean"/></constructor-arg>
  <constructor-arg><ref bean="yetAnotherBean"/></constructor-arg>
  <constructor-arg type="int"><value>1</value></constructor-arg>
</bean>
于 2013-09-13T19:09:52.610 に答える