{"id":24673945,"url":"https://github.com/dohabanoui/batch-processing-springbatch","last_synced_at":"2025-03-21T15:48:26.810Z","repository":{"id":269359162,"uuid":"907162663","full_name":"dohabanoui/batch-processing-SpringBatch","owner":"dohabanoui","description":"L'objectif est de créer un job Spring Batch qui traite des commandes à partir d'un fichier CSV. ","archived":false,"fork":false,"pushed_at":"2025-01-14T13:57:42.000Z","size":394,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-26T11:14:25.881Z","etag":null,"topics":["batch-job","batch-processing","spring-batch"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dohabanoui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-23T01:14:52.000Z","updated_at":"2025-01-14T13:57:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca0ec442-2e63-47aa-8527-ba2035cda792","html_url":"https://github.com/dohabanoui/batch-processing-SpringBatch","commit_stats":null,"previous_names":["dohabanoui/batch-processing-springbatch"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohabanoui%2Fbatch-processing-SpringBatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohabanoui%2Fbatch-processing-SpringBatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohabanoui%2Fbatch-processing-SpringBatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dohabanoui%2Fbatch-processing-SpringBatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dohabanoui","download_url":"https://codeload.github.com/dohabanoui/batch-processing-SpringBatch/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244825342,"owners_count":20516589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batch-job","batch-processing","spring-batch"],"created_at":"2025-01-26T11:14:27.726Z","updated_at":"2025-03-21T15:48:26.789Z","avatar_url":"https://github.com/dohabanoui.png","language":"Java","readme":"# Spring Batch Project: Traitement des Commandes\n\n## Description\n\nCe projet a pour objectif de créer un job **Spring Batch** qui traite une liste de commandes provenant d'un fichier **CSV**. Chaque commande contient un identifiant, un nom de client et un montant. Le job applique une remise sur le montant des commandes et enregistre les données mises à jour dans une base de données.\n\n### Fonctionnalités principales :\n- Lecture des données à partir d'un fichier CSV.\n- Application d'une remise sur le montant de chaque commande.\n- Sauvegarde des commandes mises à jour dans une base de données relationnelle.\n- Gestion du traitement à l'aide de Spring Batch (steps et jobs).\n\n\n## Structure du projet\n\n- **BatchConfiguration.java** : Configure les étapes et le job Spring Batch.\n- **OrderItemProcessor.java** : Contient la logique pour appliquer une remise sur les montants des commandes.\n- **JobCompletionListener.java** : Écoute les événements de fin de job pour afficher les résultats.\n- **Order.java** : Représente une commande (record immuable).\n- **orders.csv** : Fichier d'entrée contenant les commandes à traiter.\n\nExemple de fichier CSV (`orders.csv`):\n\n```csv\norderId,customerName,amount\n1,John Doe,100.0\n2,Jane Smith,200.0\n3,Michael Brown,300.0\n4,Emily Davis,400.0\n```\n\n**Execution du job**\nLorsque vous lancez le job, il lira le fichier CSV, appliquera une remise sur le montant des commandes, puis enregistrera les commandes mises à jour dans la base de données.\n\nVoici un aperçu de l'exécution du job avec les logs de traitement des commandes :\n![Résultat de l'exécution](pictures/result1.png)\n![Résultat de l'exécution](pictures/result2.png)\n\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohabanoui%2Fbatch-processing-springbatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdohabanoui%2Fbatch-processing-springbatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdohabanoui%2Fbatch-processing-springbatch/lists"}