Conditional inclusion of JS files achieved with "th:if" and spring profiles

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Conditional inclusion of JS files achieved with "th:if" and spring profiles

balteo
This post was updated on .
Hello,

I would be very grateful is someone would advise me how to conditionally include JS files in thymeleaf (possibly using th:if) using spring profiles.

For instance one needs to include the QUnit library as well as the test file when testing but those files must not be included in production. Say I have two Spring profiles: "dev" and "prod".

How can I use spring profiles together with th:if?

Regards,

Julien.