Application get all user details available in database and have the ability to create new user, edit any user and delete any user
Make sure following are available
- JDK 11
- Docker and Docker Compose
- MySQL 5.7
- MySQL instance should be exposed in localhost in port 3308 (http://localhost:3308). If you don't have an instance please use the docker compose in src/docker
- Default database store should be created with the credentials available in the yml file.
- Backend available at src/main/java
- Docker environment available at src/main/docker
- MySQL instance can be generated by using docker-compose file at src/main/docker(command : docker-compose up)
- Backend will be available by using following command at the project root.
SPRING_PROFILES_ACTIVE=dev ./gradlew bootRun
- MySQL instance should available at locally, port 3308 (http://localhost:3308) with correct credentials in order to jar file to work.
- Use the following command to create the executable jar.
./gradlew bootJar or ./gradlew clean build (to build with tests passes)
- After jar file is successfully created use the following command to start the application.
java -jar -Dspring.profiles.active=dev build/libs/user-data-0.0.1-SNAPSHOT.jar
After executing above command application present at http://localhost:8080
- All the test cases written to test application core logics are available at src/test/java
Swagger UI and API docs available at http://localhost:8080/swagger/ui.html
- Docker based build solution has implemented using Dockerfile and docker compose file also available to create the necessary environments.
- Docker images is created with jar file and MySQL instance is also added to the docker environment to have all dependencies in production
- Using the following command in the root directory to execute the build.
docker-compose up --build -d
- Rest api can be accessible via http://localhost:9090/v0
- To monitor health and other performance related APIs actuator is available http://localhost:9090/actuator
- Swagger UI based solution is accessible via http://localhost:9090/swagger/ui.html