【发布时间】:2014-03-14 01:30:26
【问题描述】:
我正在尝试让 Spring 和 Hibernate 在没有 persistence.xml 的情况下工作。我正在我的 context.xml 文件上设置我的实体包扫描器,如下所示:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration"/>
<property name="hibernateProperties" ref="hibernatePropertiesConfigurer"/>
<property name="packagesToScan" value="com.therubythree.simpleapi.entities"/>
</bean>
我错过了什么?
我不断收到错误:
No persistence units parsed from {classpath*:META-INF/persistence.xml}
【问题讨论】: