Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Feature Flags (e.g. Spring Profile annotations) #325

Open
goodale opened this issue May 3, 2024 · 1 comment
Open

Support for Feature Flags (e.g. Spring Profile annotations) #325

goodale opened this issue May 3, 2024 · 1 comment

Comments

@goodale
Copy link

goodale commented May 3, 2024

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.

@ultraq
Copy link
Member

ultraq commented May 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants