I have create a spring-boot-2 gradle project, also in build.gradle
file i have added Kafka related dependency which given below.
dependencies {
implementation 'org.springframework.cloud:spring-cloud-starter-zipkin'
compile 'org.springframework.cloud:spring-cloud-starter-bus-kafka'
}
now i want to disable all Kafka related Auto configuration from application.yaml
file for that i have tried given below code in my yaml file.
spring:
autoconfigure:
exclude:
- org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration
After implementing above things still the Kafka got Auto-configured and start integration of Kafka with the application.
Also i have tried below code but this is also not working for me.
@SpringBootApplication
@EnableAutoConfiguration(exclude = KafkaAutoConfiguration.class)
public class ApiGatewayApplication {
public static void main(String[] args) {
SpringApplication.run(ApiGatewayApplication.class, args);
}
}
Now please can any one help me out, how can i disable all auto configuration related to kafka from yaml/properties file ?
Thanks,