2.3 KiB
SafeQR Spring Boot Project
This is a Spring Boot project built with Java 17. This guide will help you set up the project and install the necessary dependencies using Maven.
Prerequisites
Before you begin, ensure you have the following software installed on your system:
- Java 17: This project requires Java 17. You can download it from the official Oracle website or install it via a package manager (e.g.,
sdkmanorbrewon macOS). - Maven 3.6+: Apache Maven is used to manage the project's dependencies. You can download Maven from the official Apache website or install it via a package manager.
Installation
Follow these steps to set up and run the project locally:
1. Clone the Repository
Clone the project repository to your local machine using the following command:
git clone https://github.com/safeqr/backend-springboot.git
cd backend-springboot
2. Verify Java and Maven Installation
Ensure that Java 17 and Maven are installed and available on your system by running the following commands:
java -version
mvn -version
You should see output indicating that Java 17 and Maven 3.6+ are installed.
3. Install Project Dependencies
Navigate to the root directory of the project (if you haven't already) and run the following command to clean the project and install all necessary dependencies:
mvn clean install
This command will:
- Clean: Remove any previously compiled files.
- Install: Download all required dependencies as defined in the
pom.xmlfile and compile the project.
4. Run the Application
Once the dependencies are installed, you can run the application with the following command:
mvn spring-boot:run
This will start the Spring Boot application, and you should see the application logs in the terminal. By default, the application will be available at http://localhost:8080.
Additional Information
- Configuration: Any necessary configurations can be adjusted in the
application.propertiesorapplication.ymlfiles located in thesrc/main/resourcesdirectory. - Building the Project: To build a standalone JAR file, you can use
mvn package, which will generate a JAR file in thetargetdirectory.