From the course: Building RESTful Web Services with DropWizard

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Setup with configuration class

Setup with configuration class

- [Instructor] Okay, so let's get started with writing a configuration class for a HelloWorld example. As you can see, when you open the main application directory, there's already a configuration class, an application class written for us. So, we'll update those first. So let's go to configuration class and as you can see, there's already code written in there for us. So, what we're going to do is remove and add on this particular code here. So what I'm going to do first is keep the code that we have, the imports and the package that we have, and then what I'm going to do is go ahead and remove the comment here and start coding. So the first thing we're going to do is add a string that we'll call template. And then we're going to add a condition that it cannot be empty. So this is going to be called template. Then again, not empty. And we're going to create another string called defaultName defaultName, and we're…

Contents