摘要: 数据库操作 选择和创建数据库,如果不存在则自动创建 use 数据库名称 查看所有数据库(有权限) show dbs 或 show databases 查看当前正在使用的数据库命令 db MongoDB中默认的数据库为test,如果你没有选择数据库,集合将存放在test数据库中。 另外: 数据库名可以 阅读全文
posted @ 2022-09-22 11:26 不写代码想写诗的虫子 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 引入配置中心模块 导入依赖 <!--config--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-server</artifactId> <version>2.1 阅读全文
posted @ 2022-09-22 10:39 不写代码想写诗的虫子 阅读(14) 评论(0) 推荐(0) 编辑
摘要: Windows系统中的安装启动 第一步:下载安装包(zip) https://www.mongodb.com/try/download/community 版本选择: MongoDB的版本命名规范:x.y.z; y为奇数时表示当前版本为开发板,如:1.5.2、4.1.13; y为偶数时表示当前版本 阅读全文
posted @ 2022-09-16 13:36 不写代码想写诗的虫子 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 业务应用场景 MongoDB主要针对以下场景: High Performance - 对数据库高并发读写的需求。 Huge Storage - 对海量数据的高效存储和访问的需求。 High Scalability && High Availability - 对数据库的高可扩展性和高可用性的需求。 阅读全文
posted @ 2022-09-15 21:33 不写代码想写诗的虫子 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 新增路由模块 导入依赖 <!--zuul--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-zuul</artifactId> <version>1.4.6.RE 阅读全文
posted @ 2022-09-14 16:46 不写代码想写诗的虫子 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 服务熔断 服务熔断:服务端,某个服务超时或者异常,引起熔断(保险丝) 服务提供者 导入依赖 <!--hystrix--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starte 阅读全文
posted @ 2022-09-14 16:31 不写代码想写诗的虫子 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 公共模块改造 导入依赖 <!--feign--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-feign</artifactId> <version>1.4.6. 阅读全文
posted @ 2022-09-14 13:51 不写代码想写诗的虫子 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 服务消费者改造(客户端) Ribbon是基于Netflix,实现的一套客户端负载均衡的工具,只需修改客户端代码即可 导入依赖 <!--Ribbon--> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spr 阅读全文
posted @ 2022-09-14 11:42 不写代码想写诗的虫子 阅读(35) 评论(0) 推荐(0) 编辑
摘要: 引入Eureka注册中心 新增注册中心模块 导入依赖 <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka-server</artifactId> <vers 阅读全文
posted @ 2022-09-13 22:30 不写代码想写诗的虫子 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 服务提供方 通过controller层向外暴露服务 // 提供Restful服务 @RestController public class DeptController { @Autowired private DeptService deptService;//具体业务逻辑 @PostMappin 阅读全文
posted @ 2022-09-13 22:11 不写代码想写诗的虫子 阅读(24) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示