如题所述
第1个回答 2022-07-06
多个bootstrap.yml配置文件 bootstrap-dev.yml bootstrap-prod.yml bootstrap-local.yml 想使用local的配置 如果是IDEA启动也在页面配置Active profiles指定为local 如果是jar包命令启动java -jar 名称.jar --spring.profiles.active=test 如果是测试类启动需在启动类上增加注解@ActiveProfiles("local")