spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
property-placeholder
location="classpath:/path/to/package/default.properties,classpath:/path/to/package/#{ systemProperties['user.name'] }.properties"/>
执行应用程序时,spring无法识别表达式.上下文没有启动,spring说:类路径资源[path / to / package /#{systemProperties [‘user.name’]} .properties]无法打开
当我用字符串手动替换表达式导致有效资源时,行为是预期的. manual states它应该工作.
spring-context和spring-core(3.1.2-RELEASE)在classpath中.
最佳答案
那里不允许使用SpEL表达式;你可以间接做你想做的事,但……
property-placeholder properties-ref="props"/>
sspath:#{systemProperties['foo']}"/>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。