conorheffron / ironoc-db

Sample Data Manager Service with UI
http://34.175.177.166:8080/
GNU General Public License v3.0
1 stars 0 forks source link

Fix/resolve thymeleaf deprecated errors in logs #268

Closed conorheffron closed 3 weeks ago

conorheffron commented 1 month ago

Sample warnings/errors related to templating engine.

10-01T23:41:32.942Z  WARN 92 --- [nio-8080-exec-3] o.t.s.p.StandardIncludeTagProcessor      : [THYMELEAF][http-nio-8080-exec-3][index] Deprecated attribute {th:include,data-th-include} found in template index, line 14, col 10. Please use {th:insert,data-th-insert} instead, this deprecated attribute will be removed in future versions of Thymeleaf.
2024-10-01T23:41:32.942Z  WARN 92 --- [nio-8080-exec-3] actStandardFragmentInsertionTagProcessor : [THYMELEAF][http-nio-8080-exec-3][index] Deprecated unwrapped fragment expression "navbar.html" found in template index, line 14, col 10. Please use the complete syntax of fragment expressions instead ("~{navbar.html}"). The old, unwrapped syntax for fragment expressions will be removed in future versions of Thymeleaf.
2024-10-01T23:41:39.299Z  INFO 92 --- [nio-8080-exec-4] c.ironoc.db.controller.PersonController  : Entering personController.home: map={}
Hibernate: select p1_0.id,p1_0.age,p1_0.first_name,p1_0.surname,p1_0.title from person p1_0
2024-10-01T23:41:39.301Z  WARN 92 --- [nio-8080-exec-4] o.t.s.p.StandardIncludeTagProcessor      : [THYMELEAF][http-nio-8080-exec-4][index] Deprecated attribute {th:include,data-th-include} found in template index, line 14, col 10. Please use {th:insert,data-th-insert} instead, this deprecated attribute will be removed in future versions of Thymeleaf.
2024-10-01T23:41:39.301Z  WARN 92 --- [nio-8080-exec-4] actStandardFragmentInsertionTagProcessor : [THYMELEAF][http-nio-8080-exec-4][index] Deprecated unwrapped fragment expression "navbar.html" found in template index, line 14, col 10. Please use the complete syntax of fragment expressions instead ("~{navbar.html}"). The old, unwrapped syntax for fragment expressions will be removed in future versions of Thymeleaf.
2024-10-01T23:41:39.658Z  INFO 92 --- [nio-8080-exec-8] c.ironoc.db.controller.PersonController  : Entering personController.home: map={}
conorheffron commented 3 weeks ago

Merged & completed.

Essentially the includes needed to be converted to fragment replace expressions for newer thymeleaf version.

For example the navbar include changed from:

<div th:include="navbar.html" /> to: <header th:replace="~{navbar.html}"></header>