Dropwizard applications typically have more than one REST endpoint.
Knowing how to add a REST endpoint is a good skill to practice.
- locate the HelloResource.java file
- notice that HelloResource.java is in a package called
resources - copy HelloResource.java to GoodbyeResource.java
- open GoodbyeResource.java in an editor
- locate the line containing
@Path - change the
@Pathfrom/helloto/goodbye - change the class name from
HelloResourcetoGoodbyeResource - find the line that calls the
setTextmethod - change
"Hello "to"Goodbye " - open
HelloWorldApplication.javain an editor - find the
runmethod - add a line of code that registers the GoodbyeResource