ShewitPS / AC4pt2demo

AC4pt2demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AC4pt2demo

AC4pt2demo

Guided Lab - 309.5.3 - SP5 - How to use - Model, ModelAndView, and @ModelAttribute annotation

Lab Objective In this lab, we will send data from the controller to the template (HTML) by using model, ModelAndView, and @Modelattribute Annotation. In order to do that, we will use Thymeleaf. We will explore more about Thymeleaf later in this lab. There are four examples in this lab.

Learning Objectives Explain how to send data from the controller to the template (HTML) using the model, ModelAndView, and @Modelattribute annotations.

Example Two - ModelAndView

Create a model class (Pojo class) in order to see more dynamic examples. Create a package named model. Create a User.java class inside the model package. Remember this class is not directly related to REST.

code is in master branch

About

AC4pt2demo