Skip to content

jvitosousa/SPRING-REST-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SPRING REST API Spring Logo

Description

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.

Requirements

  • Java 17 or higher
  • Maven 3.6.3 or higher
  • PostgreSQL (or your preferred SQL database)

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/SPRING-REST-API.git
  2. Navigate to the project directory:
    cd SPRING-REST-API
  3. Build the project:
    ./mvnw clean install

Configuration

  1. 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
  2. JWT Configuration:

    • You can configure JWT settings in the application.properties file as well:
      jwt.secret=your_jwt_secret
      jwt.expiration=3600

Usage

  1. Run the application:
    ./mvnw spring-boot:run
  2. Access the API:
    • The API will be available at http://localhost:8080.

API Documentation

  • 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
    

Testing

  • Run the tests using Maven:
    ./mvnw test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages