Open goodale opened 6 months ago
Not entirely sure if it's what you're after, but a while ago I wrote a dialect to conditionally render Thymeleaf templates based on the active Spring Profile: https://github.com/ultraq/thymeleaf-spring-environment-dialect If rendering different markup isn't what you're after, then you can check the source code of the processors to see how it gets access to the active Spring Profile so you can do what you need.
What is the best practice method to integrate Spring Profiles into Thymeleaf views to conditionally alter components in the UI? It would be possible to add profile data into the model provide by the controller but ideally (I think?) there would be direct Thymeleaf tag support for profiles.