Skip to content

ErikssonF/student-management-system

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java EE / JAX RS Project

A student management system using a Docker-container and Payara Server configuration.

Getting Started

Deployment

  1. Download Payara.
  2. Clone this repository by following this article.
  3. Install Payara Platform Tools Plugin.
  4. Configure a local Payara Server as shown in photo below:
    ![](readme_pictures/Payara Configuration.png)
  5. Download Docker.
  6. 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
  7. After following these steps you should be able to run the application.

Running program

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

Author

Fredrik Eriksson

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 100.0%