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

140
Vistas
Dropwizard command line input

We have been using Dropwizard to create HTTP service. Usually the syntax would look like

java -jar {path_to_jar} server config.yml

This spins of HTTP server internally using ServerCommand of dropwizard. But, as for the new requirement we need it to support another command line input preferrably the first input of the run. Say,

java -jar {path_to_jar} path_to_file server config.yml
                    (or at least)
java -jar {path_to_jar} server config.yml path_to_file

I know dropwizard supports custom command input like

  java -jar {path_to_jar} hello -u world

The trick here is we need to support command input along with HTTP server, the documents fails to address this requirement. Is it even possible with dropwizard?.

Note: Adding this parameter to config.yml is not an option. As this parameter is supplied from outside to which we don't want to expose our yml file.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Since you have full control over the public void static main(String[] args) method, you can do whatever additional processing you want there and pass it to the application.

Before you go down that route however, can your requirement be addressed using environmental variables in the config file? http://www.dropwizard.io/1.1.0/docs/manual/core.html#environment-variables

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