spring security单独运行正常,另外一个项目里面包含spring和hibernate的东西。整合到一起之后一直抛org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in file [D:\Program Files\tomcat\apache-tomcat-6.0.18\webapps\s-forStat\WEB-INF\classes\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sessionFactory' is required
Caused by: java.lang.IllegalArgumentException: Property 'sessionFactory' is required
这个异常,哪位大哥指点一下
加入spring security异常问题
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- wanghaolovezlq 2010-03-15 19:39关注
你的事务管理器transactionManager这个bean要注入属性sessionFactory
例子:
sessionFactory依据数据源创建Session链接
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
SystemInfo.hbm.xml
Ad.hbm.xml
Good.hbm.xml
Logo.hbm.xml
Member.hbm.xml
News.hbm.xml
NSort.hbm.xml
Pub.hbm.xml
Sort.hbm.xml
Sub.hbm.xml
Basket.hbm.xml
Sample.hbm.xml
true
UTF-8
false
2
true
50
25
false
update
org.hibernate.dialect.MySQLDialect事务管理类,通过SessionFactory来获取session
class="org.springframework.orm.hibernate3.HibernateTransactionManager">本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥15 请完成下列相关问题!
- ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
- ¥15 求daily translation(DT)偏差订正方法的代码
- ¥15 js调用html页面需要隐藏某个按钮
- ¥15 ads仿真结果在圆图上是怎么读数的
- ¥20 Cotex M3的调试和程序执行方式是什么样的?
- ¥20 java项目连接sqlserver时报ssl相关错误
- ¥15 一道python难题3
- ¥15 牛顿斯科特系数表表示
- ¥15 arduino 步进电机