Skip to content

Avoid Thymeleaf 3.1+ Forbidden Method Calls by Precomputing Class Simple Names - #53

Open
kristijanzafirovski wants to merge 3 commits into
aileftech:mainfrom
kristijanzafirovski:main
Open

Avoid Thymeleaf 3.1+ Forbidden Method Calls by Precomputing Class Simple Names#53
kristijanzafirovski wants to merge 3 commits into
aileftech:mainfrom
kristijanzafirovski:main

Conversation

@kristijanzafirovski

Copy link
Copy Markdown

Replaces forbidden Class.getSimpleName() calls in templates with a precomputed javaClassSimpleName property from the backend. This resolves template errors on Spring Boot 3.x and Thymeleaf 3.1+.

@NefloDev

NefloDev commented Jun 30, 2025

Copy link
Copy Markdown

When is this going to be uploaded? I was working with this and downgrading thymeleaf doesn't seem to be working neither.

Edit: It worked downgrading SpringBoot starter version

- Bump spring-boot-starter-parent to 4.1.1 and java.version to 26.
- Fix source breakage from the Boot 4 / Spring Framework 7 API moves:
  ServletWebServerInitializedEvent relocated to
  org.springframework.boot.web.server.servlet.context, and Boot 4's web
  starter now pulls Jackson 3 (tools.jackson.*) instead of Jackson 2, so
  ObjectMapper/JsonProcessingException usage in DataExportController
  moves to tools.jackson.databind.ObjectMapper and the now-unchecked
  tools.jackson.core.JacksonException.
- Replace the non-functional placeholder @SpringBootTest (this is a
  library with no bootable application, so a bare @SpringBootTest could
  never find a configuration class - it was already erroring before this
  change) with a real smoke test app that imports
  SnapAdminAutoConfiguration, boots a full Spring context, and hits the
  admin index and a model list route end-to-end. This is what previously
  crashed at startup on Spring Boot 4.1.1 when consumed as a published
  jar; it now builds and runs clean.
- Bump the release workflow's JDK to 26 (temurin) to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CzTxQYQNrcQaCJnYNELDaa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants