Skip to content

Commit 3d038ad

Browse files
authored
Merge pull request Snailclimb#2292 from smy1999/dev
Fix punctuation typos.
2 parents 555fc17 + 85d95d3 commit 3d038ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/system-design/framework/spring/spring-design-patterns-summary.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ Spring 中默认存在以下事件,他们都是对 `ApplicationContextEvent`
206206

207207
#### 事件监听者角色
208208

209-
`ApplicationListener` 充当了事件监听者角色,它是一个接口,里面只定义了一个 `onApplicationEvent()`方法来处理`ApplicationEvent``ApplicationListener`接口类源码如下,可以看出接口定义看出接口中的事件只要实现了 `ApplicationEvent`就可以了。所以,在 Spring 中我们只要实现 `ApplicationListener` 接口的 `onApplicationEvent()` 方法即可完成监听事件
209+
`ApplicationListener` 充当了事件监听者角色,它是一个接口,里面只定义了一个 `onApplicationEvent()`方法来处理`ApplicationEvent``ApplicationListener`接口类源码如下,可以看出接口定义看出接口中的事件只要实现了 `ApplicationEvent`就可以了。所以,在 Spring 中我们只要实现 `ApplicationListener` 接口的 `onApplicationEvent()` 方法即可完成监听事件
210210

211211
```java
212212
package org.springframework.context;
@@ -233,7 +233,7 @@ public interface ApplicationEventPublisher {
233233

234234
```
235235

236-
`ApplicationEventPublisher` 接口的`publishEvent()`这个方法在`AbstractApplicationContext`类中被实现,阅读这个方法的实现,你会发现实际上事件真正是通过`ApplicationEventMulticaster`来广播出去的。具体内容过多,就不在这里分析了,后面可能会单独写一篇文章提到。
236+
`ApplicationEventPublisher` 接口的`publishEvent()`这个方法在`AbstractApplicationContext`类中被实现,阅读这个方法的实现,你会发现实际上事件真正是通过`ApplicationEventMulticaster`来广播出去的。具体内容过多,就不在这里分析了,后面可能会单独写一篇文章提到。
237237

238238
### Spring 的事件流程总结
239239

0 commit comments

Comments
 (0)