AC4pt2demo
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.
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.