Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

426
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda