{"id":18783636,"url":"https://github.com/yildizmy/import-export-data-using-open-csv","last_synced_at":"2025-04-13T12:11:23.267Z","repository":{"id":44438738,"uuid":"512441301","full_name":"yildizmy/import-export-data-using-open-csv","owner":"yildizmy","description":"Spring Boot application for import/export data in csv format using OpenCSV","archived":false,"fork":false,"pushed_at":"2024-12-22T21:08:31.000Z","size":82,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T03:12:08.149Z","etag":null,"topics":["csv","java","opencsv","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-10T13:24:45.000Z","updated_at":"2024-12-22T21:08:35.000Z","dependencies_parsed_at":"2024-07-15T11:15:29.021Z","dependency_job_id":null,"html_url":"https://github.com/yildizmy/import-export-data-using-open-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-export-data-using-open-csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yildizmy%2Fimport-export-data-using-open-csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yildizmy%2Fimport-export-data-using-open-csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yildizmy%2Fimport-export-data-using-open-csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yildizmy","download_url":"https://codeload.github.com/yildizmy/import-export-data-using-open-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":["csv","java","opencsv","spring-boot","spring-data-jpa","spring-mvc"],"created_at":"2024-11-07T20:39:58.448Z","updated_at":"2025-04-13T12:11:23.235Z","avatar_url":"https://github.com/yildizmy.png","language":"Java","readme":"# Export Data as CSV using OpenCSV\nProject used for exporting data as csv file using OpenCSV.\n\n\n## Description\n\nEmployee list can be populated by using `employees_request.json` file and corresponding endpoint.\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* OpenCSV\n* H2 Database\n\n### Installing\n\n* Database connection url for DBeaver, etc.\n\n```\njdbc:h2:tcp://localhost:9092/mem: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* | [**create**](http://localhost:8080/api/v1/employees)          | **POST** /employees  | Create an employee\n*EmployeeController* | [**createFromFile**](http://localhost:8080/api/v1/employees/{fileName:.+}) | **POST** /employees/{fileName:.+} | Create employees from given JSON file\n*EmployeeController* | [**importFromCsv**](http://localhost:8080/api/v1/employees/import/{fileName:.+}) | **POST** /employees/import/{fileName:.+} | Import employees from given CSV file\n*EmployeeController* | [**exportToCsv**](http://localhost:8080/api/v1/employees/export/{fileName:.+})   | **GET** /employees/export/{fileName:.+} | Export employees to CSV 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* | [**deleteById**](http://localhost:8080/api/v1/employees/{id}) | **DELETE** /employees/{id} | Delete employee by id\n*EmployeeController* | [**deleteAll**](http://localhost:8080/api/v1/employees)       | **DELETE** /employees | Delete all employees\n\n\n## Documentation\n[Access a File from the Classpath in a Spring Application](https://www.baeldung.com/spring-classpath-file-access#3-using-resourceloader)\u003cbr/\u003e\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...","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyildizmy%2Fimport-export-data-using-open-csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyildizmy%2Fimport-export-data-using-open-csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyildizmy%2Fimport-export-data-using-open-csv/lists"}