1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

closes #162, fixes #138. Add spring-cloud-alicloud-schedulerX module, and fix ACM starter rely on actuator.

This commit is contained in:
xiaolongzuo
2018-12-12 17:56:16 +08:00
parent c26da5643a
commit 1fc98ebe7c
33 changed files with 779 additions and 47 deletions

View File

@@ -18,11 +18,9 @@ package org.springframework.cloud.alicloud.acm;
import org.springframework.beans.BeansException;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.cloud.alicloud.acm.endpoint.AcmHealthIndicator;
import org.springframework.cloud.alicloud.acm.refresh.AcmContextRefresher;
import org.springframework.cloud.alicloud.acm.refresh.AcmRefreshHistory;
import org.springframework.cloud.alicloud.context.acm.AcmIntegrationProperties;
import org.springframework.cloud.alicloud.context.acm.AcmProperties;
import org.springframework.cloud.context.refresh.ContextRefresher;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
@@ -47,12 +45,6 @@ public class AcmAutoConfiguration implements ApplicationContextAware {
return new AcmPropertySourceRepository(applicationContext);
}
@Bean
public AcmHealthIndicator acmHealthIndicator(AcmProperties acmProperties,
AcmPropertySourceRepository acmPropertySourceRepository) {
return new AcmHealthIndicator(acmProperties, acmPropertySourceRepository);
}
@Bean
public AcmRefreshHistory acmRefreshHistory() {
return new AcmRefreshHistory();

View File

@@ -33,20 +33,26 @@ import org.springframework.context.annotation.Bean;
@ConditionalOnClass(name = "org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration")
public class AcmEndpointAutoConfiguration {
@Autowired
private AcmProperties acmProperties;
@Autowired
private AcmProperties acmProperties;
@Autowired
private AcmRefreshHistory acmRefreshHistory;
@Autowired
private AcmRefreshHistory acmRefreshHistory;
@Autowired
private AcmPropertySourceRepository acmPropertySourceRepository;
@Autowired
private AcmPropertySourceRepository acmPropertySourceRepository;
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@Bean
public AcmEndpoint acmEndpoint() {
return new AcmEndpoint(acmProperties, acmRefreshHistory,
acmPropertySourceRepository);
}
@ConditionalOnMissingBean
@ConditionalOnEnabledEndpoint
@Bean
public AcmEndpoint acmEndpoint() {
return new AcmEndpoint(acmProperties, acmRefreshHistory,
acmPropertySourceRepository);
}
@Bean
public AcmHealthIndicator acmHealthIndicator(AcmProperties acmProperties,
AcmPropertySourceRepository acmPropertySourceRepository) {
return new AcmHealthIndicator(acmProperties, acmPropertySourceRepository);
}
}