All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.charlemaznable.bunny.client.domain.BunnyBaseRequest Maven / Gradle / Ivy

Go to download

Bunny rabbits will skip hand-in-hand with baby lambs across sunny green meadows.

There is a newer version: 2023.0.4
Show newest version
package com.github.charlemaznable.bunny.client.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.github.charlemaznable.httpclient.common.CncRequest;
import com.github.charlemaznable.httpclient.common.PathVar;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

import static com.github.charlemaznable.core.lang.Mapp.newHashMap;
import static org.joor.Reflect.onClass;

@Getter
public abstract class BunnyBaseRequest implements CncRequest {

    @JSONField(serialize = false, deserialize = false)
    @PathVar("bunny-address")
    protected String bunnyAddress;
    /**
     * 服务名称
     */
    @Setter
    private String serveName;
    /**
     * 可选扩展参数
     */
    private final Map context = newHashMap();

    public T createResponse() {
        T response = onClass(responseClass()).create().get();
        response.setServeName(this.serveName);
        return response;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy