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
这个异常,哪位大哥指点一下
你的事务管理器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">