【发布时间】:2011-06-05 12:13:23
【问题描述】:
非常感谢
【问题讨论】:
标签: hibernate spring persistence dao
非常感谢
【问题讨论】:
标签: hibernate spring persistence dao
Spring 没有将PatientDaoImp 注入到您的控制器中。试试这个:
public class PatientController {
@Autowired
private PatientDaoImp dao;
还要确保以下声明位于您的 *-servlet.xml 上下文文件中(不是主上下文文件):
<context:component-scan base-package="com.pems.web"/>
【讨论】:
另外请补充:
<context:annotation-config/>
给你*-servlet.xml文件。
【讨论】: