SpringBatch中StepScope作用
2021-08-16 11:47:04 7 举报
AI智能生成
SpringBatch中StepScope作用
作者其他创作
大纲/内容
stepScope
@Scope(value = "step", proxyMode = ScopedProxyMode.TARGET_CLASS)
INTERFACES
jdk动态代理
TARGET_CLASS
cglib动态代理
DEFAULT和NO一样
使用相关
优秀博文(案例)
No context holder available for step scope
StepContext stepContext = StepSynchronizationManager.register(stepExecution);
StepScope#getContext()
AbstractBeanFactory#doGetBean
mbd.isSingleton()
mbd.isPrototype()
mbd.getScope()
如何获取->StepScope#get(String, ObjectFactory)
如何写入->BatchScopeSupport#postProcessBeanFactory
BeanFactoryPostProcessor
BeanPostProcessor
如何注册->ScopeConfiguration#stepScope()
AbstractBatchConfiguration
@EnableBatchProcessing#BatchConfigurationSelector
AbstractBeanFactory是bean工厂最核心的实现所有bean相关都在此
scope
request
session
global
singleton
prototype
自定义(step)
SpEL
step支持的
#{jobParameters[xy]}
#{jobExecutionContext[xy]}
#{stepExecutionContext[xy]}
SpEL 字面量
#{8}
#{1e4}
#{true}
SpEL引用bean
#{car}
#{car.brand}
#{car.toString()}
#{T(java.lang.Math).PI}
系统属性
systemProperties
systemEnvironment
#{systemEnvironment['HOME']}
运算符号
算术运算符
比较运算符
逻辑运算符
if-else 运算符
正则表达式
0 条评论
下一页
为你推荐
查看更多