Selection Variable Expression

public class Person{
  private String name,lastname;
    	private int age;
    	public Person(String name,String lastname,int age) { = name;
    		this.age = age;
    public String getName() {
      return name;
    public void setName(String name) { = name;
    public String getLastname() {
      return lastname;
    public void setLastname(String lastname) {
      this.lastname = lastname;
    public int getAge() {
      return age;
    public void setAge(int age) {
      this.age = age;
<div th:object="${person}">
  <p th:text="*{name}">Name</p>
  <p th:text="*{lastname}">LastName</p>
  <p th:text="*{age}">Age</p>


No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *