Spring Boot Empty YAML array does not override property from source with lower precedence

274 Views Asked by At

In my application root directory i have an application.yml which contains:

restresource:
  queryParams:

and I have another yml on my classpath containing:

restresource:
  path: myPath
  queryParams:
    filter: myFilter

Based on the Spring Boot documentation, the application.yml should override my yml from the classpath. I've tested this successfully with the path, but it won't work with the query params which translates to a Java HashMap which will always contain a single entry with a key of 'filter' and a value 'myFilter'. I would really like to override the query params to be empty.

0

There are 0 best solutions below