{"id":21678350,"url":"https://github.com/ifyun/data-generator","last_synced_at":"2026-04-10T06:44:46.985Z","repository":{"id":115961949,"uuid":"362359382","full_name":"ifyun/data-generator","owner":"ifyun","description":"Fake data generator for database","archived":false,"fork":false,"pushed_at":"2021-04-28T06:23:25.000Z","size":56,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-25T10:28:13.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ifyun.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}},"created_at":"2021-04-28T06:19:07.000Z","updated_at":"2021-05-27T13:31:32.000Z","dependencies_parsed_at":"2023-08-28T02:06:45.511Z","dependency_job_id":"e0c95b2a-8c87-4ceb-b5f3-92b011605940","html_url":"https://github.com/ifyun/data-generator","commit_stats":null,"previous_names":["ifyun/data-generator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifyun%2Fdata-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifyun%2Fdata-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifyun%2Fdata-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ifyun%2Fdata-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ifyun","download_url":"https://codeload.github.com/ifyun/data-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244591480,"owners_count":20477707,"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":[],"created_at":"2024-11-25T14:28:17.404Z","updated_at":"2025-12-30T20:55:55.403Z","avatar_url":"https://github.com/ifyun.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Generator\n\n数据库随机数据生成工具\n\n- 使用 [java-faker](https://github.com/DiUS/java-faker) 生成假数据\n\n## 使用\n\n创建 application.yml 文件，配置数据库和数据类型：\n\n```yaml\nspring:\n  datasource:\n    driver-class-name: com.mysql.cj.jdbc.Driver     # 指定数据库驱动\n    url: \"jdbc:mysql://localhost:3306/test\"         # 根据数据库类型设置 URL\n    username: root\n    password: root\ngenerator:\n  locale: zh_CN                              # 指定国家\n  tables:\n    - table: table1                          # 表名\n      count: 5                               # 生成多少行\n      columns:\n        first_name: Name.firstName           # 指定列数据类型\n        last_name: Name.lastName\n        job: Job.title\n        phone_number: PhoneNumber.cellPhone\n        address: Address.streetAddress\n    - table: table2\n      count: 10\n      columes:\n        ...\n```\n\n程序内置以下数据库驱动：\n\n| Database   | Driver class name                              |\n|------------|------------------------------------------------|\n| SQLite     | `org.sqlite.JDBC`                              |\n| MySQL      | `com.mysql.cj.jdbc.Driver`                     |\n| MariaDB    | `org.mariadb.jdbc.Driver`                      |\n| Oracle     | `oracle.jdbc.driver.OracleDriver`              |\n| SQL Server | `com.microsoft.sqlserver.jdbc.SQLServerDriver` |\n\n列类型的格式为：`类型.具体类型`\n\n- `类型` 对应 java-faker 中的类\n- `具体类型` 对应 java-faker 类中的方法\n\n具体有哪些类型可以参考：[JavaDoc](http://dius.github.io/java-faker/apidocs/index.html)\n\n### 运行\n\n配置好 application.yml 并放在 jar 文件同级目录，使用 `java -jar` 命令运行，或者双击 jar 文件运行。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifyun%2Fdata-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fifyun%2Fdata-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fifyun%2Fdata-generator/lists"}