67,549
社区成员




//-----------------------------------------
@Controller
public class PriceController extends BaseController{
@Resource(name = "PriceServiceImpl")
public PriceService priceService;
}
//--------------------------------------------
public interface PriceService {
List listAll();
}
//--------------------------------------------
@Service("PriceServiceImpl")
public class PriceServiceImpl implements PriceService {
@Resource
private PriceDao priceDao;
}
//springMvc.xml
<context:component-scan base-package="com.my.*"></context:component-scan>
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'priceController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'PriceService' available
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'PriceService' available