POST http://localhost:8080/GKBANK2/fileUpload/getExcel.action 500 (Internal Server Error)
f.support.ajax.f.ajaxTransport.send @ jquery-1.7.2.min.js:4
f.extend.ajax @ jquery-1.7.2.min.js:4
poiexcel @ welcome.jsp:53
onclick @ welcome.jsp:631
HTTP Status 500 - Unable to instantiate Action, fileUploadAction, defined for 'getExcel' in namespace '/fileUpload'Error creating bean with name 'fileUploadAction': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.bank.service.FileUploadService com.bank.action.FileUploadAction.fileUploadService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.bank.service.FileUploadService] 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)}
Popularity: @Autowired can annotate member variables, methods and constructors to complete the automatic assembly work. It must be clear here: @Autowired is automatically assembled according to the type. If it needs to be assembled by name, it needs to be used with @Qualifier ;
Problem solved: This is the problem of @Autowired injection service in action.
Annotate servcieImpl with @Service @Transactional
daoImpl adds the annotation @Repository to solve it