2014-10-30 16 views

回答

1

我认为这是

import org.springframework.ui.Model; 

更换@Model@ModelAttribute Fruit fuit像格回答。

和进口org.springframework.web.bind.annotation.ModelAttribute;

到这里看看:http://docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html

+0

塞萨尔:从谷歌搜索见状过,这是一个我需要使用。我包含了导入,但是当将@Model注释放在类似于我的原始文章中的代码片段的方法中时,它会提供以下内容:“模型不是注释类型”。知道为什么? – wesg 2014-10-30 15:40:16

0

我认为这是@ModelAttribute的错字。

@Model是J2EE 6类级别的注释CDI

相关问题