Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

External Spring boot configuration does not override internal ones #71

Open
ascheman opened this issue Feb 17, 2018 · 0 comments
Open
Assignees
Milestone

Comments

@ascheman
Copy link
Member

If a configuration property, in particular conferences.file, is specified internally and externally (cf. https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html) both values are used. Unfortunately the internal one beats the external one in this case.

Given the following scenario:

  • The bundled application.properties file contains the property with value conferences.file=conferences-dev.yml, and

  • there is an external file /opt/dukecon/config/application.properties with value conferences.file=/opt/dukecon/config/conferences.yml,

  • and /opt/dukecon/config specified as Spring config location (e.g. --spring.config.location=/opt/dukecon/config).

Now the application behaves the following way:

  • It first reads the externally specified /opt/dukecon/config/conferences.yml and initializes the conference list with the data,
  • Then it again initializes the conferences list with the data from the internally specified conferences-dev.yml.

Finally only the conferences from the latter file are contained in the application.

@ascheman ascheman added this to the later milestone Feb 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants