Build a spring boot app that has the Create and Read functionality for a
- Build an
Order
model with at least 3 fields:- id
- order number
- Once the table is created in your database, insert a couple of records manually.
- Build a Repository for Orders named
OrderRepository
- Build a controller that has methods that can:
- respond to a get mapping url that matches
/order/{id}
and renders a view with the order information - respond to a post mapping url that matches
/order
and gets all parameters from the request and saves a newOrder
into the database.
- respond to a get mapping url that matches
- Build a view that:
- Is named
show.html
and displays all the information of an order - Is named
create.html
and displays a form to create a new order, and the form is able to submit the information to the controller in order to save it into the database
- Is named