简体   繁体   English

Spring Freemarker绑定-什么是控制器?

[英]Spring freemarker bind - what is controller?

looking at the documentation for the spring macros for freemarker they talk about the 'command' object... i am confused as to what that is? 看看freemarker的spring宏文档,他们谈论'command'对象...我对这是什么感到困惑? at first i thought it is just the ModleMap set by the controller, but its obviously not. 起初,我认为这只是控制器设置的ModleMap,但显然不是。 What is the "bind" actually used for? 实际使用的“绑定”是什么?

The command object it's referring to is the form-backing object used by Spring MVC. 它所指的命令对象是Spring MVC使用的表单支持对象。 If you want to use full form handling, I strongly suggest you go and read up on the rest of the Spring MVC documentation before tackling it. 如果您想使用完整的表单处理,强烈建议您先阅读Spring MVC文档的其余部分,然后再进行处理。

However, you can safely ignore the form-handling stuff if you so choose, and just access the ModelMap directly from your freemarker templates. 但是,如果您愿意的话,可以放心地忽略表单处理内容,而直接从freemarker模板访问ModelMap

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM