https://github.com/owainlewis/employee-service
Dropwizard example service using MySQL and JDBI
https://github.com/owainlewis/employee-service
dropwizard dropwizard-application
Last synced: 11 months ago
JSON representation
Dropwizard example service using MySQL and JDBI
- Host: GitHub
- URL: https://github.com/owainlewis/employee-service
- Owner: owainlewis
- Created: 2020-04-04T20:18:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2022-06-21T03:08:29.000Z (almost 4 years ago)
- Last Synced: 2025-04-07T01:43:43.377Z (about 1 year ago)
- Topics: dropwizard, dropwizard-application
- Language: Java
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# EmployeeService
A sample employee CRUD application using Dropwizard, MySQL and JBDI. Demonstrates using Dropwizard for
- Database migrations
- CRUD
- Packaging with Docker
- Healthchecking MySQL database
- Metrics and monitoring
- Logging
- Authentication filters
## Run the applicatoin
1. Run `mvn clean install` to build your application
1. Start application with `java -jar target/employee-service-1.0-SNAPSHOT.jar server config.yml`
1. To check that your application is running enter url `http://localhost:8080`
## Create the database
```sql
CREATE USER 'admin'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE employees;
GRANT ALL PRIVILEGES ON employees.* TO 'admin'@'localhost';
```
## Migrate the database
```
java -jar target/employee-service-1.0-SNAPSHOT.jar db migrate config.yml
```
## Healthcheck
To see your applications health enter url `http://localhost:8081/healthcheck`