标签: spring-batch-admin

如何获得Spring Batch Admin的稳定版本

这是我从他们的入门页面尝试过的...

  1. SpringSource社区下载指向未提及Spring Batch Admin的页面的链接.看起来原始链接已死或现在重定向到其他内容.

  2. 我获得了S3Browse App链接的连接超时

  3. 源构建过程失败,每次修复都会导致新的失败.从缺少的工件/存储库开始,现在看起来与Maven 3和Maven 2有关?

  4. maven构建过程似乎拉下了一个罐而不是战争

Google搜索下载链接,请不断回复此页面.我错过了什么?必须有一些公共可用的下载页面,其中包含prebuilts .war.

spring-batch spring-batch-admin

7
推荐指数
1
解决办法
4756
查看次数

Bean 属性不可读或具有无效的 getter 方法:getter 的返回类型是否与 setter 的参数类型匹配?春季批次

我正在开发Spring Batch CompositeItemReader & Writer示例。我开发了 XML 文件并且能够成功编译代码,但是在运行 mu 示例代码时出现以下错误。不确定出了什么问题?

org.springframework.beans.NotReadablePropertyException: Invalid property 'customerNumber' of bean class [java.lang.String]: Bean property 'customerNumber' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
    at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:619)
    at org.springframework.beans.AbstractNestablePropertyAccessor.getPropertyValue(AbstractNestablePropertyAccessor.java:610)
    at org.springframework.batch.item.file.transform.BeanWrapperFieldExtractor.extract(BeanWrapperFieldExtractor.java:57)
    at org.springframework.batch.item.file.transform.ExtractorLineAggregator.aggregate(ExtractorLineAggregator.java:54)
    at org.springframework.batch.item.file.FlatFileItemWriter.write(FlatFileItemWriter.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
    at com.sun.proxy.$Proxy4.write(Unknown …
Run Code Online (Sandbox Code Playgroud)

java spring-batch spring-batch-admin

6
推荐指数
1
解决办法
5万
查看次数

Java中用于高级作业调度的框架是什么?

在我的应用程序中,我需要定期运行后台任务(我可以使用Quartz轻松地完成该任务-即安排要在特定时间定期运行的给定作业)。

但我想多控制一点。特别是我需要:

  1. 让系统重新运行未按计划的时间运行的任务(即服务器已关闭,因此未运行该任务。在这种情况下,我希望“后代”任务尽快运行)
  2. 轻松控制任务会很好-即按需运行任务,或者查看给定任务的最后运行时间,或重新安排给定任务在不同时间运行

在我看来,以上几点可以通过Spring Batch Admin来实现,但是我在这方面还没有很多经验。另外,我已经看到很多关于Spring Batch不是调度工具的文章,所以我开始怀疑这里应该使用哪种合适的工具。

所以我的问题是:以上内容可以通过Spring Batch Admin实现吗?也许Quartz就足够了,但需要配置以完成上述操作?还是我都需要?或者是其他东西?

非常感谢:)彼得

java scheduling quartz-scheduler spring-batch-admin

5
推荐指数
1
解决办法
3346
查看次数

Spring-Batch:如何保证一个Job在运行时,不允许同时再次运行

如何保证一个Job在运行时,同时不允许再次运行?

我们有 BJ 需要 1 小时来处理提要和填充临时表。此 BJ 的第一步是清除临时表并开始填充主店面表中的数据。

考虑一个场景,当 BJ 启动时(第一次运行),如果我们再次启动 BJ,它将作为第一步的一部分从临时表中删除内容。

所以请建议我如何保持第二次执行直到第一次执行未完成?

spring-batch spring-batch-admin

5
推荐指数
1
解决办法
7926
查看次数

Spring批源目录[target/config]不存在

我有一个spring批处理应用程序,其属性文件batch-default.properties设置为

batch.job.configuration.file.dir =目标/配置

现在这个应用程序在我的本地机器上运行良好,即使我没有任何这样的目录,但是当我尝试在我的集成服务器上部署相同时,我收到错误:

Cannot resolve reference to bean 'org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean#0.source' while setting bean property 'source'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.SourcePollingChannelAdapterFactoryBean#0.source': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalArgumentException: Source directory [target/config] does not exist.
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:334)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1417)
Run Code Online (Sandbox Code Playgroud)

有没有人遇到过类似的问题?

这里有任何帮助.

-Vaibhav

configuration spring-batch spring-batch-admin

5
推荐指数
1
解决办法
2629
查看次数

如何使用spring Batch注释将Job参数输入到项目处理器中

我正在使用spring MVC.从我的控制器,我正在调用,jobLauncher并在jobLauncher我传递如下的工作参数,我正在使用注释来启用配置如下:

