{"id":18783641,"url":"https://github.com/yildizmy/import-data-using-apache-commons-csv","last_synced_at":"2026-02-17T08:36:13.191Z","repository":{"id":44441659,"uuid":"512464525","full_name":"yildizmy/import-data-using-apache-commons-csv","owner":"yildizmy","description":"Spring Boot application for importing csv file into MySQL db using Apache Commons CSV","archived":false,"fork":false,"pushed_at":"2024-12-22T21:07:39.000Z","size":70,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T03:12:08.271Z","etag":null,"topics":["apache-commons-csv","csv","java","mysql","spring-boot","spring-data-jpa","spring-mvc"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yildizmy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-07-10T15:03:36.000Z","updated_at":"2024-12-22T21:07:42.000Z","dependencies_parsed_at":"2024-07-15T11:12:33.127Z","dependency_job_id":null,"html_url":"https://github.com/yildizmy/import-data-using-apache-commons-csv","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yildizmy%2Fimport-data-using-apache-commons-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yildizmy%2Fimport-data-using-apache-commons-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yildizmy%2Fimport-data-using-apache-commons-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yildizmy%2Fimport-data-using-apache-commons-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yildizmy","download_url":"https://codeload.github.com/yildizmy/import-data-using-apache-commons-csv/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248710445,"owners_count":21149190,"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":["apache-commons-csv","csv","java","mysql","spring-boot","spring-data-jpa","spring-mvc"],"created_at":"2024-11-07T20:39:58.610Z","updated_at":"2026-02-17T08:36:08.079Z","avatar_url":"https://github.com/yildizmy.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Import data into MySQL using Apache Commons CSV\nProject used for importing csv file into MySQL database using Apache Commons CSV.\n\n\n## Description\n\nSpring Boot provides some properties with which we can add the exception message, exception class, or even a stack trace as part of the response payload:\n\n```\nserver.error.include-message=always\nserver.error.include-binding-errors=always\nserver.error.include-stacktrace=on_param\nserver.error.include-exception=false\n```\n\nUsing these Spring Boot server properties in our `application.properties` we can alter the error response to some extent.\n\nNote that we’ve set the property `include-stacktracee` to `on_trace_param` which means that only if we include the trace param in the URL (`?trace=true`), we’ll get a stack trace in the response payload:\n\nWe might want to keep the value of `include-stacktrace` flag to `never`, at least in production, as it might reveal the internal workings of our application.\n\n\n## Getting Started\n\n### Dependencies\n\n* Spring Web\n* Spring Boot\n* Spring Data JPA\n* Apache Commons CSV\n* MySQL Database\n\n### Installing\n\n* Run the following command in the project root for creating MySQL database in Docker\n\n```\ndocker-compose up -d\n```\n\u003cbr/\u003e\n\nTo set container name as mysql instead of the folder name where `docker-compose.yml` file is located, use the following command:\n\n```\ndocker-compose -f docker-compose.yml -p \"mysql\" up\n```\n\u003cbr/\u003e\n\n* Database connection url:\n\n```\njdbc:mysql://localhost:3306/employee-db\n```\n\n### API Endpoints\n\nAll URIs are relative to *http://localhost:8080/api/v1*\n\nClass | Method                                                    | HTTP request         | Description\n------------ |-----------------------------------------------------------|----------------------| -------------\n*EmployeeController* | [**importFile**](http://localhost:8080/api/v1/employees/import) | **POST** /employees/import | Import list of employees file\n*EmployeeController* | [**findByEmail**](http://localhost:8080/api/v1/employees/{email})       | **GET** /employees/{email}    | Get employee by email\n*EmployeeController* | [**findAll**](http://localhost:8080/api/v1/employees)                   | **GET** /employees            | Get all employees\n*EmployeeController* | [**deleteAll**](http://localhost:8080/api/v1/employees)                 | **DELETE** /employees   | Delete all employees\n\n\n## Documentation\n[Apache Commons CSV User Guide](https://commons.apache.org/proper/commons-csv/user-guide.html#Using_an_enum_to_define_a_header)\u003cbr/\u003e\n[Hibernate ORM 5.6.10.Final User Guide](https://docs.jboss.org/hibernate/orm/5.6/userguide/html_single/Hibernate_User_Guide.html#naturalid)\u003cbr/\u003e\n[Hibernate Natural Ids with @NaturalId](https://howtodoinjava.com/hibernate/hibernate-naturalid-example-tutorial/)\u003cbr/\u003e\n[The best way to map a @NaturalId business key with JPA and Hibernate](https://vladmihalcea.com/the-best-way-to-map-a-naturalid-business-key-with-jpa-and-hibernate/)\u003cbr/\u003e\n[How to Use Hibernate Natural IDs in Spring Boot](https://dzone.com/articles/how-to-use-hibernate-natural-ids-in-spring-boot)\n\n\n## Authors\nMurat Yıldız\n\n\n## Version History\n\n* 0.2\n    * Various bug fixes and optimizations\n    * See [commit change]() or See [release history]()\n* 0.1\n    * Initial Release\n\n\n## License\n\n...\n\n\n## Acknowledgements\n...","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyildizmy%2Fimport-data-using-apache-commons-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyildizmy%2Fimport-data-using-apache-commons-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyildizmy%2Fimport-data-using-apache-commons-csv/lists"}