上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页
摘要: 本文测试环境为 CentOS 7 和 MongoDB 最新版 (4.0.12) 使用 root 操作 (实际操作中使用非 root 账户启动报错) 零、服务器分配 服务器 102服务器 103服务器 104 mongos mongos mongos config server config serv 阅读全文
posted @ 2019-08-07 10:27 VictorBu 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 业务需求及设计见前文:基于 MongoDB 动态字段设计的探索 根据专业计算各科平均分 (总分、最高分、最低分) public Object avg(String major){ Aggregation aggregation = Aggregation.newAggregation( Aggreg 阅读全文
posted @ 2019-08-03 09:06 VictorBu 阅读(809) 评论(0) 推荐(0) 编辑
摘要: 一、业务需求 假设某学校课程系统,不同专业课程不同 (可以动态增删),但是需要根据专业不同显示该专业学生的各科课程的成绩,如下: 专业姓名高等数学数据结构 计算机 张三 90 85 计算机 李四 78 87 专业姓名高等数学 数学 王五 86 数学 赵六 95 二、设计思路 开始的思路是根据配置的课 阅读全文
posted @ 2019-08-01 11:51 VictorBu 阅读(3710) 评论(0) 推荐(0) 编辑
摘要: 本文分别使用 MongoRepository 和 MongoTemplate 实现 MongoDB 的简单的增删改查 本文使用 docker 安装 MongoDB: 使用示例 application.yml: spring: data: mongodb: uri: mongodb://test:12 阅读全文
posted @ 2019-07-29 22:02 VictorBu 阅读(1020) 评论(0) 推荐(0) 编辑
摘要: 本文使用 Sharding-JDBC 实现读写分离,基于 CentOS 7 + MySQL 5.7 一、MySQL 安装及配置 1.1 安装 依次执行命令: sudo wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7- 阅读全文
posted @ 2019-07-26 15:40 VictorBu 阅读(837) 评论(0) 推荐(0) 编辑
摘要: 本文分别使用 Elasticsearch Repository 和 ElasticsearchTemplate 实现 Elasticsearch 的简单的增删改查 一、Elastic Stack Elastic Stack 是 ELK Stack 在 5.0 版本加入 Beats 套件后的新称呼 E 阅读全文
posted @ 2019-07-24 15:36 VictorBu 阅读(893) 评论(0) 推荐(0) 编辑
摘要: 问题描述 使用 Zuul 作为网关,偶发超时问题及第一次调用触发熔断问题 解决方案 超时问题 ribbon: ReadTimeout: 10000 SocketTimeout: 60000 第一次调用触发熔断 hystrix: command: default: execution: isolati 阅读全文
posted @ 2019-07-15 22:33 VictorBu 阅读(6975) 评论(0) 推荐(0) 编辑
摘要: 问题描述 微服务之间使用 Feign 调用,偶发超时问题,配置如下: feign: client: config: default: connectTimeout: 10000 readTimeout: 10000 详细参考官方文档:https://cloud.spring.io/spring-cl 阅读全文
posted @ 2019-07-15 22:23 VictorBu 阅读(4629) 评论(0) 推荐(0) 编辑
摘要: 基础知识 虚拟主机 (Virtual Host): 每个 virtual host 拥有自己的 exchanges, queues 等 (类似 MySQL 中的库) 交换器 (Exchange): 生产者产生的消息并不是直接发送给 queue 的,而是要经过 exchange 路由, exchang 阅读全文
posted @ 2019-07-13 17:20 VictorBu 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 使用 Spring Boot 开发 API 使用 Spring Security + OAuth2 + JWT 鉴权,已经在 Controller 配置允许跨域: @RestController @CrossOrigin(allowCredentials = "true", allowedHeade 阅读全文
posted @ 2019-07-12 22:08 VictorBu 阅读(5543) 评论(2) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 17 下一页