@Configuration
@EnableBatchProcessing
public class BatchConfiguration {
        // read, write ,process and invoke job
} 

JobParameters jobParameters = new JobParametersBuilder().addString("fileName", "xxxx.txt").toJobParameters();
stasrtjob = jobLauncher.run(job, jobParameters);                              

and here is my itemprocessor                                                         
public class DataItemProcessor implements ItemProcessor<InputData, OutPutData> {

  public OutPutData process(final InputData inputData) throws Exception {

        // i want to get job Parameters here ????

  }

}
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc spring-batch spring-batch-admin

5
推荐指数
2
解决办法
2万
查看次数

Spring Batch Admin,无法替换占位符'batch.business.schema.script'

尝试将Spring Batch Admin添加到现有的Spring Batch项目中.

我已经使用spring-batch-admin-resources和spring-batch-admin-manager更新了web.xml

我的设置:

src/main/resources /下

我添加了2个属性文件.1是batch-default-properties,它是一个空文件,另一个是batch-sqlserver.properties,其中包含以下内容:

batch.jdbc.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver    batch.jdbc.url=jdbc:sqlserver://xxx.xxx.xxx:1433;DatabaseName=SpringBatch
batch.jdbc.user=user
batch.jdbc.password=password
batch.jdbc.testWhileIdle=false
batch.jdbc.validationQuery=
batch.drop.script=/org/springframework/batch/core/schema-drop-sqlserver.sql
batch.schema.script=/org/springframework/batch/core/schema-sqlserver.sql
batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.SqlServerMaxValueIncrementer
batch.lob.handler.class=org.springframework.jdbc.support.lob.DefaultLobHandler
batch.business.schema.script=business-schema-sqlserver.sql
batch.database.incrementer.parent=columnIncrementerParent
batch.grid.size=2
batch.jdbc.pool.size=6
batch.verify.cursor.position=true
batch.isolationlevel=ISOLATION_SERIALIZABLE
batch.table.prefix=BATCH_
batch.data.source.init=false
Run Code Online (Sandbox Code Playgroud)

webapp/META-INF/spring/batch/override /下,我添加了带内容的data-source-context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

       <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
              <property name="jndiName">
                     <value>java:jboss/datasources/springBatchDB</value>
              </property>
       </bean>
</beans>
Run Code Online (Sandbox Code Playgroud)

这是在JBoss EAP 6.3中运行的.每次我启动服务器时,都会出现以下异常:

11:58:36,116 WARN  [org.springframework.web.context.support.XmlWebApplicationContext] (ServerService Thread Pool -- 112) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'org.springframework.jdbc.datasource.init.DataSourceInitializer#0' defined in null: Could …
Run Code Online (Sandbox Code Playgroud)

java spring spring-batch spring-batch-admin

5
推荐指数
1
解决办法
4519
查看次数

Spring Batch 管理管理器替代方案

Spring Batch Admin Manager 实现自 2015 年 1 月以来未更新。

是否需要使用其他东西来代替?或者我仍然应该使用 Spring Batch Admin Manager 为 Spring Batch 应用程序提供一些通用 UI?

spring-batch spring-batch-admin

5
推荐指数
1
解决办法
5145
查看次数

Spring 批处理表清除

清除 Spring Tables 的最佳方法是什么?

Spring 是否提供任何用于清除的APIS ?或者,我们是否需要对所有 Spring Batch 表执行删除语句?

spring-batch spring-batch-admin

5
推荐指数
1
解决办法
6777
查看次数

我可以在 Spring-Boot 2.2.2(最新)中使用 Spring Batch Admin 吗?

我正在处理 spring-batch 项目。我添加了如下所示的依赖项。

<dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <exclusions>
            <exclusion>
                <artifactId>snakeyaml</artifactId>
                <groupId>org.yaml</groupId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-to-slf4j</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-batch</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-configuration-processor</artifactId>
        <optional>true</optional>
    </dependency>

    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springframework.batch</groupId>
        <artifactId>spring-batch-test</artifactId>
        <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework.batch/spring-batch-admin-manager -->
    <dependency>
        <groupId>org.springframework.batch</groupId>
        <artifactId>spring-batch-admin-manager</artifactId>
        <version>1.3.1.RELEASE</version>
    </dependency>

    <!-- Spring Batch Integration -->
    <dependency>
        <groupId>org.springframework.batch</groupId>
        <artifactId>spring-batch-integration</artifactId> …
Run Code Online (Sandbox Code Playgroud)

spring spring-batch-admin spring-boot

5
推荐指数
0
解决办法
769
查看次数