/Spring_JDBC

A Spring JDBC project demonstrating CRUD operations, DAO layer implementation, and integration with MySQL using JdbcTemplate.

Primary LanguageJava

Spring JDBC

A Spring JDBC project demonstrating CRUD operations, DAO layer implementation, and integration with MySQL using JdbcTemplate.


🚀 Features

  • CRUD operations (Create, Read, Update, Delete)
  • DAO layer with JdbcTemplate
  • Entity mapping using BeanPropertyRowMapper
  • Integration with MySQL
  • Modular and maintainable code structure

🛠️ Tech Stack

  • Java
  • Spring JDBC
  • MySQL Database
  • Maven

📂 Project Structure

src/main/java
 └── com.jdbc.springjdbc
      ├── entity       # Entity classes
      ├── dao          # DAO Interfaces
      ├── dao.impl     # DAO Implementations
      ├── controller   # Controller classes
      └── SpringJdbcApplication.java  # Main entry point

⚙️ Setup & Run

  1. Clone the repository:

    git clone https://github.com/VaradM-17/Spring_JDBC.git
    cd Spring_JDBC
  2. Configure your MySQL database in application.properties:

    spring.datasource.url=jdbc:mysql://localhost:3306/your_db_name
    spring.datasource.username=your_username
    spring.datasource.password=your_password
    spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
  3. Build and run the project:

    mvn spring-boot:run

📌 Example Queries

  • Insert Employee
  • Fetch Employee by ID
  • Update Employee
  • Delete Employee