Spring Boot Bootcamp – Workbooks and Challenges
)}

Workbook 2.5

Screen Shot 2022-08-15 at 11.17.11 PM.png

Task 1

Add a model attribute with key painting and value mona-lisa or starry-night.

Task 2

Use th:switch="${...}" to compare the model attribute against two possible cases.

  • th:case="'starry-night'": display starry-night from the static folder.
  • th:case="'mona-lisa'": display mona-lisa from the static folder.

Give each image a width of 300.

Screen Shot 2022-05-22 at 1.37.15 AM.png

Task 3

Add two <div> elements. Each element must contain:

  • an <h1> that displays the name of the painting.
  • the appropriate image element from task 2.

Test Case: starry-night


Screen Shot 2022-05-22 at 1.42.34 AM.png

Test Case: mona-lisa


Screen Shot 2022-05-22 at 1.42.51 AM.png

Good Luck!

Feedback Summary
5.0
3 students
5

100%
4

0%
3

0%
2

0%
1

0%
Written Reviews
There are no written reviews yet.