This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git
The following commit(s) were added to refs/heads/master by this push:
new 2fa50fbce34 # 调用触发事件通知 (#1430)
2fa50fbce34 is described below
commit 2fa50fbce34cb31c0ce569b031b2545da33dc471
Author: JIAN ZHONG <[email protected]>
AuthorDate: Sun Aug 28 09:06:51 2022 +0800
# 调用触发事件通知 (#1430)
---
.../advanced-features-and-usage/service/events-notify.md | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git
a/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/events-notify.md
b/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/events-notify.md
index 48b098fef84..c554725d0d7 100644
---
a/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/events-notify.md
+++
b/content/zh/docs3-v2/java-sdk/advanced-features-and-usage/service/events-notify.md
@@ -18,15 +18,14 @@ description: "在调用前后出现异常时的事件通知"
## 使用方式
-#### 服务提供者与消费者共享服务接口
+### 服务提供者与消费者共享服务接口
```java
interface IDemoService {
public Person get(int id);
}
```
-- 服务提供者
-#### 服务提供者实现
+### 服务提供者实现
```java
class NormalDemoService implements IDemoService {
@@ -36,7 +35,7 @@ class NormalDemoService implements IDemoService {
}
```
-#### 服务提供者配置
+### 服务提供者配置
```xml
<dubbo:application name="rpc-callback-demo" />
@@ -44,8 +43,7 @@ class NormalDemoService implements IDemoService {
<bean id="demoService"
class="org.apache.dubbo.callback.implicit.NormalDemoService" />
<dubbo:service interface="org.apache.dubbo.callback.implicit.IDemoService"
ref="demoService" version="1.0.0" group="cn"/>
```
-- 服务消费者
-#### 服务消费者 Callback 接口
+### 服务消费者 Callback 接口
```java
interface Notify {
@@ -54,7 +52,7 @@ interface Notify {
}
```
-#### 服务消费者 Callback 实现
+### 服务消费者 Callback 实现
```java
class NotifyImpl implements Notify {
@@ -72,7 +70,7 @@ class NotifyImpl implements Notify {
}
```
-#### 服务消费者 Callback 配置
+### 服务消费者 Callback 配置
两者叠加存在以下几种组合情况:
@@ -90,7 +88,7 @@ class NotifyImpl implements Notify {
```
-#### 测试代码
+### 测试代码
```java
IDemoService demoService = (IDemoService) context.getBean("demoService");