Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring batch Spring批处理-如何自定义步骤退出消息描述长度?_Spring Batch - Fatal编程技术网

Spring batch Spring批处理-如何自定义步骤退出消息描述长度?

Spring batch Spring批处理-如何自定义步骤退出消息描述长度?,spring-batch,Spring Batch,是否存在任何环境变量或如何更改JobRepositoryFactoryBean.java中的maxVarCharLength之类的tablePrefix 我找不到调用此setter方法的任何配置类 public void setMaxVarCharLength(int maxVarCharLength) { this.maxVarCharLength = maxVarCharLength; } 您可以调用此方法来设置maxVarCharLength属性。然后,JobRepository

是否存在任何环境变量或如何更改
JobRepositoryFactoryBean.java
中的
maxVarCharLength
之类的
tablePrefix

我找不到调用此setter方法的任何配置类

public void setMaxVarCharLength(int maxVarCharLength) {
    this.maxVarCharLength = maxVarCharLength;
}

您可以调用此方法来设置
maxVarCharLength
属性。然后,
JobRepositoryFactoryBean
将使用您设置的值来创建
JobRepository
。您可以在这里找到一个示例:

通过实现
BatchConfigurer
接口创建自定义
JobRepository
对象的方法满足了我的要求。我们能通过环境变量实现吗?因为仅仅为了一个值,我不想再写几行代码,即使它自动连接了大部分细节。
JobRepositoryFactoryBean
的代码不从环境变量加载属性。您仍然可以使用Spring的环境抽象从环境变量中注入属性,并在工厂bean中进行设置。