你确定依赖注入没问题吗?检查配置文件中的依赖注入有没有遗漏,注意UserServiceImpl中的userDao是否为空,如果为空,就是你没有在UserServiceImpl中注入dao,如果不为空,则可能是你的userDao中没有注入sessionFactory;
解决方案 »
- GIS 在JAVA Web项目中运用
- 请前辈帮忙看一下,553 You are not authorized to send mail, authentication is required
- 求高人详细讲解下 JavaScript中$的作用
- jsf出现异常
- 一段获得鼠标位置的代码。。。。哪里出错了
- 如何将自己开发的JSP程序隐藏起来,不让别人修改?
- 新手的一个小小的问题白送分
- 在iframe中如何提交同一页面iframe外的form!!请各位帮忙!!!!
- 再jsp中调用什么语句,兴页面在父页面框架中显示,同时关闭当前页面
- JS中赋值变量问题 一定给分在线等待
- 在线等待答复--等待中
- 请有过eclipse开发Web项目进,一个关于项目发布的事?
处设个断点就能找到了
如果能进入DAO 那就是配置文件有问题,或者你的service 层没有提供get方法
private UserDAO userDao; public UserDAO getUserDao() {
return userDao;
} public void setUserDao(UserDAO userDao) {
this.userDao = userDao;
}
提供get方法了啊,设了断点后提示的没看懂,进入httpServlet中了
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="userTarget" class="com.service.impl.UserServiceImpl">
<property name="userDao">
<ref local="userDao"/>
</property>
</bean>
<bean id="userService" parent="txProxyTemplate">
<property name="target">
<ref bean="userTarget"/>
</property>
</bean>