Caronte is a backend application developed with Spring Boot that uses a MySQL database to manage and store data related to last wishes and obituaries.
- Java 23
- MySQL
- Maven
-
Install Java 23: To install Java 23 on Ubuntu, follow these steps:
sudo apt update sudo apt install openjdk-23-jdk
Verify the installation with:
java -version
-
Install Maven: To install Maven on Ubuntu:
sudo apt update sudo apt install maven
Verify the installation with:
mvn -v
-
Install Java 23:
- Go to the OpenJDK download page and download the installer for Windows.
- Run the installer and follow the instructions to complete the installation.
- After installation, add Java’s
bin
directory to the environment variables (in System Properties -> Environment Variables -> Path).
Verify the installation with:
java -version
-
Install Maven:
- Download Maven from the official Maven page.
- Extract the ZIP file and configure the environment variables (in System Properties -> Environment Variables -> Path).
Verify the installation with:
mvn -v
Clone the repository on your machine:
git clone git@github.com:ISPP-2425-G9/backend.git
cd caronte
-
Create the database and user in MySQL (or your preferred database):
mysql -u root -p
CREATE DATABASE caronte; CREATE USER 'caronte_user'@'localhost' IDENTIFIED BY 'caronte_password'; GRANT ALL PRIVILEGES ON caronte.* TO 'caronte_user'@'localhost'; FLUSH PRIVILEGES;
-
Install dependencies and build the project:
In the terminal, inside the project directory, run:
mvn clean install
This command will download the necessary dependencies and generate the project's JAR file.
-
To run the Spring Boot application, use the following command:
mvn spring-boot:run
This will start the server at
http://localhost:8080
.
You can run tests with the following commands:
-
If you have maven installed
mvn clean verify
-
Without using your local maven
./mvnw clean verify
Once you have executed one of these commands, you will have a coverage report in ./target/site/jacoco/index.html. Check that file in yout browser to see the results.