{"id":13515262,"url":"https://github.com/onlyeat3/fastmapper","last_synced_at":"2026-02-13T19:18:34.406Z","repository":{"id":57734370,"uuid":"295640046","full_name":"onlyeat3/fastmapper","owner":"onlyeat3","description":"超快的对象和属性映射工具.Blazing fast object and attribute mapping tool","archived":false,"fork":false,"pushed_at":"2023-12-05T22:29:19.000Z","size":40,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-18T12:50:56.750Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/onlyeat3.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":"2020-09-15T06:49:58.000Z","updated_at":"2020-09-18T00:50:52.000Z","dependencies_parsed_at":"2024-11-01T19:41:34.387Z","dependency_job_id":null,"html_url":"https://github.com/onlyeat3/fastmapper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/onlyeat3/fastmapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyeat3%2Ffastmapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyeat3%2Ffastmapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyeat3%2Ffastmapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyeat3%2Ffastmapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onlyeat3","download_url":"https://codeload.github.com/onlyeat3/fastmapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onlyeat3%2Ffastmapper/sbom","scorecard":{"id":707513,"data":{"date":"2025-08-11","repo":{"name":"github.com/onlyeat3/fastmapper","commit":"011b50fadef8d3a639a02346935897a45c10c106"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/1 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T07:07:06.980Z","repository_id":57734370,"created_at":"2025-08-22T07:07:06.980Z","updated_at":"2025-08-22T07:07:06.980Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29414891,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-08-01T05:01:08.557Z","updated_at":"2026-02-13T19:18:34.389Z","avatar_url":"https://github.com/onlyeat3.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# fastmapper\n对象映射工具\n## 特性\n- [x] Java 8+\n- [x] 自定义类型转换方式\n- [x] 支持多层级对象拷贝(实验特性)\n- [x] 泛型支持\n## 使用说明\n添加依赖到pom.xml\n```xml\n\u003cdependency\u003e\n  \u003cgroupId\u003eio.github.onlyeat3\u003c/groupId\u003e\n  \u003cartifactId\u003efastmapper\u003c/artifactId\u003e\n  \u003cversion\u003e0.0.1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n```java\n//bean to map\nMap\u003cString, Object\u003e map = FastMapper.map(foo, new ClassReference\u003cMap\u003cString, Object\u003e\u003e() {});\n```\n\n```java\n//map to bean\nFoo foo = FastMapper.map(map, Foo.class);\n```\n```java\n//bean to bean\nBar bar = FastMapper.map(foo, Bar.class);\n```\n```java\n//属性拷贝(忽略空的属性)\nFastMapper.populate(foo,bar);\n```\n\n```java\n//类方式写一个自定义TypeMapper（推荐）\n@Order(5)//指定优先级，数字越小越靠前，但非预置转换器的优先级不会超过预置的\npublic class BigIntegerToLongTypeMapper implements TypeMapper\u003cBigInteger, Long\u003e {\n    @Override\n    public boolean match(MappingInfo\u003cBigInteger, Long\u003e mappingInfo) {\n        return mappingInfo.getSourceType().getRawClass().equals(BigInteger.class) \u0026\u0026 mappingInfo.getTargetType().getRawClass().equals(Long.class);\n    }\n\n    @Override\n    public Long map(MappingInfo\u003cBigInteger, Long\u003e mappingInfo) {\n        return mappingInfo.getSource().longValue();\n    }\n}\nFastMapper.registerTypeMapper(new BigIntegerToLongTypeMapper())\n//lambda方式写自定义TypeMapper,从SomeEnum转换到Long，这样写会另外注册一个从Long到SomeEnum的TypeMapper\nFastMapper.registerTypeMapper(SomeEnum.class, Long.class, someEnum-\u003e someEnum.getValue().longValue(), aLong -\u003e SomeEnum.valueOf(aLong.intValue()))\n```\n\n```java\n//to list\nList\u003cBar\u003e list = FastMapper.map(fooList, new TypeReference\u003cList\u003cBar\u003e\u003e() {});\n```\n\n```java\n//泛型\nList\u003cBar\u003e list = FastMapper.map(fooList, new TypeReference\u003cList\u003cBar\u003e\u003e() {});\n```\n\n以上就是全部功能,按照已有需求提前预置了一些`TypeMapper`，这些`TypeMapper`无法满足需要时可以自己添加`TypeMapper`，也可以在`ISSUE`提需求，由我来添加。\n\n`fastmapper`不建议把bean写的嵌套过多，最好是单层的，但为了对付一些无奈的场景，还是提供了简单的深层拷贝支持.不需要额外配置，直接使用即可。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonlyeat3%2Ffastmapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonlyeat3%2Ffastmapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonlyeat3%2Ffastmapper/lists"}