Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

425
Views
Spring Boot doesn't resolve property placeholder in yaml for apring.profiles.active property

I am used to feature that I can refer to another property from within .yml file using ${...}. So I have Spring Boot v2.3.0.RELEASE and following .yml:

env: dev
spring:
  profiles:
    active: ${env}

But unfortunately, when running my application i see

The following profiles are active: ${env}

Despite the fact that this placeholder works perfectly in other properties, for example kafka topics i define as

topic: ${env}.topic_name

and i can see in logs that it's resolved properly

Kafka producer topic=dev.topi_name

Seems like spring.profiles.active is some sort of an exception from this rule, but i can't find why. And how can i get the same result (with profile depending on other property variable) as is, without env variables, external keys, setting in code, etc. ?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This problem has been fixed in Spring Boot 2.4.0 as a part of the updated config file processing (more about it in 2.4.0 release notes).

If interested, you can play with the new property spring.config.use-legacy-processing to see the difference in how spring.profiles.active is processed.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!