title: How can i loop over an ArrayList using thymeleaf & spring Boot?
body: <p>I am new to thymeleaf and i try to loop over a ArrayList but it doesn't work for me .. some help please:
  this is my Html page:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;div class="row"&gt;
          &lt;table&gt;
              &lt;tr th:each="data: mois"&gt;  
                  &lt;td class="text-center" th:text="${data}"&gt;data&lt;/td&gt;
              &lt;/tr&gt;   
          &lt;/table&gt;
      &lt;/div&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>this is My controller </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>@RequestMapping(value="/editePlanning", method= RequestMethod.GET)
      public String editePlanning(Model model){
          Psi psi = psiRepository.findOne((long) 1);
          List&lt;String&gt; data = new ArrayList&lt;String&gt;();
  
          for(int i=0;i&lt;psi.getNombreMois();i++){
              int val = psi.getMoisDebut()+i%12;
              data.add(""+ val);
          }
  
          model.addAttribute("mois",data);
    
          return "editePlanning";
      }</code></pre>
  </div>
  </div>
  </p>