Why are there prompts when we are writing yml configuration or properties configuration? Why do you know which attributes need to be equipped? In other words, an error is reported after the wrong attribute is configured? What are these reasons?
In the SpringBoot startup class, there is a @EnableAutoConfigurationNote: Start automatic configuration . There is a detailed introduction in this article: @SpringBootApplication Annotation Detailed
To RabbitAutoConfiguration
for example
enterRabbitAutoConfiguration
Can see there is a:@EnableConfigurationProperties(RabbitProperties.class)注解
: Enable configuration RabbitProperties.class
attributes of .
enterRabbitProperties.class
就能看到很多关于rabbitMQ的配置
, The configuration here can be written in the configuration file .