更新时间:2023-10-18 22:24:22
谢谢,戴夫,你的建议是100%正确的。
Thanks, Dave, your suggestion was 100% correct.
如果我将 / local / appname / dev / overrides
中的属性文件重命名为 application-dev.properties
然后该文件 执行 的属性值将覆盖类路径中的属性值:application-dev.properties
。
If I rename the properties file in /local/appname/dev/overrides
to application-dev.properties
then the property values from that file do override the ones in classpath:application-dev.properties
.
我确信我已经昨天试过这个组合,但我认为必须停止它的工作是当我正在玩指定 spring.config.location
并且出错了所以它没有在正确的位置查找覆盖文件。
I was sure I had tried this combination yesterday, but I think what must have stopped it working was when I was playing around with specifying the spring.config.location
and got that wrong so it wasn't looking for the override file in the right place.