springMVC 注解 启动时报错
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了springMVC 注解 启动时报错相关的知识,希望对你有一定的参考价值。
[ERROR][2014-12-13 15:32:54,041][org.springframework.web.servlet.DispatcherServlet]Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.mvc.service.IUserService com.mvc.controller.UserController.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.mvc.service.IUserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: @org.springframework.beans.factory.annotation.Autowired(required=true)
at java.lang.Thread.run(Thread.java:662)
@Resources
private IUserService userService;
这样写试试
以上是关于springMVC 注解 启动时报错的主要内容,如果未能解决你的问题,请参考以下文章
SpringMVC_Controller注解与RequestMapping
使用springmvc时报错JSPs only permit GET POST or HEAD
SpringMVC在使用JSON时报错信息为:Content type 'application/json;charset=UTF-8' not supported