cc.eamon.open:mapping

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/

Лицензия

Лицензия

Группа

Группа

cc.eamon.open
Идентификатор

Идентификатор

mapping
Последняя версия

Последняя версия

1.0.5-ALPHA
Дата

Дата

Тип

Тип

jar
Описание

Описание

Sonatype helps open source projects to set up Maven repositories on https://oss.sonatype.org/
Система контроля версий

Система контроля версий

https://github.com/ymxiong/mapping

Скачать mapping

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/cc.eamon.open/mapping/ -->
<dependency>
    <groupId>cc.eamon.open</groupId>
    <artifactId>mapping</artifactId>
    <version>1.0.5-ALPHA</version>
</dependency>
// https://jarcasting.com/artifacts/cc.eamon.open/mapping/
implementation 'cc.eamon.open:mapping:1.0.5-ALPHA'
// https://jarcasting.com/artifacts/cc.eamon.open/mapping/
implementation ("cc.eamon.open:mapping:1.0.5-ALPHA")
'cc.eamon.open:mapping:jar:1.0.5-ALPHA'
<dependency org="cc.eamon.open" name="mapping" rev="1.0.5-ALPHA">
  <artifact name="mapping" type="jar" />
</dependency>
@Grapes(
@Grab(group='cc.eamon.open', module='mapping', version='1.0.5-ALPHA')
)
libraryDependencies += "cc.eamon.open" % "mapping" % "1.0.5-ALPHA"
[cc.eamon.open/mapping "1.0.5-ALPHA"]

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
com.squareup : javapoet jar 1.8.0
com.google.guava : guava jar 27.0.1-jre
com.alibaba : fastjson jar 1.2.60
org.slf4j : slf4j-api jar 1.7.26

system (1)

Идентификатор библиотеки Тип Версия
com.sun » tools jar 1.8

Модули Проекта

Данный проект не имеет модулей.

Mapping

中文地址移步:

https://github.com/ymxiong/Mapping/blob/master/README_zh.md

Target

Using @Mapper @MapperIgnore @MapperRename @MapperModify and @MapperExtra annotations to simplify your entity system. Those annotations can work in with each other, using to modify, transform, and bundle entity attribute information, which is easy to provide to front-end developer for revealing, and also facilitates background developer's management.

Installation

Add the dependency to your pom.xml

<dependency>
    <groupId>cc.eamon.open</groupId>
    <artifactId>mapping</artifactId>
    <version>${mapping-version}</version>
</dependency>

Usage

Start Up

  1. Add @Mapper annotation to your entity,and create get&set methods of your properties(You can work in with lombok)

    @Mapper
    public class User {
        private int id;
    	...
    }
  2. Complie your project, the UserDefaultMapper will be automatically generated, which includeMap<> getMap(User obj) andUser getEntity() two main method.

    public class UserDefaultMapper {
        public int id;
        /**
        * Static Method, Invoke Directly
        */
        public static Map<String, Object> getMap(User obj) {
            Map<String, Object> resultMap = new LinkedHashMap<>();
            if (obj == null) return resultMap;
            resultMap.put("id", obj.getId());
            return resultMap;
        }
        /**
        * Using After Instantiate Mapper
        */
        public User getEntity() {
            User entity = new User();
            entity.setId(this.id);
            return entity;
        }
    }

Версии библиотеки

Версия
1.0.5-ALPHA
1.0.3-ALPHA
1.0.2-ALPHA
1.0.1-ALPHA
1.0.0
1.0.0-ALPHA
0.1.3