- Java JDK 17 (recommended)
- Gradle (bundled or installed separately)
- IDE (IntelliJ IDEA, Eclipse, VS Code)
Clone this project to your local machine:
git clone <repository-url>
cd <project-directory>To build the project, open a terminal in the project root and execute:
./gradlew buildThis will compile the code, run tests, and package the application.
To run the application locally, execute:
./gradlew bootRunYour Spring Boot application should now be running at:
http://localhost:8080
To execute all tests:
./gradlew testModify application.properties or application.yml located in:
src/main/resources/
Example application.properties:
server.port=8080
spring.datasource.url=jdbc:mysql://localhost:3306/mydb
spring.datasource.username=root
spring.datasource.password=password- Open IntelliJ IDEA and select "Open."
- Navigate to the project folder and select it.
- Allow Gradle to import dependencies automatically.
- Run the main application class directly from the IDE.
- Open Eclipse, then choose "Import" -> "Existing Gradle Project."
- Select the project root folder and follow prompts.
To create an executable JAR file:
./gradlew bootJarThe generated JAR file will be located in:
build/libs/
Run the packaged application using:
java -jar build/libs/<your-project-name>.jarIf you encounter issues, ensure your Java and Gradle versions match project requirements. Use the following to verify your setup:
java -version
gradle -versionClear caches and refresh the project if issues persist:
./gradlew clean build