#1、resources文件夹下创建一个application.yml文件
#2、同时在目录下创建application-dev.yml、application-test.yml文件
#3、在application.ym文件中配置需要激活的配置文件
spring:
profiles:
active: test
如图所示我们要激活的是application-test.yml配置文件内容。
#1、resources文件夹下创建一个application.yml文件
#2、同时在目录下创建application-dev.yml、application-test.yml文件
#3、在application.ym文件中配置需要激活的配置文件
spring:
profiles:
active: test
如图所示我们要激活的是application-test.yml配置文件内容。
上一篇:python返回异常日志
git add添加多个文件时,多个文件名之间用空格隔开
关于springboot 多个配置文件的配置
SpringBoot添加多个数据源1.启动类2.application.properties3.配置类4.新建服务类5.Mapper6.注意1.启动类paure.MybatisAutoConfiguration;import org.springframewo...
springBoot---多个配置文件读取
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M