摘要:
https://www.jb51.net/article/138572.htm 参考资料: http://www.cnblogs.com/ulysses-you/p/7281662.html http://www.lordofthejars.com/2014/09/defend-your-appli 阅读全文
posted @ 2019-07-03 17:22
鸿毛浮绿水
阅读(131)
评论(0)
推荐(0)
摘要:
nextInt方法会生成一个随机的在5以内的数,负载均衡随机策略底层用的就是这个方法; Random rand = new Random(); int index = rand.nextInt(5); System.out.println(index); 偶数和2取余都等于0; 奇数和2区域都等于1 阅读全文
posted @ 2019-07-03 10:38
鸿毛浮绿水
阅读(952)
评论(0)
推荐(0)
浙公网安备 33010602011771号