这是controll代码
这是service
seviceimpl
sping-mvc
普通的访问项目就没问题,用控制层里Login/getLogin.do就报错
Servlet.service() for servlet [SpringMVC] in context with path [/center] threw exception [Request processing failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'loginController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private goss.service.UserService goss.controller.LoginController.userService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [goss.service.UserService] 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)}] with root cause
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [goss.service.UserService] 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)}