<mark>此插件，主要社区贡献人（夜の孤城）</mark>

```xml
<dependency>
    <groupId>com.dtflys.forest</groupId>
    <artifactId>forest-solon-plugin</artifactId>
    <version>最新版本</version>
</dependency>
```

### 1、描述

分布式扩展插件。基于 forest （[代码仓库](https://gitee.com/dromara/forest) ）框架适配的 声明式 http 客户端插件。更多信息可见：[框架官网](https://forest.kim)


#### 2、使用示例

使用 "@ForestClient" 声明接口（这是必须的）：

```java
//声明接口
@ForestClient
public interface MyClient {

    @Get("http://localhost:8080/hello")
    String helloForest();

}
```

声明接口的应用：

```java
//测试
@Component
public class MyService {
    
    // 注入自定义的 Forest 接口实例
    @Inject
    private MyClient myClient;

    public void testClient() {
        // 调用自定义的 Forest 接口方法
        // 等价于发送 HTTP 请求，请求地址和参数即为 helloForest 方法上注解所标识的内容
        String result = myClient.helloForest();
        // result 即为 HTTP 请求响应后返回的字符串类型数据
        System.out.println(result);
    }
}
```


