当我从--spring.config.location=another.properties
的命令行运行Spring引导应用程序时,another.properties
中的值将被覆盖application.properties
中的值?使用spring.config.location运行Spring替代值为application.properties的.jar文件?
例如:
如果有一个值spring.datasource.url
在application.properties
,但不是在application.properties
。所以该值取自another.properties
或未定义?
你试过了吗? – chrylis
我试过了。如果值不在another.properties中,则应用程序使用application.properties中的值。看来application.properties是默认的。 – ADN