统一配置文件后缀命名.

pull/89/head
chen.ma 3 years ago
parent 976cc97b24
commit 7c1a783ca3

@ -2,7 +2,7 @@ package cn.hippo4j.starter.alarm;
import cn.hippo4j.common.config.ApplicationContextHolder; import cn.hippo4j.common.config.ApplicationContextHolder;
import cn.hippo4j.common.model.PoolParameterInfo; import cn.hippo4j.common.model.PoolParameterInfo;
import cn.hippo4j.starter.config.MessageAlarmConfig; import cn.hippo4j.starter.config.MessageAlarmConfiguration;
import cn.hippo4j.starter.core.DynamicThreadPoolExecutor; import cn.hippo4j.starter.core.DynamicThreadPoolExecutor;
import cn.hippo4j.starter.toolkit.CalculateUtil; import cn.hippo4j.starter.toolkit.CalculateUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -26,7 +26,7 @@ public class ThreadPoolAlarmManage {
static { static {
SEND_MESSAGE_SERVICE = Optional.ofNullable(ApplicationContextHolder.getInstance()) SEND_MESSAGE_SERVICE = Optional.ofNullable(ApplicationContextHolder.getInstance())
.map(each -> each.getBean(MessageAlarmConfig.SEND_MESSAGE_BEAN_NAME, SendMessageService.class)) .map(each -> each.getBean(MessageAlarmConfiguration.SEND_MESSAGE_BEAN_NAME, SendMessageService.class))
.orElse(null); .orElse(null);
} }

@ -26,7 +26,7 @@ import static cn.hippo4j.starter.toolkit.CloudCommonIdUtil.getIpApplicationName;
* @date 2021/8/6 21:35 * @date 2021/8/6 21:35
*/ */
@AllArgsConstructor @AllArgsConstructor
public class DiscoveryConfig { public class DiscoveryConfiguration {
private final ConfigurableEnvironment environment; private final ConfigurableEnvironment environment;

@ -51,7 +51,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
@ConditionalOnBean(MarkerConfiguration.Marker.class) @ConditionalOnBean(MarkerConfiguration.Marker.class)
@EnableConfigurationProperties(BootstrapProperties.class) @EnableConfigurationProperties(BootstrapProperties.class)
@ConditionalOnProperty(prefix = BootstrapProperties.PREFIX, value = "enable", matchIfMissing = true, havingValue = "true") @ConditionalOnProperty(prefix = BootstrapProperties.PREFIX, value = "enable", matchIfMissing = true, havingValue = "true")
@ImportAutoConfiguration({HttpClientConfig.class, DiscoveryConfig.class, MessageAlarmConfig.class, UtilAutoConfiguration.class}) @ImportAutoConfiguration({HttpClientConfiguration.class, DiscoveryConfiguration.class, MessageAlarmConfiguration.class, UtilAutoConfiguration.class})
public class DynamicThreadPoolAutoConfiguration { public class DynamicThreadPoolAutoConfiguration {
private final BootstrapProperties properties; private final BootstrapProperties properties;

@ -19,7 +19,7 @@ import java.util.concurrent.TimeUnit;
* @author chen.ma * @author chen.ma
* @date 2021/6/10 13:28 * @date 2021/6/10 13:28
*/ */
public class HttpClientConfig { public class HttpClientConfiguration {
@Bean @Bean
public OkHttpClient hippo4JOkHttpClient() { public OkHttpClient hippo4JOkHttpClient() {

@ -21,7 +21,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
* @date 2021/8/15 15:39 * @date 2021/8/15 15:39
*/ */
@AllArgsConstructor @AllArgsConstructor
public class MessageAlarmConfig { public class MessageAlarmConfiguration {
private final BootstrapProperties properties; private final BootstrapProperties properties;
@ -34,7 +34,7 @@ public class MessageAlarmConfig {
public static final String SEND_MESSAGE_BEAN_NAME = "hippo4JSendMessageService"; public static final String SEND_MESSAGE_BEAN_NAME = "hippo4JSendMessageService";
@DependsOn("hippo4JApplicationContextHolder") @DependsOn("hippo4JApplicationContextHolder")
@Bean(MessageAlarmConfig.SEND_MESSAGE_BEAN_NAME) @Bean(MessageAlarmConfiguration.SEND_MESSAGE_BEAN_NAME)
public SendMessageService hippo4JSendMessageService(HttpAgent httpAgent, AlarmControlHandler alarmControlHandler) { public SendMessageService hippo4JSendMessageService(HttpAgent httpAgent, AlarmControlHandler alarmControlHandler) {
return new BaseSendMessageService(httpAgent, properties, alarmControlHandler); return new BaseSendMessageService(httpAgent, properties, alarmControlHandler);
} }
Loading…
Cancel
Save