我使用Spring,使用@Autowired注释时遇到了很多麻烦.编译时会抛出这些错误编辑我正在使用常规的java类来编写我的类.这不是造成问题的原因,是吗?
Aug 12, 2013 2:40:32 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Aug 12, 2013 2:40:32 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Aug 12, 2013 2:40:33 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'homeController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: com.mycompany.smsdatabase.service.PersonImport com.mycompany.smsdatabase.controller.HomeController.personImport; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean …Run Code Online (Sandbox Code Playgroud)