クラス StepScope
java.lang.ObjectSE
org.springframework.batch.core.scope.BatchScopeSupport
org.springframework.batch.core.scope.StepScope
- 実装されたすべてのインターフェース:
org.springframework.beans.factory.config.BeanFactoryPostProcessor
、org.springframework.beans.factory.config.Scope
、org.springframework.core.Ordered
ステップコンテキストのスコープ。このスコープ内のオブジェクトは、Spring コンテナーをオブジェクトファクトリとして使用するため、実行ステップごとにそのような Bean のインスタンスは 1 つだけです。このスコープ内のすべてのオブジェクトは <aop:scoped-proxy/> です(Bean 定義を装飾する必要はありません)。
さらに、#{..} プレースホルダーを使用して
さらに、#{..} プレースホルダーを使用して
StepContext
からアクセス可能な参照の遅延バインディングのサポートが提供されます。この機能を使用すると、Bean プロパティをステップまたはジョブ実行コンテキストおよびジョブパラメーターから取得できます。たとえば <bean id="..." class="..." scope="step"> <property name="parent" ref="#{stepExecutionContext[helper]}" /> </bean> <bean id="..." class="..." scope="step"> <property name="name" value="#{stepExecutionContext['input.name']}" /> </bean> <bean id="..." class="..." scope="step"> <property name="name" value="#{jobParameters[input]}" /> </bean> <bean id="..." class="..." scope="step"> <property name="name" value="#{jobExecutionContext['input.stem']}.txt" /> </bean>
StepContext
は、標準の Bean プロパティパスを使用して参照されます(BeanWrapper
に従って)。上記の例はすべて、ステップ属性とジョブ属性の便宜上提供されているマップアクセサーの使用箇所を示しています。- 導入:
- 2.0
- 作成者:
- Dave Syer, Michael Minella, Mahmoud Ben Hassine
ネストされたクラスのサマリー
クラス org.springframework.batch.core.scope.BatchScopeSupport から継承されたネストクラス / インターフェース
BatchScopeSupport.Scopifier
フィールドのサマリー
フィールドインターフェース org.springframework.core.Ordered から継承されたフィールド
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
registerDestructionCallback
(StringSE name, RunnableSE callback) これは、ステップスコープの Bean の式を解決するために使用されます。クラス org.springframework.batch.core.scope.BatchScopeSupport から継承されたメソッド
createScopedProxy, getName, getOrder, postProcessBeanFactory, setAutoProxy, setName, setOrder, setProxyTargetClass
フィールドの詳細
ID_KEY
クライアントが会話識別子に使用するコンテキストキー。- 関連事項:
コンストラクターの詳細
StepScope
public StepScope()
メソッドの詳細
resolveContextualObject
これは、ステップスコープの Bean の式を解決するために使用されます。get
public ObjectSE get(StringSE name, org.springframework.beans.factory.ObjectFactory<?> objectFactory) - 関連事項:
Scope.get(String, ObjectFactory)
getConversationId
- 関連事項:
Scope.getConversationId()
registerDestructionCallback
- 関連事項:
Scope.registerDestructionCallback(String, Runnable)
remove
- 関連事項:
Scope.remove(String)
getTargetNamePrefix
- 次で指定:
- クラス
BatchScopeSupport
のgetTargetNamePrefix