I am creating this project to learn about the Spring. This project is a simple student management system. It will have the following features:
- student information
- Exams info
- Homework assignment
- Adding UI to the project
Spring
Hibernate
MySQL
Liquibase
Create docker network using command:
docker network create my-mysqldb
Start the docker container using command:
docker run -d --net my-mysqldb -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=student_data --name mysqldb mysql:latest --port 3306
Add IP to the hosts file:
sudo vi /etc/hosts
and inside the file add the following line at the end
127.0.0.1 mysqldb
Use this line as DB url for the project in application.yaml
file
spring.datasource.url: jdbc:mysql://mysqldb:3306/student_data?useSSL=false&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=TRUE
clone the project
git clone https://github.com/keertirajmalik/student-management.git
Open the project in your favourite IDE and run the following command to start the application
mvn spring-boot:run
Run the test cases using the following command
mvn test
Install the lombok plugin.
File(IntelliJ on Mac) → Preferences → Plugins → Marketplace → [Search for]"Lombok"
Install the sonarlint plugin.
File(IntelliJ on Mac) → Preferences → Plugins → Marketplace → [Search for]"SonarLint"
API documentation is available at Swagger once the application is up and running.