🥯参数注解
# 应用上下文
独立楼层的接口请求参数来源于应用上下文中的某一参数,该参数可以在Cube DashBoard中进行可视化配置。
Cube会在应用程序启动时自动扫描注解了@IndependentParam
注解的参数对象(应用上线文)。
注意
框架只会扫描参数对象的第一层级,如果进行独立楼层调用所需要的接口请求参数需要在应用上线文参数的内部二级及以上层级,请将参数挪位到 应用上下文参数的第一层级中。
如下:
@IndependentParam
@Data
public class BizParam {
private String templateCode;
private String bizScene;
private String skuId;
private String colaAppCode;
private String clientType;
private String pageId;
/**
* The type Floor.
*/
@Data
public static class Floor {
private String floorId;
private String dataSource;
private String floorName;
private String floorType;
private String floorComponentName;
private String floorComponentVersion;
/**
* The type Style.
*/
@Data
public static class Style {
private String width;
private String height;
private String backgroundColor;
}
}
}
# 动态上报
框架只会把下面的参数上报到 Cube-Dashboard中
private String templateCode;
private String bizScene;
private String skuId;
private String colaAppCode;
private String clientType;
private String pageId;
帮助我们改善此文档 (opens new window)