Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在作业执行期间在运行配置中传递属性。如何通过 JSR 中的作业上下文获取处理器中的作业属性。有没有其他方法可以在处理器中获取属性?
如果您的作业与 Spring Batch 相关,那么您可以使用 JobContext 中的 getJobParameters() 和 getSystemProperties() 方法获取作业参数以及系统属性。以下是 Spring Batch Job Context API Doc 的参考
http://docs.spring.io/spring-batch/apidocs/org/springframework/batch/core/scope/context/JobContext.html