spring配置文件在打包使用时找到不路径问题
2013-06-02 15:43
696 查看
[java] view
plaincopy
<property name="mappingDirectoryLocations">
<list>
<value>classpath:com/test/pojo/</value>
</list>
</property>
时会出现 cannot be resolved to absolute file path because it does not reside in the 。。。。错误
更改为如下便可以解决问题
[java] view
plaincopy
<property name="mappingLocations">
<list>
<value>classpath*:com/test/pojo/*.hbm.xml</value>
</list>
</property>
plaincopy
<property name="mappingDirectoryLocations">
<list>
<value>classpath:com/test/pojo/</value>
</list>
</property>
时会出现 cannot be resolved to absolute file path because it does not reside in the 。。。。错误
更改为如下便可以解决问题
[java] view
plaincopy
<property name="mappingLocations">
<list>
<value>classpath*:com/test/pojo/*.hbm.xml</value>
</list>
</property>
相关文章推荐
- maven打包,使用shade插件,避免出现加载spring配置文件报错的问题
- 使用import简化spring的配置 spring import 标签的解析 使用import或加载spring配置时,报错误There is no ID/IDREF 多个Spring配置文件import resource路径配置
- springboot集成disconf配置文件下载路径问题
- 使用xml作为数据库的配置文件的路径读取问题
- Spring混合配置时,遇到配置文件路径NotFound,使用PathMatchingResourcePatternResolver解决
- 使用webpack打包的后,公共请求路径的配置问题
- 搭建SSH框架遇到的struts.xml找不到spring定义的bean的错误(配置文件的路径问题)
- SpringBoot系列三:SpringBoot基本概念(统一父 pom 管理、SpringBoot 代码测试、启动注解分析、配置访问路径、使用内置对象、项目打包发布)
- Spring的bean 配置文件路径问题(转载)
- spring boot 读取配置文件问题,不能使用@Autowired
- 我们使用eclipse编辑spring配置文件时,经常没有提示,而无从下手时。 现在我们就来解决没有提示的问题。
- Asp.Net中使用Access数据库配置文件使用相对路径问题
- 解决使用Spring Boot、Multipartfile上传文件路径错误问题
- SpringBoot项目打包后,找不到文件路径问题,处理方法
- Spring关于使用注解@Configuration去配置FormattingConversionServiceFactoryBean来实现自定义格式字符串处理无效的问题(未找到是什么原因造成的)
- as通过gradle实现多渠道打包+使用配置文件进行版本管理+指定apk输出路径和apk文件名
- spring配置文件路径——如何使用表达式
- 使用maven搭建ssm框架遇到的spring找不到配置文件问题
- Spring 加载xml配置文件路径问题
- Spring整合Struts2 wel.xml中写spring核心配置文件路径问题,顺便总结下我学习SSH整合的过程