# cloud20240824
**Repository Path**: xbb-study/cloud20240824
## Basic Information
- **Project Name**: cloud20240824
- **Description**: 微服务
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2024-08-24
- **Last Updated**: 2025-02-28
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# 原文地址
https://blog.csdn.net/sinat_38967565?type=blog
# nacos
```shell
cd /Users/binny/workspace/nacos/241/nacos/bin
```
```shell
sdk use java 8.0.412-zulu
./startup.sh
```
# 加载优先级
- 注意: Spring Boot 配置文件的加载优先级,由高到低依次为
>bootstrap.properties --> bootstrap.yml --> application.properties --> application.yml
上面之所以用 `bootstrap.properties` 配置文件,是为了优先加载配置文件,然后从nacos拉取配置,保证服务的正常启动。
# fegin
> 在 @FeignClient 注解中,value 值(上面的 “cloud-provider”)是一个客户端服务名称,
>
> 它被用来创建一个 Spring Cloud LoadBalancer client。
>
> 你也可以使用 url 属性指定一个 URL(绝对值或只是一个hostname)。
# sentinel
## 启动
```shell
java -Dserver.port=8888 -Dcsp.sentinel.dashboard.server=localhost:8888 -Dproject.name=sentinel-dashboard -jar sentinel-dashboard-1.8.8.jar
```
## 问题
测试时候,遇到一个点击请求接口,会出交替出现接口
> 1. providerSentinelTest服务正常 :sentinel
> 2. 对方服务不可用,开始服务降级处理3
控制台伴随着一个错误日志
> org.apache.hc.core5.pool.PoolEntry.getCreated()
下面配置有点问题,大概率是版本问题
```yml
org.apache.httpcomponents.client5
httpclient5
5.3
io.github.openfeign
feign-hc5
13.1
```
改为下面的,测试正常
```yaml
io.github.openfeign
feign-httpclient
12.1
io.github.openfeign
feign-hc5
12.2
```
## 注意事项
- 服务重启后,需要重新配置流控规则等