Chapter 3. Configuring the Application

Up until this point, we have created a simple template for a Dropwizard application. What our application does is print a message to the terminal during startup.

Generally, every modern application depends on a number of configuration settings that define the way it runs. For instance, once our application grows and needs to interact with a database, we should somehow use (at least) a username and password to establish a database connection. Of course, we can hardcode these settings inside the application, but that's not efficient, as even a small change would require rebuilding it. The appropriate way of storing such or similar information is by using an external configuration file.

Externalizing the application's ...

Get RESTful Web Services with Dropwizard now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.