How springboot customizes whether bean is automatically instantiated

Today, when I used springboot to build MQ, I found that my project did not rely on kafka, results at all. springboot automatically instantiated kafkaTemplate , resulting in initialization failure. When solving the problem, consider whether there is any way to customize the springboot instantiation list. To put it simply: the initialization list of bean is decided by the user, and the user can ignore the initialization of some bean

.
Mar.28,2021

exclude automatic configuration
@SpringBootApplication(exclude={KafkaAutoConfiguration.class})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b398d3-2c1ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b398d3-2c1ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?