删除编译时错误的问题 - Springs MVC

时间:2013-08-18 05:44:25

标签: hibernate spring-mvc compiler-errors

我是一名初学者程序员,我刚刚完成了阅读我的spring mvc 3.0概念。我尝试在spring中编写我的第一个代码但是我在删除编译时错误方面遇到了问题。错误显示在这些行上

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.support.SessionStatus;

显示的错误是

The import org.springframework.beans.factory.annotation.Autowired cannot be resolved

和其他import相同 我认为我的文件展示位置正确

所有jar文件都放置为

enter image description here

我无法思考问题

2 个答案:

答案 0 :(得分:1)

如果你想在春天编写一些应用程序并了解它是如何工作的,你可以下载spring工具套件并按照本教程: http://manueljordan.wordpress.com/2011/12/12/creating-a-spring-web-mvc-project-with-springsource-tool-suite/

答案 1 :(得分:1)

注1:如果您使用的是Linux系统,则应该使用org.spring.framework.xxx-Sources jars。

注2:如果您使用的是Windows系统,则应使用org.spring.framework.xxx-Releases jars

希望这会对你有所帮助。

注意您可以参考:Difference between Binary release and source release?