Skip to content

Commit 8b02768

Browse files
committed
update: 官网域名切换到 forest.dromara.org
1 parent 884130d commit 8b02768

File tree

5 files changed

+20
-8
lines changed

5 files changed

+20
-8
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22

33
<p align="center">
4-
<a href="http://forest.dtflyx.com/">
4+
<a href="https://forest.dromara.org/">
55
<img width="300" src="site/media/logo3.png" alt="logo">
66
</a>
77
</p>
@@ -15,10 +15,10 @@
1515
<a href="https://opensource.org/licenses/mit-license.php">
1616
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
1717
</a>
18-
<a href="http://forest.dtflyx.com/">
18+
<a href="https://forest.dromara.org/">
1919
<img src="https://img.shields.io/badge/document-1.x-e96.svg" alt="Documentation">
2020
</a>
21-
<a href="https://forest.dtflyx.com/pages/author/">
21+
<a href="https://forest.dromara.org/pages/author/">
2222
<img src="https://img.shields.io/badge/author-%E5%85%AC%E5%AD%90%E9%AA%8F-7af" alt="Author">
2323
</a>
2424
</p>
@@ -39,9 +39,9 @@ Forest是一个高层的、极简的声明式HTTP调用API框架<br>
3939

4040
文档和示例:
4141
-------------------------------------
42-
* [项目主页](http://forest.dtflyx.com/)
42+
* [项目主页](https://forest.dromara.org/)
4343

44-
* [中文文档](https://forest.dtflyx.com/pages/1.5.36/install_guide/)
44+
* [中文文档](https://forest.dromara.org/pages/1.5.36/install_guide/)
4545

4646
* [示例工程](forest-examples)
4747

@@ -396,7 +396,7 @@ String result = Forest.post("/user/register")
396396
.execute(String.class);
397397
```
398398

399-
#### 详细文档请看:[官方文档](http://forest.dtflyx.com/)
399+
#### 详细文档请看:[官方文档](https://forest.dromara.org/)
400400

401401

402402
## 获得奖项

forest-core/src/test/java/com/dtflys/forest/test/sse/MySSEHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ protected void onClose(EventSource eventSource) {
2727
buffer.append("SSE Close");
2828
}
2929

30+
@Override
31+
public void onMessage(EventSource eventSource, String name, String value) {
32+
33+
}
34+
3035
@SSEMessage("data")
3136
public void onData(EventSource eventSource, @SSEName String name, @SSEValue String value) {
3237
buffer.append("Receive ").append(name).append(": ").append(value).append("\n");

forest-core/src/test/java/com/dtflys/forest/test/sse/MySSEInterceptor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import com.dtflys.forest.annotation.SSEDataMessage;
44
import com.dtflys.forest.annotation.SSEEventMessage;
5+
import com.dtflys.forest.annotation.SSEMessage;
56
import com.dtflys.forest.annotation.SSEName;
67
import com.dtflys.forest.annotation.SSEValue;
78
import com.dtflys.forest.http.ForestRequest;
@@ -18,6 +19,7 @@ public class MySSEInterceptor implements SSEInterceptor {
1819
public void onSuccess(InputStream data, ForestRequest request, ForestResponse response) {
1920
StringBuilder builder = (StringBuilder) request.getOrAddAttachment("text", StringBuilder::new);
2021
builder.append("MySSEInterceptor onSuccess\n");
22+
System.out.println("");
2123
}
2224

2325
@Override
@@ -38,6 +40,11 @@ public void onSSEClose(EventSource eventSource) {
3840
builder.append("MySSEInterceptor onSSEClose");
3941
}
4042

43+
@SSEMessage("data")
44+
public void onMessage(EventSource eventSource) {
45+
System.out.println("MySSEInterceptor onMessage");
46+
}
47+
4148
@SSEDataMessage
4249
public void onData(ForestRequest request, @SSEName String name, @SSEValue String value) {
4350
StringBuilder builder = (StringBuilder) request.getOrAddAttachment("text", StringBuilder::new);

forest-test/forest-spring-boot-test/src/test/java/com/dtflys/forest/springboot/test/sse/MySSEInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ public void afterExecute(ForestRequest request, ForestResponse response) {
3232
@SSEDataMessage
3333
public void onData(ForestRequest request, @SSEName String name, @SSEValue String value) {
3434
StringBuilder builder = (StringBuilder) request.getOrAddAttachment("text", StringBuilder::new);
35-
builder.append("Receive name=" + name + "; value=" + value + "; comp=" + testComp.getValue() + "\n");
35+
builder.append("Receive name=" + name + "; value=" + value + "\n");
3636
}
3737
}

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<id>gongjun</id>
2323
<name>gongjun</name>
2424
<email>[email protected]</email>
25-
<url>https://forest.dtflyx.com</url>
25+
<url>https://forest.dromara.org</url>
2626
</developer>
2727
</developers>
2828

0 commit comments

Comments
 (0)