Skip to content

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.

Notifications You must be signed in to change notification settings

hasanuzzaman-dev/spring-postgres-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages