Skip to content

Revvrel/spring-boot-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Instructions

Databases

See application properties file for database connection information. Update spring.datasource.url, spring.datasource.username and spring.datasource.password accordingly.

The setup is using PostgreSQL. Use the following SQL Commands to setup a database.

CREATE DATABASE demodb;
CREATE USER demouser WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE demodb to demouser; 

The spring.jpa.hibernate.ddl-auto=create configuration will automatically create a table based on the @Entity annotated class file located here.

Run Spring Application

On your Terminal, navigate to the root directory of this project and run ./mvnw spring-boot:run to start the project.

Endpoints

  • GET /book will return an array of books
  • POST /book with request body { "title":"Book B", "author":"Peter", "publishedDate":"2021-01-01T00:00:00.000" }

See the RestController class file here.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%