Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Commit 82be164

Browse files
authored
Merge pull request #465 from sofastack/lvjing2-patch-7
init without non-type bean
2 parents 97c49a2 + 521d1da commit 82be164

File tree

1 file changed

+8
-11
lines changed
  • sofa-serverless-runtime/arklet-springboot-starter/src/main/java/com/alipay/sofa/serverless/arklet/springboot/starter/health

1 file changed

+8
-11
lines changed

sofa-serverless-runtime/arklet-springboot-starter/src/main/java/com/alipay/sofa/serverless/arklet/springboot/starter/health/HealthAutoConfiguration.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,6 @@ public class HealthAutoConfiguration implements ApplicationContextAware {
4141

4242
private ApplicationContext context;
4343

44-
@Bean
45-
public void initEndpoint() {
46-
WebEndpointProperties webEndpointProperties = this.context
47-
.getBean(WebEndpointProperties.class);
48-
WebEndpointProperties.Exposure exposure = webEndpointProperties.getExposure();
49-
Set<String> includePath = exposure.getInclude();
50-
includePath.add("*");
51-
webEndpointProperties.getExposure().setInclude(includePath);
52-
webEndpointProperties.setBasePath("/");
53-
}
54-
5544
@Bean
5645
@ConditionalOnAvailableEndpoint
5746
public ArkHealthEndpoint arkHealthEndpoint() {
@@ -76,6 +65,14 @@ public MasterBizHealthIndicator masterBizHealthIndicator() {
7665

7766
@Override
7867
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
68+
WebEndpointProperties webEndpointProperties = applicationContext
69+
.getBean(WebEndpointProperties.class);
70+
WebEndpointProperties.Exposure exposure = webEndpointProperties.getExposure();
71+
Set<String> includePath = exposure.getInclude();
72+
includePath.add("*");
73+
webEndpointProperties.getExposure().setInclude(includePath);
74+
webEndpointProperties.setBasePath("/");
75+
7976
this.context = applicationContext;
8077
}
8178
}

0 commit comments

Comments
 (0)