We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76de081 commit 438b610Copy full SHA for 438b610
MD/spring/spring-bean-lifecycle.md
@@ -15,7 +15,7 @@ Spring Bean 的生命周期在整个 Spring 中占有很重要的位置,掌握
15
16
### 注解方式
17
18
-在 bean 初始化时会经历几个阶段,首先可以使用注解 `@PostConstruct`, `@PreDestroy` 来再 bean 的创建和销毁阶段进行调用:
+在 bean 初始化时会经历几个阶段,首先可以使用注解 `@PostConstruct`, `@PreDestroy` 来在 bean 的创建和销毁阶段进行调用:
19
20
```java
21
@Component
@@ -87,7 +87,7 @@ public class SpringLifeCycle{
87
88
以上是在 SpringBoot 中可以这样配置,如果是原始的基于 XML 也是可以使用:
89
90
-```
+```xml
91
<bean class="com.crossoverjie.spring.SpringLifeCycle" init-method="start" destroy-method="destroy">
92
</bean>
93
```
0 commit comments