myeclipse7.0 配置SSH问题:
在配置SPRING的配置文件时,用mappingLocations写 /*在控制台加载测试时会报找不到文件,而且把*换成文件名,就可以了,请问这是为什么啊?有知道的么?小弟是新手。
以下这样就不报错:
classpath:config/hbm/TbPerson.hbm.xml
[color=red][color=red]报错:
classpath:config/hbm/*
[/color][/color]
spring2.0+hibernate3.1
[b]问题补充:[/b]
classpath:config/hbm/*hbm.xml
原来也加过了。。也不行。。不知道为什么。。谁遇到这样的问题呢。。
[b]问题补充:[/b]
- Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@30d82d: defining beans [dataSource,sessionFactory,personDaoImpl,personServImpl,/login]; root of factory hierarchy
- Hibernate 3.1.3
- hibernate.properties not found
- using CGLIB reflection optimizer
- using JDK 1.4 java.sql.Timestamp handling Exception in thread "main" org.springframework.beans.factory.BeanCreationException:
[color=red]Error creating bean with name 'sessionFactory' defined in class path resource [config/spring/applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [config/hbm/**.hbm.xml] cannot be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [config/hbm/**.hbm.xml] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:135)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:656)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1203)[/color]-
报这个错。是不是MYECLIPSE7.0有问题啊。在5.5上就不报错。没事。而且TOMCAT启动也不报错