Workbook 2.1
Create a Spring Boot project.
Group Id | Artifact Id | Dependencies |
---|---|---|
com.ltp | workbook | Spring Web , Spring Boot DevTools |
Task 1
Create a method that can handle GET requests on path /
, and returns a view called shows
.
Task 2
Create an HTML file under the templates folder called shows.html
. It will display the following header:
<h2>IMDB: Top 5 Episodes</h2>
Task 3
Run the application and make a request.
The Thymeleaf dependency is needed to work with templates. Add it to your POM file.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
Task 4
Using the cheat sheet, create a table that displays the following data
Title | Episode | Rating |
---|---|---|
Breaking Bad | Ozymandias | 10.0 |
Attack on Titan | Hero | 9.9 |
Attack on Titan | Perfect Game | 9.9 |
Star Wars: The Clone Wars | Victory and Death | 9.9 |
Mr. Robot | 407 Proxy Authentication Required | 9.9 |
Give your table a width
of 100%
and a solid
border
.
Good Luck!
Feedback Summary
5.0
4 students
5
100%
4
0%
3
0%
2
0%
1
0%
Written Reviews
There are no written reviews yet.