spring-batch-admin

Can't Import properties after integrating spring-batch-admin into existed spring boot

邮差的信 提交于 2019-12-01 05:18:08
问题 I have worked on a project using spring-batch and spring-boot. I followed the exact rules how to integrate it by: 1. removing all @EnableBatchProcessing 2. adding ServletConfiguration and WebappConfiguration (and also import them using @Import({ ServletConfiguration.class, WebappConfiguration.class }) add props: batch-mysql.properties business-schema-mysql and modified application.properties with: server.servletPath=/* spring.freemarker.checkTemplateLocation=false ENVIRONMENT=mysql Now here

How to get Job parameteres in to item processor using spring Batch annotation

老子叫甜甜 提交于 2019-11-30 10:01:21
I am using spring MVC. From my controller, I am calling jobLauncher and in jobLauncher I am passing job parameters like below and I'm using annotations to enable configuration as below: @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

Is there a way to integrate spring-batch-admin and spring-boot properly?

瘦欲@ 提交于 2019-11-30 01:57:05
问题 According to the documentation spring batch admin is very easy to embed into the existing application. Simply copying web.xml and index.jsp then adding needed dependencies is enough getting it to work. But if I want to use it in an existing spring boot project it getting worse. According to this example the configuration is a bit hacky but it works. UNTIL I try to use @EnableBatchProcessing annotation in my configuriton bean. Then I get the following exception. Exception in thread "main" org

Spring Batch Admin + Spring Boot - Ambiguous mapping. Cannot map 'org.springframework.batch.admin.web.JobController#1' method

瘦欲@ 提交于 2019-11-29 18:14:56
I am trying to have Spring Batch Admin UI using spring-batch-admin-samples project. My job uses Spring Boot and I have changed my main application class to be deployable to Weblogic using this link . So application class looks like, @SpringBootApplication(exclude = { HypermediaAutoConfiguration.class, MultipartAutoConfiguration.class }) @EnableBatchAdmin public class MyApplication extends SpringBootServletInitializer implements WebApplicationInitializer { @Override protected SpringApplicationBuilder configure( SpringApplicationBuilder builder) { return configureApplication(builder); } public

Deploying two Spring batch applications in same cluster in a single Weblogic Domain?

笑着哭i 提交于 2019-11-29 16:21:19
BackGround - I am trying to deploy two spring batch applications as .war in same cluster in a single Weblogic Domain & each of them have spring batch admin console configured in servlet.xml like below - <?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-3.0.xsd"> <!-- Spring Batch Admin --> <import resource="classpath*:/org/springframework/batch/admin/web/resources/servlet

How to get Job parameteres in to item processor using spring Batch annotation

安稳与你 提交于 2019-11-29 15:09:43
问题 I am using spring MVC. From my controller, I am calling jobLauncher and in jobLauncher I am passing job parameters like below and I'm using annotations to enable configuration as below: @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

Spring Batch Admin + Spring Boot - Ambiguous mapping. Cannot map 'org.springframework.batch.admin.web.JobController#1' method

心不动则不痛 提交于 2019-11-28 12:22:55
问题 I am trying to have Spring Batch Admin UI using spring-batch-admin-samples project. My job uses Spring Boot and I have changed my main application class to be deployable to Weblogic using this link. So application class looks like, @SpringBootApplication(exclude = { HypermediaAutoConfiguration.class, MultipartAutoConfiguration.class }) @EnableBatchAdmin public class MyApplication extends SpringBootServletInitializer implements WebApplicationInitializer { @Override protected

Deploying two Spring batch applications in same cluster in a single Weblogic Domain?

旧时模样 提交于 2019-11-28 11:04:20
问题 BackGround - I am trying to deploy two spring batch applications as .war in same cluster in a single Weblogic Domain & each of them have spring batch admin console configured in servlet.xml like below - <?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-3.0.xsd"> <!--

Best approach using Spring batch to process big file

北战南征 提交于 2019-11-28 06:33:09
问题 I am using Spring batch to download a big file in order to process it. the scenario is pretty simple: 1. Download the file via http 2. process it(validations,transformations) 3. send it into queue no need to save the input file data. we might have multiple job instances(of the same scenario) running in the same time I am looking for best practice to handle this situation. Should I create Tasklet to download the file locally and than start processing it via regular steps? in that case I need

Integrating Spring Batch Admin into an existing application

亡梦爱人 提交于 2019-11-28 04:35:46
I have an application which uses Spring Batch and Spring MVC. I am able to deploy Spring Batch Admin as a separate war and use it against the same DB my application uses, though I would like to integrate it into my own application, possibly modify some of the views as well. Is there an easy way to do this or do I have to fork it and go from there? There is an easy way apparently according to this thread ; Define a DispatcherServlet for Batch Admin in web.xml : <servlet> <servlet-name>Batch Servlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>