EL模型属性范围,param vs global

时间:2016-04-20 11:26:35

标签: jsp spring-mvc servlets parameters el

在Spring MVC中,是什么决定了模型属性是否在global scope

公开

${foo}

或作为param的成员

${param.foo}

似乎是任意决定,因为@ModelAttribute最终成为param的成员,但是以model编程方式添加的属性在全局命名空间中公开。与RedirectAttributes相同,addAttribute()位于param下,但addFlashAttribute()位于global

这种行为有什么逻辑或解释吗?

0 个答案:

没有答案