Spring MVC Design

Objective

Create a Spring MVC program that displays provided employee data through a Thymeleaf template page.

Skills Required

  • Spring MVC
  • HTML/CSS
  • Thymeleaf
  • Object Oriented Programming
  • MVC Design Pattern
  • Collections
  • Polymorphism
  • Encapsulation

Iterations

Using Thymeleaf and Spring MVC, build the application in the following small iterations. It should function at completion of each iteration!

  1. Write the Thymeleaf template where you will do the following:

  2. Write a model called Employee and it contains the following:

    • Encapsulated data:

      • Identification
      • Employee name as:

        • First
        • Middle
        • Last
        • Suffix
      • Employee address by creating a relationship to the Address model
  3. Write the controller for Employee

  4. Create an EmployeeRepository with values of your choice

  5. Write a model called Address and it contains the following:

    • Encapsulated data:

      • Identification
      • Employee Identification
      • Address as:

        • Address Line 1
        • Address Line 2
        • Apartment Number
        • City
        • State
        • Zip
        • Zip + Four
        • County
        • Country
  6. Write the controller for Address

  7. Create an AddressRepository with values of your choice

  8. Write a ThymeLeaf template to display the Employee and the Employee's Address.

  9. Use CSS Grid or Flexbox to style the templates to have an consistent look and feel.