1.@ConditionalOnProperty 该注解主要是根据配置文件的布尔值来判断是否加载该类。 相关链接文件: SpringBoot教程(7) @ConditionalOnProperty 详细讲解和示例-CSDN博客 2.