Spring Batch Read File, Consume REST, Schedule Job | Spring Boot 3, Spring Batch, Scheduler

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ก.ค. 2024
  • In this video, we implement Spring Batch functionality using different approaches.
    The first approach is using Spring Batch Chunk to read CSV files, process data and store it in DB.
    Then, we set the reader to consume REST API, process data, and store it in DB.
    After that, we configure the Tasklet job.
    Finally, we configure the Scheduler to run Spring Batch Job at some period.
    The source code is here: github.com/caligula95/spring-...
    00:00 - Intro
    00:32 - Spring Boot Project Generation
    02:22 - Entity, Repository
    04:11 - Read File Batch Job
    26:20 - Read REST API Batch Job
    35:33 - Schedule Spring Batch Job Execution
    41:45 - Spring Batch Tasklet

ความคิดเห็น • 11

  • @afraaalobaid3455
    @afraaalobaid3455 8 หลายเดือนก่อน +1

    You are a legend. Thank you so much

  • @michelantonybarrosbarrios6404
    @michelantonybarrosbarrios6404 3 หลายเดือนก่อน

    Excellet tutorial, pretty useful.

  • @tunisiasparx2105
    @tunisiasparx2105 21 วันที่ผ่านมา

    awsome

  • @user-iu6yz6ck6h
    @user-iu6yz6ck6h 10 หลายเดือนก่อน

    👍👍👍👍👍👍👍👍👍

  • @ainigma100
    @ainigma100 4 หลายเดือนก่อน

    Thank you very much for the video! Can we use a second step or a second processor to send an email?
    Assume the following scenario, step 1 will read data from csv, process the data and then write the data into the database. Then, step 2 will prepare and send emails containing a body which describes how many records were processed by step 1, when they were processed, how many were successfully inserted into the database and how many failed to be inserted into the database. Maybe some record of the cvs failed to pass our business logic and as a result they were not inserted into the database. Therefore, we should know how many records failed, which were the records that failed and why they failed.
    How could we implement the above requirement? Using two steps of using two processors?
    Thank you in advance!

  • @juancarlosrivera2874
    @juancarlosrivera2874 2 หลายเดือนก่อน

    great tutorial, what about if i need to read data from oracle database and then this data returned has to be processed by a mysql stored procedure and write the result in a mysql table, how can i achieve this ? it is possible? thank you for share your knowledge

  • @fatimaezzahramorchid7918
    @fatimaezzahramorchid7918 4 หลายเดือนก่อน +1

    can we use spring batch with a no sql database like firestore to write the data?

  • @ashwanipandey9752
    @ashwanipandey9752 10 หลายเดือนก่อน

    @Bean
    public Job bookReaderJob(JobRepository jobRepository, PlatformTransactionManager transactionManager) {
    return new JobBuilder("bookReadJob", jobRepository)
    .incrementer(new RunIdIncrementer())
    .start(taskletStep(jobRepository, transactionManager))
    .build();
    }
    from where its picking jobRepository? as i am getting nullpointer exception for that.

    • @Javamaster-tutorials
      @Javamaster-tutorials  10 หลายเดือนก่อน

      From Spring Context. Make sure you're using the latest version of Spring Boot

    • @ganeshbabu8263
      @ganeshbabu8263 8 หลายเดือนก่อน

      🙋‍♂️ me too