日期:2014-05-19 浏览次数:20660 次
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>classpath*:/com/heping/oa/entity/main/hbm/*.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
hibernate.show_sql=true
</value>
</property>
</bean>
]
Tests in error:
testSessionFactory(com.heping.oa.hibernate.SpringHibernateTest): Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [classpath:/com/heping/oa/entity/main/hbm/Hospital.hbm.xml] cannot be opened because it does not exist
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0