A Spring Boot application demonstrating simple CRUD operations with a Student entity.
This repository contains a Spring Boot application that demonstrates simple CRUD (Create, Read, Update, Delete) operations with a Student
entity.
firstSpringProject
│ ├── src
│ │ ├── main
│ │ │ ├── java
│ │ │ │ └── com
│ │ │ │ └── example
│ │ │ │ └── firstSpringProject
│ │ │ │ ├── controller
│ │ │ │ │ └── StudentController.java
│ │ │ │ ├── exception
│ │ │ │ │ └── ResourceNotFoundException.java
│ │ │ │ ├── model
│ │ │ │ │ └── Student.java
│ │ │ │ ├── repository
│ │ │ │ │ └── StudentRepository.java (interface)
│ │ │ │ ├── services
│ │ │ │ │ ├── StudentService.java (interface)
│ │ │ │ │ └── StudentServiceImpl.java
│ │ │ │ └── FirstSpringProjectApplication.java
git clone [email protected]:itsindrajput/firstSpringProject.git
cd spring-boot-crud-demo
Update the application.properties file located in src/main/resources with your MySQL database configuration:
spring.application.name=firstSpringProject
spring.datasource.url=jdbc:mysql://localhost:3306/studentsdb?allowPublicKeyRetrieval=true&useSSL=false&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
spring.jpa.hibernate.ddl-auto = update
Use the following Maven command to build and run the application:
mvn spring-boot:run
Contributions are welcome! Please fork the repository and create a pull request with your changes.
Excited to share my blog post on CRUD operations with Spring Boot using IntelliJ IDEA Community Edition! Check it out here: 👇