Javad Kargar
Javad Kargar

Reputation: 1425

Spring cloud override config in local (spring boot 2.4 upper)

In previous Spring Cloud Config Hoxton by set spring.cloud.config.allow-override=true, you can override config in localhost application.yaml.

But in the new Spring Boot 2.4 version and spring.config.import command, setting this property does not change anything, and config does not override in localhost application.yaml.

How can I do this in the new version? Is there any alternative solution for override configs to test in the local environment?

Upvotes: 4

Views: 779

Answers (1)

Ömer
Ömer

Reputation: 84

I just added a new e.g. application-dev1.yml in addition to other yml files (in this case besides test) and I set the active profiles in application.yml as below

spring:
  profiles:
    active: test, dev1

It works for me

Upvotes: 1

Related Questions