Skip to content

Latest commit

 

History

History
66 lines (52 loc) · 1.66 KB

File metadata and controls

66 lines (52 loc) · 1.66 KB

Spring Boot CRUD Application with PostgreSQL and Global Exception Handling

This project is a Spring Boot application that demonstrates CRUD (Create, Read, Update, Delete) operations with PostgreSQL as the database and implements global exception handling.

Features

  • Create, Read, Update, Delete operations for an entity (e.g., Employee)
  • PostgreSQL as the database
  • Global exception handling with custom error responses
  • RESTful API with Spring Boot
  • Maven build

Technologies Used

  • Spring Boot 3.x
  • Spring Data JPA
  • PostgreSQL
  • Maven
  • Java 17
  • Lombok (optional for reducing boilerplate code)

Prerequisites

  • Java 17 or higher
  • PostgreSQL
  • Maven
  • Postman or cURL (for testing API)

Getting Started

Step 1: Clone the Repository

git clone https://github.com/hasanuzzaman-dev/spring-postgres-crud.git
cd spring-postgres-crud

Step 2: Configure PostgreSQL Database

Ensure PostgreSQL is installed and running. Create a new database and update the application.properties file with your database credentials:

# src/main/resources/application.yml

spring:
  application:
    name: spring-postgres-crud
  datasource:
    url: jdbc:postgresql://localhost:5432/spring-postgres-crud
    username: postgres
    password: postgres
  jpa:
    hibernate:
      ddl-auto: update

Step 3: Build and Run the Application

mvn clean install
mvn spring-boot:run
### Instructions
- Replace the GitHub repository URL with your actual repository.
- Adjust the package names, project-specific details, and paths as per your project structure.
- You may also add additional sections such as deployment instructions if needed.