- Run
mvn clean installto build application - Start application via one of:
java -jar target/com-learn-dropwizard-1.0-SNAPSHOT.jar server config.ymlmake start_service
- To check that application is running navigate to url
http://localhost:8080
- Add new configuration as "Application"
- Set Main class = LearnDWApplication
- Set Program Arguments = server config.yml
- Save configuration
- Run or debug from IDE
- Reference: https://blog.indrek.io/articles/running-a-dropwizard-application-in-intellij-eclipse-and-netbeans/
- Download Docker from https://www.docker.com/get-docker
- Install Docker
- Run
mvn clean installto build application - Build image:
docker image build -t learn-drop-wizard . - Run image
docker container run -p 8080:8080 -p 8081:8081 -d learn-drop-wizard - To check that application is running navigate to url
http://localhost:8080 - To stop running image
docker stop $(docker ps -a -q)
- Download Docker from https://www.docker.com/get-docker
- Install Docker
- Run
docker-compose upto run LearnDW in Docker - Click
^Cto stop LearnDW in Docker
- Build the project
mvn clean install - Start the service
make start_service - Send request to several endpoints, like:
- In separate terminal run
make jacoco_all - Check jacoco reports:
To see your applications' health enter url http://localhost:8081/healthcheck
Example: http://localhost:8080/hello-world?name=Jim
- http://localhost:8080/sum/\/and/<Second Number>
Example: http://localhost:8080/sum/2/and/5
Example: http://localhost:8080/wait?timeout=500
All other non implemented endpoints will throw custom 404 error:
- code = 404
- message = Custom page not found error