spring-batch-admin

How to Override Spring-boot application.properties programmatically

百般思念 提交于 2019-11-28 03:56:18
I have jdbc property files which I take from external configuration web-service In spring boot in order to set mysql props it's easy as adding those to application.properties: spring.datasource.url=jdbc:mysql://localhost/mydb spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.jdbc.Driver How could I override those programticlly in my app? same goes for Spring-batch props: database.driver=com.mysql.jdbc.Driver database.url=jdbc:mysql://localhost/mydv database.username=root database.password=root Lukas Hinsch You can add additional

How to skip blank lines in CSV using FlatFileItemReader and chunks

落爺英雄遲暮 提交于 2019-11-28 00:15:39
问题 I am processing CSV files using FlatFileItemReader. Sometimes I am getting blank lines within the input file. When that happened the whole step stops. I want to skipped those lines and proceed normal. I tried to add exception handler to the step in order to catch the execption instead of having the whole step stooped: @Bean public Step processSnidUploadedFileStep() { return stepBuilderFactory.get("processSnidFileStep") .<MyDTO, MyDTO>chunk(numOfProcessingChunksPerFile) .reader(snidFileReader

Integrating Spring Batch Admin into an existing application

别说谁变了你拦得住时间么 提交于 2019-11-27 00:32:07
问题 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? 回答1: There is an easy way apparently according to this thread; Define a DispatcherServlet for Batch Admin in web.xml : <servlet> <servlet-name

How to Override Spring-boot application.properties programmatically

倖福魔咒の 提交于 2019-11-27 00:14:58
问题 I have jdbc property files which I take from external configuration web-service In spring boot in order to set mysql props it's easy as adding those to application.properties: spring.datasource.url=jdbc:mysql://localhost/mydb spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=com.mysql.jdbc.Driver How could I override those programticlly in my app? same goes for Spring-batch props: database.driver=com.mysql.jdbc.Driver database.url=jdbc:mysql:/