`
xtuhcy
  • 浏览: 139486 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

奇怪的junit测试spring应用问题,找不到property-placeholder

阅读更多

奇怪的junit测试spring应用问题,找不到property-placeholder:

 

<context:property-placeholder location="classpath*:*.properties"/>

 

原因就在classpath*:*.properties

不能写成classpath:*.properties

 

哪位熟悉spring的property-placeholder原理的请解释一下这是为啥?“classpath*”是什么意思?

分享到:
评论
1 楼 Rotakoa 2014-03-11  
classpath:只会到你的class路径中查找找文件;
classpath*:不仅包含class路径,还包括jar文件中(class路径)进行查找.

相关推荐

Global site tag (gtag.js) - Google Analytics