A student management system using a Docker-container and Payara Server configuration.
- Download Payara.
- Clone this repository by following this article.
- Install Payara Platform Tools Plugin.
- Configure a local Payara Server as shown in photo below:
 - Download Docker.
- Run the command below in CMD and run the container in Docker:
docker run --name mysql -e MYSQL_ROOT_PASSWORD=my_secret_password -e 'MYSQL_ROOT_HOST=%' -e MYSQL_DATABASE=test -e MYSQL_USER=user -e MYSQL_PASSWORD=password -p 3306:3306 mysql:latest - After following these steps you should be able to run the application.
Download Insomnia.
There are 5 different requests that the application can handle: Create, Delete, Get all, Get all(By lastName) and Update.
Use http://localhost:8080/student-management-system/ to access each request.
To create a student, use the following URL: http://localhost:8080/student-management-system/students
Configure this in Insomnia as a POST-request and add the following code with JSON-formatting.
{
"firstName": "Fredrik",
"lastName": "Eriksson",
"email": "test@test.com",
"phoneNumber": 0123456789
}
The same goes for updating a student. Use the following endpoint and access the student by its id: /students/{id}
{
"firstName": "Fredrik",
"lastName": "Eriksson",
"id": 1,
"email": "test@test.com",
"phoneNumber": 1234
}
Deleting a student, accessed by id: /students/{id}
Get all students with a specific last name (last name is chosen in the "Query"-tab in Insomnia: /students/lastname
Get all students in the database: /students
Fredrik Eriksson