apollo配置list和map

配置类

@Data
@Configuration
@EnableConfigurationProperties(LiveCamConfig.class)
@EnableApolloConfig
@ConfigurationProperties(prefix = "livecam")
public class LiveCamConfig {


	@Value("taliNumbers")
	private List<String> taliNumbers;

	/**
	 * 合作用户可用队列过期时间,单位分钟,默认3天
	 */
	@Value("${partnerAvailableMinutes:4320}")
	private Integer partnerAvailableMinutes;

	/**
	 * 匹配同一个人的时间间隔,单位分钟,默认1天
	 */
	@Value("${matchSamePartnerInterval:1440}")
	private Integer matchSamePartnerInterval;

	/**
	 * 大数据部门推荐的所有用户存储key
	 */
	@Value("${bigDataRecommendUserTotalKey:null}")
	private String bigDataRecommendUserTotalKey;

	/**
	 * 国家黑名单配置
	 */
	private Map<Integer, List<Integer>> countryBlackListMap;

	private List<LiveCamFetchAlgorithmConfigProperty> algorithm;

	@Data
	public static class LiveCamFetchAlgorithmConfigProperty {
		private String userIdSuffix;
		private String algorithm;
		private String userKeyPrefix;
		private String countryKeyPrefix;
		private String areaKeyPrefix;
		private String defaultKey;
	}

}

 

apollo配置

bigDataRecommendUserTotalKey = rc_recommend_livecam_default_total_income_offline
#合作用户可用队列过期时间,单位分钟
livecam.partnerAvailableMinutes = 240
livecam.newAlgorithmTailNumber = 0
livecam.taliNumbers[0] = 2
livecam.taliNumbers[1] = 7
#匹配同一个人的时间间隔,单位分钟
matchSamePartnerInterval = 5
livecam.algorithm[0].userIdSuffix = 61168386
livecam.algorithm[0].algorithm = Als
livecam.algorithm[0].userKeyPrefix = rc_recommend_livecam_userid_
livecam.algorithm[0].countryKeyPrefix = rc_recommend_livecam_countryid_
livecam.algorithm[0].areaKeyPrefix = rc_recommend_livecam_likecountryid_
livecam.algorithm[0].defaultKey = rc_recommend_livecam_default
livecam.algorithm[1].userIdSuffix = x
livecam.algorithm[1].algorithm = LR
livecam.algorithm[1].userKeyPrefix = rc_recommend_livecam_userid_
livecam.algorithm[1].countryKeyPrefix = rc_recommend_livecam_countryid_
livecam.algorithm[1].areaKeyPrefix = rc_recommend_livecam_likecountryid_
livecam.algorithm[1].defaultKey = rc_recommend_livecam_default

livecam.countryBlackListMap.79 = 134
livecam.countryBlackListMap.182 = 79
livecam.countryBlackListMap.154 = 79,134,193,84,165
livecam.countryBlackListMap.84 = 134,173
livecam.countryBlackListMap.186 = 79,134,193,84,165,139
livecam.countryBlackListMap.54 = 79,134,193,84,165,139
livecam.countryBlackListMap.94 = 79,134,193,84,165
livecam.countryBlackListMap.134 = 79
livecam.countryBlackListMap.144 = 79,134,193,84,165
livecam.countryBlackListMap.120 = 79,134,165

这个博客是公司测试的配置,可能线上也是如此;那个类好巧是我们庆珍帅哥写的,为了看我博客还注册了CSDN、我姑且这么自恋吧,庆珍是一个特别特别好的朋友,夸他的话一篇博客也写不完,所以咱们就一笔带过吧、^_^哈哈,真心的夸人、csdn上面我还没有夸过谁呐?是吧?没有夸过,如此可见庆珍的好了吧,瑞华、鹏……不能再说了,大家都特别好,O(∩_∩)O哈哈~,所以呀有时候绊住的不是地方而是回忆 ^_^

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值