Skip to content

Commit

Permalink
refactor: qutoa
Browse files Browse the repository at this point in the history
  • Loading branch information
ChoiEungi committed Jan 21, 2024
1 parent 5bbf8bb commit 1ccee8a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions _posts/2024-01-21-spring-cloud-refresh.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,13 @@ ContextRefresher를 조금 더 들어가보겠습니다. 먼저 `refreshEnvironm
이를 통해 bean overriding option에 따라 ConextRefresher의 구현체가 달라지는 것은 refresh할 때 빈을 정의하는 방식이 달라지기 때문임을 알 수 있습니다. 이는 `updateEnvironment()`를 구현체를 통해 구현한다는 것으로 이해할 수 있습니다.


```Java
```java
// package org.springframework.cloud.context.refresh.ContextRefresher;
public abstract class ContextRefresher {

...
private ConfigurableApplicationContext context;
private RefreshScope scope;

...

@SuppressWarnings("unchecked")
protected ContextRefresher(ConfigurableApplicationContext context, RefreshScope scope,
RefreshAutoConfiguration.RefreshProperties properties) {
Expand All @@ -260,8 +257,6 @@ public abstract class ContextRefresher {
additionalPropertySourcesToRetain = properties.getAdditionalPropertySourcesToRetain();
}

...

public synchronized Set<String> refresh() {
Set<String> keys = refreshEnvironment();
this.scope.refreshAll();
Expand Down

0 comments on commit 1ccee8a

Please sign in to comment.