{"id":13485419,"url":"https://github.com/DozerMapper/dozer","last_synced_at":"2025-03-27T19:31:08.357Z","repository":{"id":2292372,"uuid":"3250434","full_name":"DozerMapper/dozer","owner":"DozerMapper","description":"Dozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another. ","archived":false,"fork":false,"pushed_at":"2024-12-02T21:36:48.000Z","size":21738,"stargazers_count":2095,"open_issues_count":8,"forks_count":482,"subscribers_count":107,"default_branch":"master","last_synced_at":"2025-03-20T21:44:13.923Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dozermapper.github.io/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DozerMapper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2012-01-23T21:11:58.000Z","updated_at":"2025-03-20T15:01:54.000Z","dependencies_parsed_at":"2024-06-18T17:04:16.569Z","dependency_job_id":"fa7a544c-b7ad-44d2-9433-1ab87d6020b3","html_url":"https://github.com/DozerMapper/dozer","commit_stats":{"total_commits":998,"total_committers":86,"mean_commits":"11.604651162790697","dds":0.7344689378757515,"last_synced_commit":"8efd82f65da118abfa4a5c953bd8dc1bda3bb112"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DozerMapper%2Fdozer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DozerMapper%2Fdozer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DozerMapper%2Fdozer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DozerMapper%2Fdozer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DozerMapper","download_url":"https://codeload.github.com/DozerMapper/dozer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245910753,"owners_count":20692497,"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-07-31T18:00:22.048Z","updated_at":"2025-03-27T19:31:07.662Z","avatar_url":"https://github.com/DozerMapper.png","language":"Java","readme":"[![Build, Test and Analyze](https://github.com/DozerMapper/dozer/actions/workflows/build.yml/badge.svg)](https://github.com/DozerMapper/dozer/actions/workflows/build.yml)\n[![Release Version](https://img.shields.io/maven-central/v/com.github.dozermapper/dozer-core.svg?maxAge=2592000)](https://mvnrepository.com/artifact/com.github.dozermapper/dozer-core)\n[![License](https://img.shields.io/hexpm/l/plug.svg?maxAge=2592000)]()\n\n# Dozer\n\n## Project Activity\nThe project is currently not active and will more than likely be deprecated in the future. If you are looking to use Dozer\non a greenfield project, we would discourage that. If you have been using Dozer for a while, we would suggest you start to think about migrating\nonto another library, such as:\n- [mapstruct](https://github.com/mapstruct/mapstruct)\n- [modelmapper](https://github.com/modelmapper/modelmapper)\n\nFor those moving to mapstruct, the community has created a [Intellij plugin](https://plugins.jetbrains.com/plugin/20853-dostruct) that can help with the migration.\n\n## Why Map?\nA mapping framework is useful in a layered architecture where you are creating layers of abstraction by encapsulating changes to particular data objects vs. propagating these objects to other layers (i.e. external service data objects, domain objects, data transfer objects, internal service data objects).\n\nMapping between data objects has traditionally been addressed by hand coding value object assemblers (or converters) that copy data between the objects. Most programmers will develop some sort of custom mapping framework and spend countless hours and thousands of lines of code mapping to and from their different data object.\n\nThis type of code for such conversions is rather boring to write, so why not do it automatically?\n\n\n## What is Dozer?\nDozer is a Java Bean to Java Bean mapper that recursively copies data from one object to another, it is an open source mapping framework that is robust, generic, flexible, reusable, and configurable.\n\nDozer supports simple property mapping, complex type mapping, bi-directional mapping, implicit-explicit mapping, as well as recursive mapping. This includes mapping collection attributes that also need mapping at the element level.\n\nDozer not only supports mapping between attribute names, but also automatically converting between types. Most conversion scenarios are supported out of the box, but Dozer also allows you to specify custom conversions via XML or code-based configuration.\n\n## Getting Started\nCheck out the [Getting Started Guide](https://dozermapper.github.io/gitbook/documentation/gettingstarted.html), [Full User Guide](https://dozermapper.github.io/user-guide.pdf) or [GitBook](https://dozermapper.github.io/gitbook/) for advanced information.\n\n## Getting the Distribution\nIf you are using Maven, simply copy-paste this dependency to your project.\n\n```XML\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.dozermapper\u003c/groupId\u003e\n    \u003cartifactId\u003edozer-core\u003c/artifactId\u003e\n    \u003cversion\u003e7.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Simple Example\n```XML\n\u003cmapping\u003e\n  \u003cclass-a\u003eyourpackage.SourceClassName\u003c/class-a\u003e\n  \u003cclass-b\u003eyourpackage.DestinationClassName\u003c/class-b\u003e\n    \u003cfield\u003e\n      \u003ca\u003eyourSourceFieldName\u003c/a\u003e\n      \u003cb\u003eyourDestinationFieldName\u003c/b\u003e\n    \u003c/field\u003e\n\u003c/mapping\u003e\n```\n\n```Java\nSourceClassName sourceObject = new SourceClassName();\nsourceObject.setYourSourceFieldName(\"Dozer\");\n\nMapper mapper = DozerBeanMapperBuilder.buildDefault();\nDestinationClassName destObject = mapper.map(sourceObject, DestinationClassName.class);\n\nassertTrue(destObject.getYourDestinationFieldName().equals(sourceObject.getYourSourceFieldName()));\n```\n","funding_links":[],"categories":["Projects","Java","Solutions","Bean映射\u0026复制"],"sub_categories":["Bean Mapping"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDozerMapper%2Fdozer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDozerMapper%2Fdozer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDozerMapper%2Fdozer/lists"}