随笔 - 210  文章 - 0 评论 - 0 阅读 - 61289
< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

随笔分类 -  SpringCloud

多数据库配置
摘要:依赖 <!-- 动态数据源 --> <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>3.5.0</version 阅读全文
posted @ 2023-08-11 18:58 鲤斌 阅读(18) 评论(0) 推荐(0) 编辑
Feign传递参数
摘要:传递单个参数 1客户端 @RequestMapping("/one") public BaseResp one(@RequestParam("id") Integer id); 服务端 @RequestMapping("/one") public BaseResp one(@RequestParam 阅读全文
posted @ 2023-04-20 14:28 鲤斌 阅读(64) 评论(0) 推荐(0) 编辑
spring-cloud-alibaba项目打包
摘要:在父依赖中加入 <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <executions> <executi 阅读全文
posted @ 2023-04-14 13:39 鲤斌 阅读(129) 评论(0) 推荐(0) 编辑
hystrix的熔断降级
摘要:hystrix的熔断降级 结合Feign 使用 1.A服务通过B服务的唯—标识,从Nacos获取到可调用列表。 2.使用feigh中的Http发起远程请求。 3.超过默认配置的时限,抛出异常,结束该线程。 调用方 依赖 <!-- 熔断降级的依赖--> <dependency> <groupId>or 阅读全文
posted @ 2023-03-19 23:35 鲤斌 阅读(31) 评论(0) 推荐(0) 编辑
nacos-config配置中心
摘要:依赖 <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId> </dependency> yml server: port 阅读全文
posted @ 2023-03-17 13:53 鲤斌 阅读(18) 评论(0) 推荐(0) 编辑
最基本的SpringCloud的搭建
摘要:对于springcloud而言,模块是按业务进行区分的; 父工程 依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version> 阅读全文
posted @ 2023-03-05 01:59 鲤斌 阅读(25) 评论(0) 推荐(0) 编辑
Feign负载均衡
摘要:Ribbon负载均衡(了解) Ribbon与nacos负载均衡的区别 nginx的负载均衡是服务端的负载均衡。ribbon的负载均衡是客户端的负载均衡; 服务端的负载均衡需要将被调用的方的ip以及端口号进行配置。服务端的负载均衡 需要自己手动的进行配置,才能完成调用。如果没有配置,则无法进行负载; 阅读全文
posted @ 2023-03-03 01:19 鲤斌 阅读(138) 评论(0) 推荐(0) 编辑

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