Merge branch 'release/1.5.3'
This commit is contained in:
commit
bf394419cf
4
pom.xml
4
pom.xml
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>me.bvn13.kafka.health</groupId>
|
<groupId>me.bvn13.kafka.health</groupId>
|
||||||
<artifactId>kafka-health-check</artifactId>
|
<artifactId>kafka-health-check</artifactId>
|
||||||
<version>1.5.2</version>
|
<version>1.5.3</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>Kafka Health Check</name>
|
<name>Kafka Health Check</name>
|
||||||
@ -114,7 +114,7 @@
|
|||||||
<gitFlowConfig>
|
<gitFlowConfig>
|
||||||
<developmentBranch>develop</developmentBranch>
|
<developmentBranch>develop</developmentBranch>
|
||||||
</gitFlowConfig>
|
</gitFlowConfig>
|
||||||
<incrementVersionAtFinish>false</incrementVersionAtFinish>
|
<incrementVersionAtFinish>true</incrementVersionAtFinish>
|
||||||
<versionDigitToIncrement>2</versionDigitToIncrement>
|
<versionDigitToIncrement>2</versionDigitToIncrement>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
package me.bvn13.kafka.health;
|
||||||
|
|
||||||
|
import org.springframework.boot.actuate.health.AbstractHealthIndicator;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||||
|
import org.springframework.boot.autoconfigure.kafka.KafkaProperties;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@ConditionalOnClass(AbstractHealthIndicator.class)
|
||||||
|
public class KafkaHealthAutoConfiguration {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(KafkaHealthProperties.class)
|
||||||
|
@ConfigurationProperties("kafka.health")
|
||||||
|
public KafkaHealthProperties kafkaHealthProperties() {
|
||||||
|
return new KafkaHealthProperties();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
@ConditionalOnMissingBean(KafkaConsumingHealthIndicator.class)
|
||||||
|
public KafkaConsumingHealthIndicator kafkaConsumingHealthIndicator(KafkaHealthProperties kafkaHealthProperties,
|
||||||
|
KafkaProperties kafkaProperties) {
|
||||||
|
return new KafkaConsumingHealthIndicator(kafkaHealthProperties, kafkaProperties.buildConsumerProperties(),
|
||||||
|
kafkaProperties.buildProducerProperties());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
1
src/main/resources/META-INF/spring.factories
Normal file
1
src/main/resources/META-INF/spring.factories
Normal file
@ -0,0 +1 @@
|
|||||||
|
org.springframework.boot.autoconfigure.EnableAutoConfiguration=me.bvn13.kafka.health.KafkaHealthAutoConfiguration
|
Loading…
Reference in New Issue
Block a user