This project is a REST API built with Spring Boot. It is designed to handle various CRUD operations for managing entities such as doctors, patients, and appointments. The project also includes security configurations and uses JWT for authentication.
- Java 17 or higher
- Maven 3.6.3 or higher
- PostgreSQL (or your preferred SQL database)
- Clone the repository:
git clone https://github.com/yourusername/SPRING-REST-API.git
- Navigate to the project directory:
cd SPRING-REST-API
- Build the project:
./mvnw clean install
-
Database Configuration:
- Update the
src/main/resources/application.properties
file with your database configuration:spring.datasource.url=jdbc:postgresql://localhost:5432/your_database spring.datasource.username=your_username spring.datasource.password=your_password spring.jpa.hibernate.ddl-auto=update
- Update the
-
JWT Configuration:
- You can configure JWT settings in the
application.properties
file as well:jwt.secret=your_jwt_secret jwt.expiration=3600
- You can configure JWT settings in the
- Run the application:
./mvnw spring-boot:run
- Access the API:
- The API will be available at
http://localhost:8080
.
- The API will be available at
- The API documentation is generated using SpringDoc OpenAPI. Once the application is running, you can access the API documentation at:
http://localhost:8080/swagger-ui.html
- Run the tests using Maven:
./mvnw test