当一个springboot项目中的配置信息需要拆分为多个配置文件进行维护时,可以使用spring.profiles.include 拆分,示例如下: application.yml(主配置) spring: profiles: include: auth, cache, db # 引入多个模块配置 然后就可以创建相应的子配置application-auth.yml,application-cache.yml,application-db .yml