spring cloud(2.0.4) + mybatis
微信:zmjyyg (一对一讲解)
1 要使用springcloud config client, 且在dev,test,pro等之间切换环境。
那么就不能使用application.properties. 而是要用 bootstrap.properties [该文件中不仅含有读取config server的配置,还必须将其它的配置也加到这里].
如下图:
注意:1. application-xxx.properties中只放了数据库连接信息和druid.
2 bootstrap.properties中的内容如下: