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

131
Visualizações
Apache velocity multiple variables

I am using apache velocity to generate multiple templates, the problem is that in each templates multiple (read many) variables are being used and it becomes very tedious to initialize each and every variable seperately.

Is there a work around this or i have no other option?

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

0

See there are two work around this thing, the 1st and the best option is that you create a Java Bean class that will contain all your template variables and you can then just initialise separate objects for each and every instance of your template, you just have merge the object with context.

Another way is creating and using a java property file which is not only tedious as you have to create separate property file for each and every time you want to create a new file from your template but also deprecated.

You can read about this more on Apache velocity official documentation.

over 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