lundi 20 avril 2015

Thymeleaf template parsing error

I get parsing error when I try to load localhost:8080/. I can't find any errors in my template, so why have I this mistake? Error:

Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Mon Apr 20 16:59:56 EEST 2015 There was an unexpected error (type=Internal Server Error, status=500). Exception parsing document: template="index", line 26 - column 3

<tr th:each="customer : ${customers}">
    <td th:text="${customer.identity}">001</td>
    <td th:text="${customer.name}">Name</td>
    <td th:text="${customer.address}">Address</td>
    <td th:text="${customer.age}">Age</td>
</tr>

public String mainPage(Model model){
    ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
    PersonJDBCTemplate personJDBCTemplate = (PersonJDBCTemplate) context.getBean("personJDBCTemplate");
    List<Person> persons = personJDBCTemplate.getAllPersons();
    model.addAttribute("customers", persons);
    return "index";
}

Aucun commentaire:

Enregistrer un commentaire