spring-batch

Spring Batch RabbitMQ issue

六眼飞鱼酱① 提交于 2021-01-18 07:11:27
问题 I am looking to integrate the Spring Batch with RabbitMQ. I've developed code like below but no data is passing over the channel. What's wrong in the code ? CustomerMessageChannel.java public interface CustomerMessageChannel { @Output("customerMessageChannel") MessageChannel customerMessageChannel(); } Customer.java @AllArgsConstructor @NoArgsConstructor @Builder @Data @JsonIgnoreProperties(ignoreUnknown = true) public class Customer implements Serializable { private static final long

Spring Batch RabbitMQ issue

夙愿已清 提交于 2021-01-18 07:10:58
问题 I am looking to integrate the Spring Batch with RabbitMQ. I've developed code like below but no data is passing over the channel. What's wrong in the code ? CustomerMessageChannel.java public interface CustomerMessageChannel { @Output("customerMessageChannel") MessageChannel customerMessageChannel(); } Customer.java @AllArgsConstructor @NoArgsConstructor @Builder @Data @JsonIgnoreProperties(ignoreUnknown = true) public class Customer implements Serializable { private static final long

Spring Batch with SimpleAsyncTaskExecutor is not saving to DB

北慕城南 提交于 2021-01-07 04:13:16
问题 I have a simple Spring Boot application with an enpoint that invokes a Spring Batch Job asynchronously through the SimpleAsyncTaskExecutor configured in the JobLauncher bean. The Spring Batch Job starts asynchronously and works fine, but nothing is saved to the database. If I remove the SimpleAsyncTaskExecutor the data is saved. This is my BatchConfigurer. Heere I configure the JobLauncher with a SimpleAsyncTaskExecutor . If I remove the line simpleJobLauncher.setTaskExecutor(new

Spring Batch with SimpleAsyncTaskExecutor is not saving to DB

放肆的年华 提交于 2021-01-07 04:12:33
问题 I have a simple Spring Boot application with an enpoint that invokes a Spring Batch Job asynchronously through the SimpleAsyncTaskExecutor configured in the JobLauncher bean. The Spring Batch Job starts asynchronously and works fine, but nothing is saved to the database. If I remove the SimpleAsyncTaskExecutor the data is saved. This is my BatchConfigurer. Heere I configure the JobLauncher with a SimpleAsyncTaskExecutor . If I remove the line simpleJobLauncher.setTaskExecutor(new

Spring Batch with SimpleAsyncTaskExecutor is not saving to DB

混江龙づ霸主 提交于 2021-01-07 04:09:54
问题 I have a simple Spring Boot application with an enpoint that invokes a Spring Batch Job asynchronously through the SimpleAsyncTaskExecutor configured in the JobLauncher bean. The Spring Batch Job starts asynchronously and works fine, but nothing is saved to the database. If I remove the SimpleAsyncTaskExecutor the data is saved. This is my BatchConfigurer. Heere I configure the JobLauncher with a SimpleAsyncTaskExecutor . If I remove the line simpleJobLauncher.setTaskExecutor(new

Spring Batch with SimpleAsyncTaskExecutor is not saving to DB

匆匆过客 提交于 2021-01-07 04:09:43
问题 I have a simple Spring Boot application with an enpoint that invokes a Spring Batch Job asynchronously through the SimpleAsyncTaskExecutor configured in the JobLauncher bean. The Spring Batch Job starts asynchronously and works fine, but nothing is saved to the database. If I remove the SimpleAsyncTaskExecutor the data is saved. This is my BatchConfigurer. Heere I configure the JobLauncher with a SimpleAsyncTaskExecutor . If I remove the line simpleJobLauncher.setTaskExecutor(new

Spring Batch with SimpleAsyncTaskExecutor is not saving to DB

让人想犯罪 __ 提交于 2021-01-07 04:09:23
问题 I have a simple Spring Boot application with an enpoint that invokes a Spring Batch Job asynchronously through the SimpleAsyncTaskExecutor configured in the JobLauncher bean. The Spring Batch Job starts asynchronously and works fine, but nothing is saved to the database. If I remove the SimpleAsyncTaskExecutor the data is saved. This is my BatchConfigurer. Heere I configure the JobLauncher with a SimpleAsyncTaskExecutor . If I remove the line simpleJobLauncher.setTaskExecutor(new

Spring Batch: Working with several entities and merge them

…衆ロ難τιáo~ 提交于 2021-01-07 02:45:24
问题 I need to denormalize data stored into a relational database. There are too much tables linked between each others, and it's not possible to build a single query to get every data. Here a simplified situation: +-------------+ +-------------+ | | 1 N | | | Unitat +-----------> Authors | | | | | +-------------+ +-------------+ Up to now I've build an step that is getting all Unitat rows: @Bean public ItemReader<Unitat> reader() { String sql = "select * from unitat"; JdbcCursorItemReader<Unitat>

Spring Batch: Working with several entities and merge them

╄→гoц情女王★ 提交于 2021-01-07 02:44:20
问题 I need to denormalize data stored into a relational database. There are too much tables linked between each others, and it's not possible to build a single query to get every data. Here a simplified situation: +-------------+ +-------------+ | | 1 N | | | Unitat +-----------> Authors | | | | | +-------------+ +-------------+ Up to now I've build an step that is getting all Unitat rows: @Bean public ItemReader<Unitat> reader() { String sql = "select * from unitat"; JdbcCursorItemReader<Unitat>

java split large files into smaller files while splitting the multiline record without breaking the record in incomplete state

青春壹個敷衍的年華 提交于 2021-01-05 07:18:26
问题 I have a record split into multiple lines in a file. Only way to identify the end of the record is when new record starts with ABC. Below is the sample. File size could be 5-10 GB and I am looking for a efficient java logic ONLY to split the files(no need of reading every line), but splitting logic should a check to start a new file with new record, which should start with "ABC" in this case. Added few more details, I am just looking for splitting the file and while splitting the last record