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

cn.ishow.starter.rpc.annotation.Decode Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version
package cn.ishow.starter.rpc.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 自定义数据结构解码器
 *
 * @author bucheng
 */
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface Decode {
    /**
     * 成功的响应code 默认为0
     *
     * @return
     */
    int code() default 0;

    /**
     * 业务code字段
     *
     * @return
     */
    String codeField() default "code";

    /**
     * 业务msg字段
     *
     * @return
     */
    String messageField() default "msg";

    /**
     * 业务data字段
     *
     * @return
     */
    String dataField() default "data";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy