上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页
摘要: 一、Nacos 下载与初始化配置 本文使用1.2.0,下载地址:https://github.com/alibaba/nacos/releases Nacos 单机模式支持持久化配置到 MySQL 数据库,修改 conf/application.properties 配置: spring.datas 阅读全文
posted @ 2020-03-26 09:59 VictorBu 阅读(3373) 评论(0) 推荐(0) 编辑
摘要: 一、配置文件 application.yml spring: kafka: one: bootstrap-servers: IP:PORT consumer: group-id: YOUR_GROUP_ID enable-auto-commit: true two: bootstrap-server 阅读全文
posted @ 2019-12-19 16:07 VictorBu 阅读(10318) 评论(3) 推荐(1) 编辑
摘要: 传统的心跳包设计,基本上是服务端和客户端同时维护 Scheduler,然后双方互相接收心跳包信息,然后重置双方的上下线状态表。此种心跳方式的设计,可以选择在主线程上进行,也可以选择在心跳线程中进行,由于在进行业务调用过程中,此种心跳包是没有必要进行发送的,所以在一定程度上会造成资源浪费。严重的甚至会 阅读全文
posted @ 2019-12-08 16:10 VictorBu 阅读(1326) 评论(0) 推荐(0) 编辑
摘要: 一、编码器、解码器 ... ... @Autowired private HttpRequestHandler httpRequestHandler; @Autowired private TextWebSocketFrameHandler textWebSocketFrameHandler; .. 阅读全文
posted @ 2019-12-04 09:47 VictorBu 阅读(2233) 评论(0) 推荐(0) 编辑
摘要: 本文代码有些许问题,处理方案见:解决 spring-integration-mqtt 频繁报 Lost connection 错误 一、添加配置 spring: mqtt: client: username: 用户名 password: 密码 serverURIs: tcp://ip:port # 阅读全文
posted @ 2019-12-03 17:13 VictorBu 阅读(7414) 评论(0) 推荐(0) 编辑
摘要: 一、实体类 public class UploadModel { private Long userId; private MultipartFile img1; private MultipartFile img2; /* getter setter */ } 二、接收 @RestControll 阅读全文
posted @ 2019-11-29 14:17 VictorBu 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 一、 安装 JDK 8 1.1 下载 JDK 8 cd /opt/ wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=acc 阅读全文
posted @ 2019-09-18 15:54 VictorBu 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 今天用 Spring Boot 做个小 demo 程序,本来轻车熟路,结果怎么都访问不了,后来浪费半天时间才发现是因为手滑把端口设置成了 6666, 而 6666 刚好在 Chrome 浏览器的默认非安全端口列表里。。。 避免采坑更多默认非安全端口,请搜索:默认非安全端口列表 ​ 今天用 Sprin 阅读全文
posted @ 2019-08-15 23:41 VictorBu 阅读(3168) 评论(0) 推荐(0) 编辑
摘要: @Configuration public class ApplicationReadyListener implements ApplicationListener<ContextRefreshedEvent> { @Autowired MongoTemplate mongoTemplate; @ 阅读全文
posted @ 2019-08-09 10:33 VictorBu 阅读(2152) 评论(0) 推荐(0) 编辑
摘要: 一、安装 Erlang RabbitMQ 是使用 Erlang 开发的,所以需要首先安装 Erlang,本文安装其最新版本 添加 repo 文件: sudo vim /etc/yum.repos.d/rabbitmq_erlang.repo 文件内容: [rabbitmq_erlang] name= 阅读全文
posted @ 2019-08-09 10:22 VictorBu 阅读(252) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 17 下一页