As pointed out here https://github.com/spring-projects/spring-boot/issues/24497#issuecomment-758927133:
When an external config is conditioned by a profile, ConfigDataLocationNotFoundException is thrown during startup if that profile is not active, i.e.
spring:
  config:
    activate:
      on-profile: dev
    import: file:./config/additional.yaml
will fail unless dev profile is active
Comment From: encircled
that was fixed already https://github.com/spring-projects/spring-boot/issues/24584