title: Thymeleaf - Include content of fragment
body: <p>Thymeleaf fragment:</p>
  
  <pre><code>&lt;div th:fragment="assets"&gt;
      &lt;script src="myscript"&gt;&lt;/script&gt;
      &lt;script src="myscript2"&gt;&lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>This piece of code inserts the fragment:</p>
  
  <pre><code>&lt;div th:replace="fragments/assets :: assets"&gt;&lt;/div&gt;
  </code></pre>
  
  <p><br></p>
  
  <p>How to include only content without the wrapper?</p>
  
  <pre><code>&lt;script src="myscript"&gt;&lt;/script&gt;
  &lt;script src="myscript2"&gt;&lt;/script&gt;
  </code></pre>