Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.23 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.23 KB

spring-demo

Spring Boot CRUD demo is demonstrating how to implement simple CRUD operations with a Product entity.

What's inside

This project is based on the Spring Boot project and uses these packages :

  • Maven
  • Spring Core
  • Spring Data (Hibernate & PostgreSQL)
  • Spring MVC (Tomcat)
  • PostgreSQL Driver

Installation

The project is created with Maven, so you just need to import it to your IDE and build the project to resolve the dependencies

Database configuration

Create a PostgreSQL database with the name student and add the credentials to /resources/application.properties.
The default ones are :

spring.datasource.url=jdbc:postgresql://localhost:5432/student
spring.datasource.username=(your username or empty)
spring.datasource.password=(your password or empty)
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
server.error.include-message=always

Usage

Run the project through the IDE and head out to http://localhost:8080

or

run this command in the command line:

mvn spring-boot:run