在我的项目中,各个模块都有自己的yml文件。
只需要再起点application.yml中配置:
spring:
profiles:
active: provider,quarstz,consumer
这样就引入其他模块的yml文件了,可以使用@value等方式取值。
***需要引入的yml文件只能以application-开头才会被springboot扫描到,如果想自定义名,则需要自己实现扫描。
在我的项目中,各个模块都有自己的yml文件。
只需要再起点application.yml中配置:
spring:
profiles:
active: provider,quarstz,consumer
这样就引入其他模块的yml文件了,可以使用@value等方式取值。
***需要引入的yml文件只能以application-开头才会被springboot扫描到,如果想自定义名,则需要自己实现扫描。