上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 232 下一页
摘要: 1、BigInteger(byte[] val)这个构造函数用于转换一个字节数组包含BigInteger的二进制补码,以二进制表示成一个BigInteger。 (用字节数组中值的ASCII码构造BigInteger) 2、BigInteger(int signum, byte[] magnitude 阅读全文
posted @ 2020-09-01 08:54 牧之丨 阅读(676) 评论(0) 推荐(0)
摘要: 编辑推荐: 本文来源简书,介绍了一种只需在服务端进行授权即可,无需在前端添加额外设置,比传统的JSONP跨域更安全和便捷的方式CORS。 一、基本介绍 简单来说,CORS是一种访问机制,英文全称是Cross-Origin Resource Sharing,即我们常说的跨域资源共享,通过在服务器端设置 阅读全文
posted @ 2020-08-31 14:59 牧之丨 阅读(469) 评论(0) 推荐(0)
摘要: 一.问题产生环境 1.1 为什么会产生跨域问题? 跨域不一定都会有跨域题。 因为跨域问题是浏览器对于ajax请求的一种安全限制; 一个页面发起的 ajax请求,只能是与当前页域名相同的路径,这能有效的阻止跨站攻击; 因此: 跨域问题是针对ajax的一种限制但是这却给我们的开发帯来了不便,而且在实际生 阅读全文
posted @ 2020-08-31 14:44 牧之丨 阅读(1515) 评论(0) 推荐(0)
摘要: 使用RandomStringUtils,可以选择生成随机字符串,可以是全字母、全数字或自定义生成字符等等... 其最基础的方法如下: public static String random(int count, int start, int end, boolean letters, boolean 阅读全文
posted @ 2020-08-31 11:15 牧之丨 阅读(2746) 评论(0) 推荐(0)
摘要: 1. Math.random() 静态方法 产生的随机数是 0 - 1 之间的一个 double,即 0 <= random <= 1。使用: for (int i = 0; i < 10; i++) { System.out.println(Math.random()); } 结果: 0.3598 阅读全文
posted @ 2020-08-31 10:48 牧之丨 阅读(2314) 评论(0) 推荐(0)
摘要: https://www.imooc.com/article/290828/ Spring Cloud Gateway限流详解 2019.08.11 12:56 7257浏览 Spring Cloud Gatway内置的 RequestRateLimiterGatewayFilterFactory 提 阅读全文
posted @ 2020-08-28 14:32 牧之丨 阅读(349) 评论(0) 推荐(0)
摘要: https://www.cnblogs.com/mymelody/p/7325325.html 以前总是通过timestamp来防止重放攻击,但是这样并不能保证每次请求都是一次性的。今天看到了一篇文章介绍的通过nonce(Number used once)来保证一次有效,感觉两者结合一下,就能达到一 阅读全文
posted @ 2020-08-28 13:19 牧之丨 阅读(468) 评论(0) 推荐(0)
摘要: http://www.imooc.com/article/290828 Spring Cloud Gatway内置的 RequestRateLimiterGatewayFilterFactory 提供限流的能力,基于令牌桶算法实现。目前,它内置的 RedisRateLimiter ,依赖Redis存 阅读全文
posted @ 2020-08-26 10:46 牧之丨 阅读(897) 评论(0) 推荐(0)
摘要: http://www.imooc.com/article/290804 TIPS 本文基于Spring Cloud Greenwich SR2编写,兼容Spring Cloud Finchley及更高版本。 这一节来详细探讨Spring Cloud Gateway的路由谓词工厂 (Route Pre 阅读全文
posted @ 2020-08-26 10:44 牧之丨 阅读(570) 评论(0) 推荐(0)
摘要: http://www.imooc.com/article/290824 本文总结Spring Cloud Gateway的排错、调试技巧。欢迎留言补充! 第一式:Actuator监控端点 借助Actuator的监控端点,可分析全局过滤器、过滤器工厂、路由详情。详见:Spring Cloud Gate 阅读全文
posted @ 2020-08-26 10:39 牧之丨 阅读(1043) 评论(0) 推荐(0)
上一页 1 ··· 67 68 69 70 71 72 73 74 75 ··· 232 下一页