Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

110
Visualizações
Spring reload properties without restarting TOMCAT

I have this Spring MVC application that makes use of PropertyPlaceholderConfigurer to load properties using @Value annotation. I understand that all properties are loaded at server startup when context is initialized. Howevver, is there a way that I can access updated properties without having to restart TOMCAT? (perhaps making use of Apache Commons PropertiesConfiguration)?

Is there a way I can configure Apache Commons PropertiesConfiguration to work with Spring PropertyPlaceholderconfigurer?

about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Add @RefreshScope annotation above the class which consumes the properties (ie has @Value annotation). Example goes as follows:

@RefreshScope
class PropertiesConsumer {
  ....
  @Value(..)
  private consumerFoo;
  ....
}
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda