8bitzz / blogs

0 stars 0 forks source link

How to use SpringMVC to build REST controller that can serve RESTful requests #10

Closed 8bitzz closed 2 years ago

8bitzz commented 3 years ago

Get Started

Screen Shot 2021-05-30 at 10 17 40

Go to https://start.spring.io/ to generate a SpringProject. Select Maven as project type. Add Spring Web, Spring Data JPA and PostgreSQL Driver as dependencies Unzip the folder and import the project to IntelliJIDEA (or Eclipse)

Create a server & PostgreSQL database

Screen_Shot_2021-05-30_at_10_39_12

Go to https://postgresapp.com/ to download & install Postgres app Run Postgres app and start a PostgreSQL server at port 5432 (mine is at port 5433) Go to https://tableplus.com/ to download & install TablePlus app Run Postgres app and create a new connection at your port Create a new database at that connection

Project Structure

Create the sub packages and classes for the project