object

The object property allows you to select an object, and then optionally use *{} expressions for access to fields and methods of object inside the element. This is allow keep code cleaner.

<div th:object="${session.user}">   
 <p>Name: <span th:text="*{firstName}">Harry</span>.</p>
 <p>Surname: <span th:text="*{lastName}">Potter</span>.</p>
 <!-- for some reason,  coder want use ${} expression --> 
 <p>Nationality: <span th:text="${session.user.nationality}">You yourself know.</span>.</p>
</div>