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

142
Views
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 answers
Answer question

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 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!