Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在freemarker/spring消息中添加参数化消息_Spring_Spring Mvc_Freemarker - Fatal编程技术网

如何在freemarker/spring消息中添加参数化消息

如何在freemarker/spring消息中添加参数化消息,spring,spring-mvc,freemarker,Spring,Spring Mvc,Freemarker,我在Spring应用程序中使用freemarker作为视图渲染器。有没有办法参数化spring.ftl库中的消息 在java中,我们将使用消息源getMessageSourcecode.key、新字符串[]{param1,param2}、null、null,并插入字符串 但是spring.messageText或spring.message似乎没有用于此的选项 我错过什么了吗?有没有办法模拟它?我知道我可以添加控制器,但所有其他消息都使用宏,这似乎是一个简单的解决方案…Freemarker可以与

我在Spring应用程序中使用freemarker作为视图渲染器。有没有办法参数化spring.ftl库中的消息

在java中,我们将使用消息源getMessageSourcecode.key、新字符串[]{param1,param2}、null、null,并插入字符串

但是spring.messageText或spring.message似乎没有用于此的选项


我错过什么了吗?有没有办法模拟它?我知道我可以添加控制器,但所有其他消息都使用宏,这似乎是一个简单的解决方案…

Freemarker可以与任何标记库一起使用。 您是否尝试过将Spring标记库与message标记一起使用?

有关更多详细信息,请参阅以下链接:

请让我们知道这是否可行