ssh2+junit4注解测试问题
大家好,我的bean.xml的属性配置如下:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource">
<ref local="dataSource" />
</property>
<property name="mappingLocations">
<value>classpath:/com/**/**/*.hbm.xml</value>
</property>
<property name="hibernateProperties">
<ref local="hibernateProperties" />
</property>
</bean>
测试类如下:
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations="bean.xml")
public class EshopTest{
@Autowired
private UserService userService;
@Autowired
private RoleService roleService;
@Autowired
private MenuService menuService;
@Test
public void commTest() {
List list = userService.getUserList();
}
}
项目可以运行得起来,但测试就是报以下错误,请哪位高手帮我解决一下,谢谢!
org.springframework.orm.hibernate3.HibernateQueryException: TAdminMenu is not mapped