01 2022 档案

摘要:Condition接口通过ReentrantLock.newCondition获取ConditionObject实现类 方法说明 await:线程挂起LockSupport.park实现本地方法接口park signal:线程退出等待,LockSupport.unpark。 在研究Scheduled 阅读全文
posted @ 2022-01-20 15:27 倔强的老铁 阅读(397) 评论(0) 推荐(0) 编辑
摘要:看到alibaba的nacos注册中心中client端用这个作为心跳任务工具 BeatReactor类中 executorService spring 管理。 this.executorService = new ScheduledThreadPoolExecutor(threadCount, ne 阅读全文
posted @ 2022-01-12 20:03 倔强的老铁 阅读(1105) 评论(0) 推荐(0) 编辑
摘要:如何保证外网开放接口的安全性。 1.使用加签名方式,防止数据篡改。 2.信息加密与密钥管理,AES加密。 3.搭建OAuth2.0认证授权,授权之后获取accessToken。 4.使用令牌方式,先获取token,带着token发送请求。 5.搭建网关实现黑名单和白名单。 一、令牌方式搭建搭建API 阅读全文
posted @ 2022-01-11 19:50 倔强的老铁 阅读(1078) 评论(0) 推荐(0) 编辑
摘要:角色说明 Nacos Server:Nacos服务提供者,里面包含的Open API是功能访问入口,Conig Service、Naming Service 是Nacos提供的配置服务、命名服务模块。Consitency Protocol是一致性协议,用来实现Nacos集群节点的数据同步,这里使用的 阅读全文
posted @ 2022-01-10 14:11 倔强的老铁 阅读(239) 评论(0) 推荐(0) 编辑
摘要:添加依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependenc 阅读全文
posted @ 2022-01-04 21:35 倔强的老铁 阅读(2370) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示