这是我从他们的入门页面尝试过的...
SpringSource社区下载指向未提及Spring Batch Admin的页面的链接.看起来原始链接已死或现在重定向到其他内容.
我获得了S3Browse App链接的连接超时
源构建过程失败,每次修复都会导致新的失败.从缺少的工件/存储库开始,现在看起来与Maven 3和Maven 2有关?
maven构建过程似乎拉下了一个罐而不是战争
Google搜索下载链接,请不断回复此页面.我错过了什么?必须有一些公共可用的下载页面,其中包含prebuilts .war.
我正在开发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) 在我的应用程序中,我需要定期运行后台任务(我可以使用Quartz轻松地完成该任务-即安排要在特定时间定期运行的给定作业)。
但我想多控制一点。特别是我需要:
在我看来,以上几点可以通过Spring Batch Admin来实现,但是我在这方面还没有很多经验。另外,我已经看到很多关于Spring Batch不是调度工具的文章,所以我开始怀疑这里应该使用哪种合适的工具。
所以我的问题是:以上内容可以通过Spring Batch Admin实现吗?也许Quartz就足够了,但需要配置以完成上述操作?还是我都需要?或者是其他东西?
非常感谢:)彼得
如何保证一个Job在运行时,同时不允许再次运行?
我们有 BJ 需要 1 小时来处理提要和填充临时表。此 BJ 的第一步是清除临时表并开始填充主店面表中的数据。
考虑一个场景,当 BJ 启动时(第一次运行),如果我们再次启动 BJ,它将作为第一步的一部分从临时表中删除内容。
所以请建议我如何保持第二次执行直到第一次执行未完成?
我有一个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
我正在使用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) 尝试将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) Spring Batch Admin Manager 实现自 2015 年 1 月以来未更新。
是否需要使用其他东西来代替?或者我仍然应该使用 Spring Batch Admin Manager 为 Spring Batch 应用程序提供一些通用 UI?
清除 Spring Tables 的最佳方法是什么?
Spring 是否提供任何用于清除的APIS ?或者,我们是否需要对所有 Spring Batch 表执行删除语句?
我正在处理 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)