Get Users on the HTML Page
Learn how to display the generated users in our database on the UI.
We'll cover the following
Main steps
We need to take three steps for this:
- Reyrieve the users from the database.
- Put the users in the model that Thymeleaf uses to render the HTML.
- Generate table rows in the Thymeleaf template for each of the users.
Get users from the database
To get the users from the database, we will update UserService
with a getAllUsers
method as following:
Get hands-on with 1400+ tech skills courses.