Spring Boot: is there a way to prevent certain environment properties from being overridden?

Viewed 398

I'm using Spring Boot and its external configuration feature: https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html

In my application I have a application.properties file with default configuration, like:

my.property=one
other.property=two

In production and test environments I'm using the external configuration feature of Spring Boot to override certain properties. As far as I understand, this configuration concept is present throughout the whole of Spring Boot and almost any option can be configured externally.

This leads to my questions:

  • What if I have some properties, which I do not want to expose for override?
  • Is there some kind of "blacklist" option, to prevent a list of selected properties from being overridden?
0 Answers
Related