--spring.config.location=another.properties
のコマンドラインからSpringブートアプリケーションを実行すると、another.properties
の値はapplication.properties
の値よりも優先されますか?例えばspring.config.locationを持つspringブート.jarファイルをapplication.propertiesの値を置き換えて実行しますか?
:
値spring.datasource.url
はapplication.properties
ではなく、application.properties
であった場合。したがって、値はanother.properties
または未定義から取られますか?
試しましたか? – chrylis
私はそれを試した。値がanother.propertiesにない場合、appはapplication.propertiesの値を使用します。 application.propertiesはデフォルトのようです。 – ADN