Setting up a javascript variable from Spring model by using Thymeleaf

How can I read a model variable from Spring model and setting up it into a Javascript? Note that I’m using Thymeleaf as Template Engine. Spring-side: @RequestMapping(value = “message”, method =

Source: Setting up a javascript variable from Spring model by using Thymeleaf – Stack Overflow