上一页 1 2 3 4 5 6 7 8 9 10 ··· 97 下一页
摘要: 一、环境 1、引入依赖 <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId> </dependency> 2、配置yaml sp 阅读全文
posted @ 2025-06-10 22:16 市丸银 阅读(5) 评论(0) 推荐(0)
摘要: export const getConsumablesInfoReq = (current, size, queryVo) => { return request({ url:'/api/manage/list', method:'get', params:{ current, size, ...q 阅读全文
posted @ 2025-06-10 09:40 市丸银 阅读(6) 评论(0) 推荐(0)
摘要: 一、功能 服务保护(限流、熔断降级) 二、资源和规则 1、定义资源 a、自动适配(Web Servlet、Dubbo、Spring Cloud、gRPC、Spring WebFlux、Reactor) ,所有web接口 b、编程式:SphU API c、声明式:@SentinelResource 三 阅读全文
posted @ 2025-06-09 22:00 市丸银 阅读(7) 评论(0) 推荐(0)
摘要: 一、场景 远程调用出错,有兜底返回值 二、环境搭建 1、引入依赖 Sentinel <dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-sentinel</artifac 阅读全文
posted @ 2025-06-09 21:34 市丸银 阅读(60) 评论(0) 推荐(0)
摘要: 作用:远程调用微服务,添加拦截器,一般对请求头进行处理 一、分类 1、请求拦截器 2、响应拦截器 二、请求拦截器使用 1、创建拦截器类 interceptor.TokenRequestInterceptor.class 2、实现请求拦截器接口 implements RequestIntercepto 阅读全文
posted @ 2025-06-09 20:58 市丸银 阅读(176) 评论(0) 推荐(0)
摘要: 一、分类 1、连接超时,默认10秒 2、读取超时,默认60秒 二、配置yaml文件 注意:单位毫秒 1、default 没有指定微服务名称(远程调用)的情况下,用默认配置 2、指定 spring: cloud: openfeign: client: config: default: connect- 阅读全文
posted @ 2025-06-09 19:46 市丸银 阅读(449) 评论(0) 推荐(0)
摘要: 一、配置多个yaml 1、创建yaml文件 application-xx.yaml 注意:application.yaml文件是父,其他yaml文件是子 2、使用 spring: profiles: include: xx 二、一个yaml多个环境 1、环境隔离 在application.yaml文 阅读全文
posted @ 2025-06-09 19:32 市丸银 阅读(106) 评论(0) 推荐(0)
摘要: 1、yaml文件 指定日志的位置和等级 logging: level: com.wt.order.feign: debug 2、配置类 package com.wt.order.config; import feign.Logger; import org.springframework.conte 阅读全文
posted @ 2025-06-09 19:14 市丸银 阅读(16) 评论(0) 推荐(0)
摘要: 自定义分页 package com.foxlink.utils; import java.util.HashMap; import java.util.List; /** * 自定义分页的数据 */ public class ListPageUtil { /** * * @param list 数据 阅读全文
posted @ 2025-06-09 15:41 市丸银 阅读(8) 评论(0) 推荐(0)
摘要: 1、区别 远程调用客户端的注解,vale 名称, url 第三方api的域名(http://ip+port) @FeignClient(value = "word", url = "http://res.abeim.cn/") 2、案例 访问: http://res.abeim.cn/api-tex 阅读全文
posted @ 2025-06-08 22:40 市丸银 阅读(23) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 97 下一页